Batch (create)
TEST environment
TEST environment
POST
https://{{BASE_DOMAIN}}/a2/test
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://dre2.yourdomain.com/a2/test/mp4/collect?measurement_id&api_secret=&id=' \
--header 'X-Dre-Access-Token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": "string",
"user_id": "string",
"events": [
{
"name": "purchase",
"params": {
"currency": "string",
"value": 0.59,
"coupon": "string",
"tax": 0,
"transaction_id": "string",
"items": [
{
"item_id": "string",
"item_group_id": "123456",
"item_sku": "123456",
"item_group_sku": "string",
"item_name": "string",
"item_variant": "string",
"item_brand": "No Brand",
"item_category": "Shoes",
"item_category2": "string",
"item_category3": "string",
"item_category4": "string",
"item_category5": "string",
"currency": "RON",
"price": 12.34,
"discount": 0,
"coupon": "string",
"item_tax_percent": 0,
"quantity": 1,
"item_stock_status": "true",
"index": 1
}
],
"event_source": "website",
"event_location_name": "string",
"shipping": 0,
"shipping_tier": "string",
"shipping_warehouse_name": "string",
"payment_type": "string",
"ip_override": "string",
"session_id": "string",
"user_agent": "string"
}
}
],
"user_data": {
"email": "test@example.com",
"sha256_email_address": "a8af8341993604f29cd4e0e5a5a4b5d48c575436c38b28abbfd7d481f345d5db",
"phone_number": "+40744123123",
"sha256_phone_number": "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b",
"address": {
"first_name": "John",
"sha256_first_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
"last_name": "Doe",
"sha256_last_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
"country": "RO",
"region": "string",
"city": "Bucuresti",
"street": "string",
"postal_code": "700000"
}
},
"user_properties": {
"custom_user_property_name": {
"value": "string"
},
"second_user_property_name": {
"value": "string"
}
},
"consent": {
"ad_user_data": "GRANTED",
"ad_personalization": "GRANTED"
}
}'
Response Response Example
{}
Request
Query Params
measurement_id
string
optional
api_secret
string
required
Default:
{{X_DRE_ACCESS_TOKEN}}
id
string
required
Default:
{{SCRIPT_ID}}
Match pattern:
^[A-Z0-9]{8}$
Header Params
Content-Type
string
required
Default:
application/json
X-Dre-Access-Token
string
required
Default:
{{X_DRE_ACCESS_TOKEN}}
Body Params application/json
Responses
Modified at 2024-04-11 20:00:56