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

Last updated