Record that a user added a product to the cart.
Overview
Use the Cart Analytics API to record an add-to-cart action.
Endpoint
| Method | Path |
|---|
POST | /api/v2/conversion/cart |
Request body parameters
| Parameter name | Requirement | Type | Description |
|---|
oId | required | string | ID of the product added to the cart. |
userToken | optional | string | nullable | Unique for every user session (cookie _athena). Send it if an Athena XAI rendered product is added to the cart. |
additionalData | optional | object | Additional information about the add to cart action: quantity, configurable_super_attribute. |
Example call
| Method | Path |
|---|
POST | {{athena_url}}/api/v2/conversion/cart |
Body raw (JSON)
JSON
{
"token": "website_token",
"oId": "2573655",
"athenaUid": "athena-123-test",
"source": "search",
"channel": "search landing page",
"ip_address": "ip_address"
}
Response
JSON
{
"message":"Cart Analytics was successfully stored.",
"status":200
}