v1

latestOpenAPI 3.0.02026-07-26173440.3 KB
Send Event

Add to Cart

Records that a user has added an item to their cart

post/events/add-to-cart

Request body

itemIdstring required

The unique identifier for the item as defined by the partner. This represents the parent identifier for the item. For example, if you sell similar shirts, they may have the same parent id, but a different sku for each size / color combination

skustring

The SKU of the item as defined by the partner. This represents the child identifier for the item. For example, if you sell similar shirts, they may have the same parent id, but a different sku for each size / color combination. This is optional, but should be included if available.

cartTokenstring required

The unique identifier for the cart as defined by the partner. Contains the value of the cart cookie on the platform. Only needed for cookie based cart replenishment

extraobject required

Any additional attributes, may be passed empty.

agentstring required

The agent from which the event was sent

timestampstring int64 required

The timestamp of the event in milliseconds since the unix epoch

websiteIdstring int64 required

The unique identifier for the website as provided by Wunderkind

Example request

{
  "identification": {
    "userIdentification": {
      "email": "example@wunderkind.co",
      "emailSha256": "b207c7ffcd083b51d3554a4190a083a0bc3df51d04c46906b517585f772c68f7",
      "phone": "+18885551212",
      "phoneSha256": "4b678bd4c8a72e7f740ce58900a1a07f7b13fab8627b0aabb31e39abbe429988",
      "partnerId": "partner123"
    },
    "deviceIdentification": {
      "ipAddress": "192.168.0.1",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
    },
    "profile": {
      "firstName": "John",
      "lastName": "Doe",
      "address": "123 Main St",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US"
    },
    "location": {
      "timezoneOffset": -5,
      "latitude": 40.7128,
      "longitude": -74.006
    }
  },
  "itemId": "123456",
  "sku": "SKU123",
  "cartToken": "123456",
  "extra": {
    "color": "red",
    "size": "large"
  },
  "agent": "partner:mparticle"
}

Response

A successful response.

successboolean

Success

messagestring

Message