Tracking API

Event name and properties should have the same schema each time (same fields in properties).

It is possible to contain many types of events in 1 batch, but the number of event types in the same batch should not be too much.

Supported data types: string, int, long, double

Method: POST

Path:

https://[client].datainsider.co/api/tracking/warehouse/track

Sample request:

curl --request POST \
  --url https://[client].datainsider.co/api/tracking/warehouse/stream \
  --header 'Content-Type: application/json' \
  --data '{
    "api_key": "cccccccc-14a1-4eb1-8964-000000000000",
    "events": [
   	 {
   		 "db_name": "demo",
   		 "tbl_name": "purchase",
   		 "properties": {
   			 "card_number": "1123123-123123-1232135",
   			 "order_id": 123123,
   			 "user_id": "ng-van-a-1999",
   			 "user_device": "iphone xs",
   			 "item": "mac pro 2020",
   			 "total_price": 1999,
   			 "created_time": 1627379100000
   		 }
   	 },
   	 {
   		 "db_name": "demo",
   		 "tbl_name": "purchase",
   		 "properties": {
   			 "card_number": "1123123-123123-1232135",
   			 "order_id": 123123,
   			 "user_id": "ng-van-a-1999",
   			 "user_device": "macbook pro",
   			 "item": "ipad pro 2020",
   			 "total_price": 999,
   			 "created_time": 1627379110000
   		 }
   	 },
   	 {
   		 "db_name": "demo",
   		 "tbl_name": "view_product",
   		 "properties": {
   			 "user_id": "ng-van-a-1999",
   			 "start_time": 1627379101263,
   			 "end_time": 1627379200000,
   			 "total_product_views": 123,
   			 "is_checkout_out": true
   		 }
   	 }
    ]
}'

Sample response:

{
  "success" : true
}

Last updated