v1

latestOpenAPI 3.0.02026-07-26173440.3 KB
Send Event

Order Transaction

Records that a user has completed an order transaction. Must be sent in addition to the page view event.

post/events/order-transaction

Request body

orderIdstring required

The unique identifier for the order as defined by the partner

additionalOrderIdsobject required

Additional order identifiers as defined by the partner. Can be useful if you have a printable order number for the customer, and a distinct one for your backend.

couponCodesstring[] required

The coupon codes applied to the order

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
    }
  },
  "orderId": "123456",
  "additionalOrderIds": {
    "partner_order_id": "123456",
    "shopify_order_id": "8196131534384"
  },
  "total": {
    "amount": 10,
    "currency": "USD"
  },
  "shipping": {
    "amount": 10,
    "currency": "USD"
  },
  "tax": {
    "amount": 10,
    "currency": "USD"
  },
  "discounts": {
    "amount": 10,
    "currency": "USD"
  },
  "couponCodes": [
    "SAVE10",
    "FREESHIP"
  ],
  "items": [
    {
      "itemId": "123456",
      "sku": "SKU123",
      "unitPrice": {
        "amount": 10,
        "currency": "USD"
      },
      "quantity": 2
    }
  ],
  "extra": {
    "color": "red",
    "size": "large"
  },
  "agent": "partner:mparticle"
}

Response

A successful response.

successboolean

Success

messagestring

Message