POST
/
customers
/
search
curl --request POST \
  --url https://api.fabric.inc/v3/customers/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sort": "+firstName,-createdAt",
  "match": {
    "id": {
      "op": "IN",
      "value": "61df41892bf06d00092d0d8a"
    },
    "firstName": {
      "op": "IN",
      "value": "Pat"
    },
    "lastName": {
      "op": "IN",
      "value": "Kake"
    },
    "emailAddress": {
      "op": "IN",
      "value": "pat.kake@example.com"
    },
    "externalId": {
      "op": "IN",
      "value": "1231012312-312-31231asda"
    },
    "createdAt": {
      "op": "LTE",
      "value": "2023-08-30T23:20:42.822Z"
    },
    "updatedAt": {
      "op": "LTE",
      "value": "2023-08-30T23:20:42.822Z"
    },
    "deletedAt": {
      "op": "LTE",
      "value": "2023-08-30T23:20:42.822Z"
    },
    "status": {
      "op": "IN",
      "value": "ACTIVE"
    },
    "additionalAttributes": {
      "op": "IN",
      "value": "beach",
      "key": "gps"
    },
    "isDeleted": false
  },
  "offset": 0,
  "limit": 10
}'
{
  "query": {
    "offset": 0,
    "limit": 20,
    "count": 100
  },
  "data": [
    {
      "id": "61df41892bf06d00092d0d8a",
      "name": {
        "title": "Dr.",
        "firstName": "Pat",
        "middleName": "E",
        "lastName": "Doe",
        "suffix": "Jr."
      },
      "status": "ACTIVE",
      "emailAddress": "test@example.com",
      "phone": {
        "number": 15555551234,
        "type": "MOBILE"
      },
      "externalId": "1231012312-312-31231asda",
      "additionalAttributes": {
        "middleName": "user"
      },
      "isDeleted": false,
      "deletedAt": "2023-08-30T23:20:42.822Z",
      "createdAt": "2023-08-30T23:20:42.822Z",
      "updatedAt": "2023-08-30T23:20:42.822Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token.

Headers

x-fabric-tenant-id
string

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

Example:

"517fa9dfd42d8b00g1o3k312"

x-fabric-request-id
string

A UUID of the request.

Body

application/json
A sample request to search for customers.

The criteria to search for customers.

Response

200
application/json
OK

The list of customers.