Overview

The TTO CDP HTTP API is an open data collection interface that allows external systems to send user behavior data and user profile data to the TTO Customer Data Platform (TTO CDP) via the HTTP protocol. This API conforms to the standard Event Tracking specification and supports core functions such as user identification, event tracking, and user alias management.

getting Started

Get API Key

  1. Access your TTO CDP backend, go to My Sources , and select Add Source using the plus sign.

  1. Select the HTTP API source.

  1. Fill in the basic information and save. After successful creation, the system will automatically generate a unique API key.

Note: When sending data to TTO CDP via API, the API key field must be added to the request body. See the following documentation for details.

Data collection interface

Base URL: https://cdp.cs.topkee.com

path

Request method

use

/v1/track

POST

Used to track specific user behavior events on a website or application.

/v1/identify

POST

Identify users and update user profile information.

/v1/alias

POST

Merging different user identities solves the problem of users having multiple devices and multiple identities.

/v1/settings

POST

Retrieve data source configuration information.

Push data using API

API Overview

Common Field Description

field name

illustrate

type

Event type, indicating the operation type (track/identify/alias)

api_key

Project API key, used for authentication and data ownership.

msg_id

A unique identifier for messages, used for deduplication and log clocking.

user_id

External platform user ID, used for deduplication and log tracking.

anonymous_id

Anonymous ID, stored in the visitor's browser, is valid for 2 years.

timestamp

Event timestamp (seconds)

context

Contextual information, including metadata such as device, page, and traffic source.

Data fields

  1. traits : Optional, please refer to the standard field information.

 { "email": "Email address", "phone": "Phone number (with area code, eg US phone (650)555-1212 should be 16505551212)", "first_name": "First name (lowercase az, no punctuation, eg Mary becomes mary)", "last_name": "Last name (lowercase az, no punctuation)", "date_date": "Birth date (YYYYMMDD, eg 19970216)", "gender": "Gender (f for female, m for male)", "city": "City (lowercase letters only, no punctuation, special characters or spaces: newyork, london)", "state": "State/Province (please enter 2-character ANSI abbreviation code in lowercase: az, ca)", "zip_post": "ZIP code (no spaces or hyphens)", "country": "Country (lowercase letters: hk, us)", "ip": "Valid IP address", "avatar": "Avatar", "name": "Full name", "username": "Username", "title": "Job title", "description": "Description", "company": "Company", "website": "Website", "address": "Address", "id": "External data primary key ID", "age": "Age", "created_at": "User creation time" }
  1. properties : Optional. Note: Income|Currency|values are standard event properties; other keys are custom.

 { "currency": "HKD", "value": 20.24, "key1": "diy 1" }
  1. Products: Used in e-commerce website scenarios

 [{ "id": "Product ID", "name": "Product name", "price": "Product price", "currency": "Currency", "affiliation": "Product associated store", "coupon": "Coupon", "discount": "Discount", "index": "Product index position in list", "category": "Product category", "category2": "Product secondary category", "category3": "Product tertiary category", "category4": "Product quaternary category", "category5": "Product quinary category", "brand": "Brand", "variant": "Variant", "quantity": "Quantity", "list_id": "List ID", "list_name": "List name", "location_id": "Location (eg physical store)", }] 

Push event data Track

illustrate

The track is the core data collection endpoint in TTO CDP, used to record specific user behavior events on websites, applications, or services.

Interface information

Request URL: https://cdp.cs.topkee.com/v1/track

Request method: POST

Request parameters

Fields

type

must

describe

event

STRING

yes

Event name, such as "Purchase", "PageView", etc.

properties

STRING

yes

Event attributes contain business-related data; see the attribute documentation for details.

traits

STRING

yes

User profile information, including profile data such as email and phone number.

Request Example

 curl -X 'POST' \ 'https://cdp.cs.topkee.com/v1/track' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "type": "track", "api_key": "your_api_key_here", "msg_id": "unique_message_id_123", "user_id": "user_12345", "event": "Purchase", "properties": { "revenue": 299.99, "currency": "USD", "product_id": "PROD_001" }, "timestamp": "1767174918", "traits": { "name": "alelos", "email": "1234567@123.com", "phone": "12345678" } }' 

Identify user information

Interface Description

The identify interface is used to identify users and update user profile information to build a complete user profile.

Request information

Request URL: https://cdp.cs.topkee.com/v1/identify

Request method: POST

Request parameters

Fields

type

must

describe

traits

OBJECT

yes

User profile information, including profile data such as email and phone number.

Request Example

 curl -X 'POST' \ 'https://cdp.cs.topkee.com/v1/identify' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "type": "identify", "api_key": "your_api_key_here", "msg_id": "unique_identify_id_456", "user_id": "user_12345", "traits": { "email": "user@example.com", "name": "張三", "phone": "8613812345678", "company": "示例公司" }, "timestamp": "1767174918" }' 

Alias (manage user)

Interface Description

alias interface is used to merge different user identities, solving the problem of users having multiple devices and multiple identities.

Request information

Request URL: https://cdp.cs.topkee.com/v1/alias

Request method: POST

Request parameters

Fields

type

must

describe

previous_id

STRING

yes

Existing user identity identifier

Request Example

 curl -X 'POST' \ 'https://cdp.cs.topkee.com/v1/alias' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "type": "alias", "api_key": "your_api_key_here", "msg_id": "unique_alias_id_789", "user_id": "registered_user_123", "previous_id": "anonymous_session_456", "timestamp": "1767174918" }' 

Query Project Configuration Settings

Interface Description

settings interface is used to query configuration information for a specified project, including data source settings and destination configuration.

Request information

Request URL: https://cdp.cs.topkee.com/v1/settings

Request method: POST

Request parameters

No special request parameters.

Request Example

 curl -X 'POST' \ 'https://cdp.cs.topkee.com/v1/settings?api_key=your_api_key_here' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' 

answer

For detailed request and response structures, as well as API testing, please refer to the API documentation: TTO CDP API - Swagger

null
Solution
Online retail
B2B
Law and Accounting
O2O retail
Restaurant
Venue rental
Live retail
Education
Property and Real estate
Finance insurance
Pet
Engineering and Transportation
Medical beauty
Jewelry
Car repair
Solution
Online retail
B2B
Law and Accounting
O2O retail
Restaurant
Venue rental
Live retail
Education
Property and Real estate
Finance insurance
Pet
Engineering and Transportation
Medical beauty
Jewelry
Car repair
TTO FROM TOPKEE's BRANDS
© 2024 Topkee All rights reserved