v1

latestOpenAPI 3.0.32026-07-24235275.4 KB
eCommerce

Add to cart

Make a call to this endpoint when a user adds a product to their shopping cart.

post/events/ecommerce/add-to-cart

Request body

occurredAtstring date-time

Timestamp of when the action occurred in ISO 8601 format. If the timestamp is older than 12 hours, it will not trigger any relevant journeys. If no timestamp is provided, it is assumed the event occurred when the endpoint is called.

Example request

{
  "items": [
    {
      "productId": "AB12345",
      "productVariantId": "CD12345",
      "productImage": "http://my.cdn.com/products/new-product.png",
      "productUrl": "http://my-store.com/products/shirts/my-shirt",
      "name": "T-Shirt",
      "price": [
        {
          "value": 19.99,
          "currency": "USD"
        }
      ],
      "quantity": 1
    }
  ],
  "occurredAt": "2021-03-30T14:38:29+0000",
  "user": {
    "phone": "+13115552368",
    "email": "test@gmail.com"
  }
}

Response

Ok