> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get merged customer

> Returns the merged customer data.

**Required scopes:** `customers:ro`


## OpenAPI

````yaml /api/customer-data-platform/openapi.json post /get_merged_customer
openapi: 3.0.0
info:
  title: Customer Data Platform API
  description: A service for collecting, storing, and managing end-user data.
  version: 0.0.1
servers:
  - url: https://api.text.com/cdp
    description: Main production server URL
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken:
      - customers:ro
paths:
  /get_merged_customer:
    post:
      tags:
        - Customers
      summary: Get merged customer
      description: Returns the merged customer data.
      operationId: get-merged-customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_id
              properties:
                customer_id:
                  type: string
                  format: uuid
                  description: The requested customer ID.
            example:
              customer_id: cf89fa3a-5ee9-4bdb-84ec-38824b2e2786
      responses:
        '200':
          description: Merged customer data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
              example:
                customer_id: cf89fa3a-5ee9-4bdb-84ec-38824b2e2786
                organization_id: f6a7fd72-2a76-4c4a-b165-9cb2e8b4c4e2
                product: livechat
                monitoring:
                  name: John Doe
                  name_is_default: false
                  email: john.doe@example.com
                  avatar_url: https://example.com/avatars/john.jpg
                  phone_number: +1 555 000 1234
                  session_fields:
                    - key: account_id
                      value: ACC-001
                  visits:
                    - id: 1
                      started_at: '2026-06-01T10:00:00Z'
                      ended_at: '2026-06-01T10:30:00Z'
                      geolocation:
                        latitude: '40.7128'
                        longitude: '-74.0060'
                        country: United States
                        country_code: US
                        region: New York
                        city: New York
                        timezone: America/New_York
                      ip: 203.0.113.42
                      user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
                      first_visited_page:
                        id: 101
                        started_at: '2026-06-01T10:00:00Z'
                        url: https://example.com/pricing
                        title: Pricing
                        group_ids:
                          - 1
                      pages:
                        - id: 101
                          started_at: '2026-06-01T10:00:00Z'
                          url: https://example.com/pricing
                          title: Pricing
                          group_ids:
                            - 1
                  version: 3
                  state: browsing
                  online: true
                  current_group_ids:
                    - 1
                  created_at: '2026-06-15T08:30:00Z'
                  master_id: cf89fa3a-5ee9-4bdb-84ec-38824b2e2786
                custom_fields:
                  58737b5829e65621a45d598aa6f2ed8e:
                    plan: enterprise
                    account_id: ACC-001
                statistics:
                  chats_count: 14
                  threads_count: 14
                  visits_count: 27
                  page_views_count: 83
                  greetings_accepted_count: 3
                  greetings_converted_count: 1
                  tickets_count: 2
                  tickets_inbox_count: 1
                  tickets_archive_count: 1
                  tickets_spam_count: 0
                  tickets_trash_count: 0
                  orders_count: 3
                  last_activity_at: '2026-06-01T10:30:00Z'
                  last_visit_at: '2026-06-01T10:00:00Z'
                  last_chat_at: '2026-06-28T14:00:00Z'
                  last_ticket_created_at: '2026-06-20T09:00:00Z'
                chat:
                  active: true
                  chat_id: PJ0MRSHTDG
                  thread_id: K600PKZON8
                  last_updated_at: '2026-06-01T10:25:00Z'
                  group_ids:
                    - 1
                  source_customer_client_id: fe372ce8-dbf4-4b6b-ae27-516b18b6d6b5
                invitation:
                  active: true
                  greeting_id: 42
                  greeting_unique_id: a3f1b2c4-d5e6-7890-abcd-ef1234567890
                  greeting_name: Welcome greeting
                tickets:
                  e1a2b3c4-d5e6-7890-abcd-ef1234567890:
                    ticket_id: e1a2b3c4-d5e6-7890-abcd-ef1234567890
                    hd_license_id: '12345'
                    status: open
                    silo: inbox
                    created_at: '2026-06-20T09:00:00Z'
                    last_updated_at: '2026-06-21T11:00:00Z'
                    last_customer_message_at: '2026-06-21T11:00:00Z'
                omnichannel:
                  fbmessenger:
                    - id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
                      name: John Doe
                      first_name: John
                      last_name: Doe
                      profile_pic: https://example.com/fb/john.jpg
                      gender: male
                      locale: en_US
                      is_verified_user: false
                  twilio:
                    - phone_number: +1 555 000 1234
                  whatsapp:
                    - id: '15550001234'
                      name: John Doe
                      phone_number: '+15550001234'
                orders:
                  - customer_id: cf89fa3a-5ee9-4bdb-84ec-38824b2e2786
                    store_platform: shopify
                    store_uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    order_id: order_001
                    order_number: '#1001'
                    currency: USD
                    total_price: 149.99
                    created_at: '2026-06-15T13:00:00Z'
                    event_id: c1d2e3f4-a5b6-7890-abcd-ef1234567890
                    event_client_id: shopify_client_id
                    line_items:
                      - title: Text Enterprise Plan
                        quantity: 1
                        price: 149.99
                        sku: LC-ENT-001
                        variant_id: var_001
                        product_id: prod_001
                carts:
                  - store_uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    store_platform: shopify
                    customer_signed_in: true
                    subtotal: 99.99
                    total: 109.99
                    subtotal_usd: 99.99
                    total_usd: 109.99
                    currency: USD
                    items:
                      - id: 7890
                        quantity: 1
                        variant_id: 11223
                        discounts: []
                    last_updated_at: '2026-06-01T09:45:00Z'
        '401':
          description: Invalid access token
        '403':
          description: Insufficient scopes
        '404':
          description: Customer not found
        '422':
          description: Invalid request body
        '500':
          description: Internal error
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - customers:ro
components:
  schemas:
    Customer:
      type: object
      required:
        - customer_id
        - organization_id
        - product
        - monitoring
        - custom_fields
        - statistics
      properties:
        customer_id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        product:
          type: string
          example: livechat
        monitoring:
          allOf:
            - $ref: '#/components/schemas/Monitoring'
          nullable: true
        custom_fields:
          allOf:
            - $ref: '#/components/schemas/CustomFields'
          nullable: true
        statistics:
          allOf:
            - $ref: '#/components/schemas/Statistics'
          nullable: true
        chat:
          $ref: '#/components/schemas/Chat'
        invitation:
          $ref: '#/components/schemas/Invitation'
        tickets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Ticket'
        omnichannel:
          $ref: '#/components/schemas/Omnichannel'
        orders:
          type: array
          items:
            $ref: '#/components/schemas/Order'
        carts:
          type: array
          items:
            $ref: '#/components/schemas/Cart'
    Monitoring:
      type: object
      required:
        - name
        - name_is_default
        - email
        - avatar_url
        - phone_number
        - session_fields
        - visits
        - version
        - state
        - online
        - current_group_ids
        - created_at
        - master_id
      properties:
        name:
          type: string
        name_is_default:
          type: boolean
        email:
          type: string
        avatar_url:
          type: string
        phone_number:
          type: string
        session_fields:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
        visits:
          type: array
          items:
            $ref: '#/components/schemas/Visit'
        version:
          type: integer
        state:
          $ref: '#/components/schemas/MonitoringState'
        online:
          type: boolean
        current_group_ids:
          type: array
          items:
            type: integer
        created_at:
          type: string
          format: date-time
        master_id:
          type: string
          format: uuid
        address:
          $ref: '#/components/schemas/Address'
    CustomFields:
      type: object
      additionalProperties:
        type: object
        additionalProperties:
          type: string
      example:
        58737b5829e65621a45d598aa6f2ed8e:
          phone: 0300 222 0000
          address: Prime Minister's Office, 10 Downing Street
    Statistics:
      type: object
      required:
        - chats_count
        - threads_count
        - visits_count
        - page_views_count
        - greetings_accepted_count
        - greetings_converted_count
        - tickets_count
        - tickets_inbox_count
        - tickets_archive_count
        - tickets_spam_count
        - tickets_trash_count
        - orders_count
      properties:
        chats_count:
          type: integer
        threads_count:
          type: integer
        visits_count:
          type: integer
        page_views_count:
          type: integer
        greetings_accepted_count:
          type: integer
        greetings_converted_count:
          type: integer
        tickets_count:
          type: integer
        tickets_inbox_count:
          type: integer
        tickets_archive_count:
          type: integer
        tickets_spam_count:
          type: integer
        tickets_trash_count:
          type: integer
        orders_count:
          type: integer
        last_activity_at:
          type: string
          format: date-time
        last_visit_at:
          type: string
          format: date-time
        last_ticket_created_at:
          type: string
          format: date-time
        last_ticket_customer_message_at:
          type: string
          format: date-time
        last_chat_at:
          type: string
          format: date-time
        last_omnichannel_chat_at:
          type: string
          format: date-time
        last_campaign_interaction_at:
          type: string
          format: date-time
    Chat:
      type: object
      required:
        - active
        - chat_id
        - thread_id
        - last_updated_at
        - group_ids
      properties:
        active:
          type: boolean
        chat_id:
          type: string
        thread_id:
          format: string
        last_updated_at:
          type: string
          format: date-time
        group_ids:
          type: array
          items:
            type: integer
        source_customer_client_id:
          type: string
    Invitation:
      type: object
      required:
        - active
        - greeting_id
        - greeting_unique_id
        - greeting_name
      properties:
        active:
          type: boolean
        greeting_id:
          type: integer
        greeting_unique_id:
          format: uuid
        greeting_name:
          type: string
    Ticket:
      type: object
      required:
        - ticket_id
        - hd_license_id
        - status
        - created_at
        - last_updated_at
      properties:
        ticket_id:
          type: string
          format: uuid
        hd_license_id:
          type: string
        status:
          type: string
        silo:
          $ref: '#/components/schemas/TicketSilo'
        created_at:
          type: string
          format: date-time
        last_updated_at:
          type: string
          format: date-time
        last_customer_message_at:
          type: string
          format: date-time
    Omnichannel:
      type: object
      properties:
        fbmessenger:
          type: array
          items:
            $ref: '#/components/schemas/OmnichannelFBMessenger'
        twilio:
          type: array
          items:
            $ref: '#/components/schemas/OmnichannelTwilio'
        whatsapp:
          type: array
          items:
            $ref: '#/components/schemas/OmnichannelWhatsApp'
    Order:
      type: object
      required:
        - customer_id
        - store_platform
        - store_uuid
        - order_id
        - order_number
        - currency
        - total_price
        - created_at
        - event_id
        - event_client_id
      properties:
        customer_id:
          type: string
          format: uuid
        store_platform:
          type: string
        store_uuid:
          type: string
          format: uuid
        order_id:
          type: string
        order_number:
          type: string
        currency:
          type: string
        total_price:
          type: number
          format: double
        created_at:
          type: string
          format: date-time
        event_id:
          type: string
          format: uuid
        event_client_id:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem'
    Cart:
      type: object
      required:
        - store_uuid
        - store_platform
        - customer_signed_in
        - subtotal
        - total
        - subtotal_usd
        - total_usd
        - currency
        - items
        - last_updated_at
      properties:
        store_uuid:
          type: string
          format: uuid
        store_platform:
          type: string
        customer_signed_in:
          type: boolean
        subtotal:
          type: number
          format: double
        total:
          type: number
          format: double
        subtotal_usd:
          type: number
          format: double
        total_usd:
          type: number
          format: double
        currency:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/CartItem'
        last_updated_at:
          type: string
          format: date-time
    Visit:
      type: object
      required:
        - id
        - started_at
        - geolocation
      properties:
        id:
          type: integer
        started_at:
          type: string
        ended_at:
          type: string
        geolocation:
          $ref: '#/components/schemas/Geolocation'
        ip:
          type: string
        user_agent:
          type: string
        page_referrer:
          type: string
        first_visited_page:
          $ref: '#/components/schemas/Page'
        pages:
          type: array
          items:
            $ref: '#/components/schemas/Page'
    MonitoringState:
      type: string
      enum:
        - ''
        - browsing
        - queued
        - invited
        - chatting
        - chat closed
        - offline
    Address:
      type: object
      properties:
        address:
          type: string
        city:
          type: string
        country:
          type: string
        state:
          type: string
        postal_code:
          type: string
    TicketSilo:
      type: string
      enum:
        - inbox
        - archive
        - spam
        - trash
    OmnichannelFBMessenger:
      type: object
      required:
        - id
        - is_verified_user
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        profile_pic:
          type: string
          format: url
        gender:
          type: string
        locale:
          type: string
        is_verified_user:
          type: boolean
    OmnichannelTwilio:
      type: object
      required:
        - phone_number
      properties:
        phone_number:
          type: string
    OmnichannelWhatsApp:
      type: object
      required:
        - id
        - phone_number
      properties:
        id:
          type: string
        name:
          type: string
        phone_number:
          type: string
    OrderLineItem:
      type: object
      required:
        - title
        - quantity
        - price
      properties:
        title:
          type: string
        quantity:
          type: integer
        price:
          type: number
          format: double
        sku:
          type: string
        variant_id:
          type: string
        product_id:
          type: string
    CartItem:
      type: object
      required:
        - id
        - quantity
        - variant_id
      properties:
        id:
          type: integer
          format: int64
        quantity:
          type: integer
        variant_id:
          type: integer
          format: int64
        discounts:
          type: array
          items:
            type: string
    Geolocation:
      type: object
      required:
        - latitude
        - longitude
        - country
        - country_code
        - region
        - city
        - timezone
      properties:
        latitude:
          type: string
        longitude:
          type: string
        country:
          type: string
        country_code:
          type: string
        region:
          type: string
        city:
          type: string
        timezone:
          type: string
    Page:
      type: object
      required:
        - id
        - started_at
        - url
        - title
        - group_ids
      properties:
        id:
          type: integer
        started_at:
          type: string
        url:
          type: string
        title:
          type: string
        group_ids:
          type: array
          items:
            type: integer
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes: {}
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes: {}

````