Record a placed order and the source and channel of each ordered product.
Overview
Use the Order Analytics API to record a placed order.
Endpoint
| Method | Path |
|---|
POST | /api/v2/conversion/order |
Request body parameters
| Parameter name | Requirement | Type | Description |
|---|
order | required | object | Placed order information. |
userToken | optional | string | nullable | Unique for every user session (cookie _athena). Send it if orders are placed by clicking on an Athena XAI rendered product. |
token | optional | required | Athena XAI website token. |
order.items | required | array of objects | Information about the ordered products. |
order.items.0.source | optional | string | The source that led the user to the add to cart, click or order action. See the possible source values. |
order.items.0.channel | optional | string | The source’s channel, a more detailed explanation of the origin. See the possible channel values. |
Example call
| Method | Path |
|---|
POST | {{athena_url}}/api/v2/conversion/order |
Body raw (JSON)
JSON
{
"token": "website token",
"source" : "search",
"channel" : "search landing page",
"ip_address" : "ip_address",
"order" : {
"quote_id" : 3,
"increment_id" : "000000003",
"store_id" : 1,
"status" : "pending",
"order_currency_code" : "RSD",
"base_grand_total" : 8999.00,
"subtotal_price" : 8999.00,
"tax_price" : 0.0,
"discount_price" : 0,
"shipping_price" : 0,
"items" : [
{
"name" : "Gazelle",
"id" : 2541277,
"sku" : "BB5476",
"type" : "configurable",
"qty" : 1,
"price_incl_tax" : 8999.00,
"price_with_qty_incl_tax" : 8999.00,
"price" : 8999.00,
"row_total" : 8999.00,
“source” : “search”,
“channel” : “search landing page”
}
]
}
}
Response
JSON
{
"message":"Order Analytics was successfully stored.",
"status":200
}