Skip to main content
POST
/
objects
/
{object_name}
/
records
/
find-unique
cURL
curl --request POST \
  --url https://api.unifygtm.com/data/v1/objects/{object_name}/records/find-unique \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "match": {}
}'
{
  "status": "success",
  "data": {
    "object": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "attributes": {}
  }
}

Overview

The find unique method searches for a single record based on one or more unique attribute values. The response will contain exactly zero or one record. This method is useful when you need to find a record by its unique identifier other than the record ID. For example, you can use it to find a company by its domain or a person by their email address. If you have custom objects with unique identifiers, this method can be used to locate records based on those unique attributes.

Examples

This finds a company record by its unique domain:
POST /objects/company/records/find-unique

{
  "domain": "unifygtm.com"
}
This returns the company for Unify if it exists, otherwise the response will contain null for the record.
This finds a record in a custom object by a unique identifier:
POST /objects/product_user/records/find-unique

{
  "user_id": "Zz9O-5O8W-s41T"
}
This finds a custom object record using a combination of unique and non-unique attributes:
POST /objects/product_user/records/find-unique

{
  "user_id": "Zz9O-5O8W-s41T",
  "email": "alice@example.com",
  "product_code": "PRO-PLAN"
}
In this case, the custom attributes user_id and email are unique, but product_code is not. Only a record which matches all of these criteria will be returned.

Usage

Authorizations

x-api-key
string
header
required

Path Parameters

object_name
string
required

Body

application/json

Request body for finding a unique record by attribute values.

match
object
required

The attribute values to match against to find an existing record.

At least one unique attribute must be included to ensure that at most one record is matched. Additional unique or non-unique attributes may also be included to refine the matching criteria.

Response

Response for a successful get operation.

Response for a successful get operation.

status
enum<string>
required
Available options:
success
data
object
required