Cubu Docs
S2S API Guide
S2S API Guide
  • About Cubu Server-to-Server API
  • Accessing the API
  • Agent Impersonation API
    • Call Again
    • Clock-in
    • Clock-out
    • Get Agent Status
    • List Active Cases
    • List Inboxes
    • List Workspaces
    • List Workstations
    • Occupy a Workstation
    • Resolve a Case
    • Select Current Unit
    • Start Processing the Next Case
    • Change Status to Available
    • Change Status to Unavailable
    • Vacate a Workstation
  • Appointments Management API
    • Book Appointment
    • Cancel Appointment
    • List Appointments in Calendar
    • List Calendars of a Service
    • List Vacancies in a Calendar
  • Case Management API
    • Queue Up
  • Customer Management API
    • Create a Customer Record
    • Get Customer Record
    • Update a Customer Record
    • Find a Customer Record
  • Organization API
    • List Back-office tasks
    • List Users
Powered by GitBook
On this page
  • URL
  • Headers
  • Request Body
  • Response
  • See Also
  1. Customer Management API

Find a Customer Record

Finds a customer record using the record ID or key field.

This endpoint requires the Customers Manager role.

URL

POST: https://[base-url]/{applicationId}/customers/query

This method returns a single customer record.

When the "queryType" parameter is set to "KeyField", the method looks for a customer record using the specified key field. In this case, recordId is required.

When queryType is set to "RecordId", the method returns the customer record using the specified recordId. In this case, fieldSlug and fieldValue are required.

Headers

Authorization: Bearer <accessToken>

Request Body

  • queryType (required): Indicates how to query the customer's table. Supported values: "RecordId" and "KeyField".

  • recordId (GUID): The ID of the record to fetch. Required when query type is "RecordId".

  • fieldSlug (text), The slug of the key field to use. Required when query type is "KeyField".

  • fieldValue: (text), The field value to search.

Response

Success -> 200

Sample response:

{
    "recordId": "9cf609f4-bdb8-48b6-9215-0692d33e0c9e",
    "displayName": "Tim Allen",
    "dateCreated": "2022-11-28T13:22:16.758766Z",
    "dateUpdated": "2023-07-07T06:15:17.775647Z",
    "fields": [
        {
            "fieldTypeId": "8f7db960-d071-47ec-8299-3d56b1b2e45e",
            "dataType": "Text",
            "fieldName": "First Name",
            "slug": "customer-first-name",
            "isKey": false,
            "isRequired": false,
            "data": {
                "displayText": null,
                "text": null
            },
            "value": null,
            "hash": "4fJWbiZot9Pu2VhWOiWkMg==",
            "colorCode": null,
            "position": 1
        },
        ...
    ]
}

See Also

PreviousUpdate a Customer RecordNextOrganization API

Last updated 6 months ago