Skip to main content

Overview

Use the API described below to link two different identifiers from within your application. The hostname for the API can be retrieved by clicking the App from within Snowflake: Data Products > Apps > Winning Variant Experimentation. The hostname for “Variant API” is the one you’ll use. POST /id-link Use this endpoint to link two different identifiers.

Request Body

The request accepts a JSON-formatted body with the following parameters:
ParameterTypeRequiredDescription
identifiersIdentifer[]YesList of identifiers to link together. Length must be exactly 2.
Identifier The identifer object in the body includes the following properties:
ParameterTypesRequiredDescription
subject_typestringYesThe subject type defined in your app configuration.
subject_idstringYesID for the subject that you want to link another to.

Response

Upon success, returns a 200 status code with response { "success": true }.

Examples

Link an anonymous ID to a customer ID In this example, we link an ID for subject type ANONYMOUS_ID to an ID for subject type CUSTOMER_ID (both subject types already exist).
POST /id-link
Content-type: application/json
Accept: application/json
{
  "identifiers": [{
    "subject_type": "CUSTOMER_ID",
    "subject_id": "ce0fb767-27de-477d-bebc-064dd724bb0b"
  }, {
    "subject_type": "ANONYMOUS_ID",
    "subject_id": "58865777-783b-4f41-9be4-a09afbaf187b"
  }]
}

Response:
{
  "success": true
}

Public Access

To learn how you can access these services from outside of Snowflake, read more here.