# Find a Customer Record

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

{% hint style="info" %}
This endpoint requires the **Customers Manager** rol&#x65;**.**
{% endhint %}

## 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:

```json
{
    "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

{% content-ref url="/spaces/FaQmpl3dnlIuuQovEhR8/pages/FIaRxOavttJXaLeBcuG6" %}
[Broken mention](broken://spaces/FaQmpl3dnlIuuQovEhR8/pages/FIaRxOavttJXaLeBcuG6)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubu.com/guides/s2s-api-guide/customer-management-api/find-a-customer-record.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
