Skip to main content
POST
/
objects
/
{object_name}
/
find-unique
cURL
curl --request POST \
  --url https://api.unifygtm.com/data/v1/objects/{object_name}/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, such as finding a company by domain or a person by 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/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/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/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. Each key is the API name of the attribute and each value is the corresponding attribute value to match.

Response

Response for a successful get operation.

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