Transaction Events — deprecated

Transaction Events — deprecated

⚠️
Described here are old endpoints for sending transaction events (purchase, cart, wishlist). We recommend using the new /v1/ev/transaction endpoint, which handles all transaction types in one place.

Purchase and Adding a Product to Cart/Wishlist — deprecated

Events sent after user interactions that can be attributed to an advertising campaign. Send all such events: determining whether a particular event (like purchasing a product or adding to a cart) is related to any advertising campaign is the responsibility of AdsHero.

The parameters eventId, brand and sellerId in the JSON describing the product are optional for events of this type. Nevertheless, sending eventId is strongly recommended as it is used for detecting duplicate events and thanks to it, the calculated attribution values will not be inflated.

For these events, there is a different domain they should be sent to: event-dispatcher.ahevds.com instead of dispatcher.ahevds.com.

Purchase

POST https://event-dispatcher.ahevds.com/v1/events/purchase HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}

{
  "shopId": "string",
  "currency": "string",
  "products": [
    {
      "shopProductId": "string",
      "productTitle": "string",
      "price": 102.54,
      "quantity": 0,
      "brand": "string",
      "sellerId": "string"
    }
  ],
  "eventId": "string"
}
curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/purchase' \
    --header 'Content-Type: application/json' \
    --header 'cid: {cid}' \
    --header 'uid: {uid}' \
    --data '{
      "shopId": "string",
      "currency": "string",
      "products": [
        {
          "shopProductId": "string",
          "productTitle": "string",
          "price": 102.54,
          "quantity": 0,
          "brand": "string",
          "sellerId": "string"
        }
      ],
      "eventId": "string"
    }'

Adding to cart

POST https://event-dispatcher.ahevds.com/v1/events/cart HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}

{
  "shopId": "string",
  "currency": "string",
  "products": [
    {
      "shopProductId": "string",
      "productTitle": "string",
      "price": 102.54,
      "quantity": 0,
      "brand": "string",
      "sellerId": "string"
    }
  ],
  "eventId": "string"
}
curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/cart' \
    --header 'Content-Type: application/json' \
    --header 'cid: {cid}' \
    --header 'uid: {uid}' \
    --data '{
      "shopId": "string",
      "currency": "string",
      "products": [
        {
          "shopProductId": "string",
          "productTitle": "string",
          "price": 102.54,
          "quantity": 0,
          "brand": "string",
          "sellerId": "string"
        }
      ],
      "eventId": "string"
    }'

Adding to wishlist

POST https://event-dispatcher.ahevds.com/v1/events/wishlist HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}

{
  "shopId": "string",
  "currency": "string",
  "products": [
    {
      "shopProductId": "string",
      "productTitle": "string",
      "price": 102.54,
      "quantity": 0,
      "brand": "string",
      "sellerId": "string"
    }
  ],
  "eventId": "string"
}
curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/wishlist' \
    --header 'Content-Type: application/json' \
    --header 'cid: {cid}' \
    --header 'uid: {uid}' \
    --data '{
      "shopId": "string",
      "currency": "string",
      "products": [
        {
          "shopProductId": "string",
          "productTitle": "string",
          "price": 102.54,
          "quantity": 0,
          "brand": "string",
          "sellerId": "string"
        }
      ],
      "eventId": "string"
    }'