v93

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01218121759.7 KB
Orders

Push order

Pushes a normalized order from any e-commerce platform. Triggers the matching ecommerce.* event (order placed, cancelled, fulfilled, or refunded), updates the customer's revenue attributes (ltv, totalSpent, ordersCount, aov), cancels superseded commerce automations, and schedules replenishment reminders. Processing is asynchronous.

post/orders

Request body

orderIdstring required

Unique order identifier in your platform. Used for idempotency - pushing the same orderId twice never double counts revenue.

orderNumberstring nullable

Human-facing order number, if different from orderId

status'placed' | 'cancelled' | 'fulfilled' | 'refunded'

Lifecycle status of this order event

totalCentsinteger required

Order total in cents

currencystring required

ISO 4217 currency code

orderedAtstring date-time

ISO 8601 timestamp of when the order happened. Defaults to now.

refundAmountCentsinteger nullable

For refunded orders - refunded amount in cents

propertiesobject

Extra event properties to attach to the triggered ecommerce.* event

Example request

{
  "orderId": "order-1001",
  "orderNumber": "1001",
  "totalCents": 8850,
  "currency": "USD",
  "orderedAt": "2026-06-01T12:00:00.000Z",
  "customer": {
    "email": "buyer@example.com",
    "externalId": "user_123",
    "firstName": "Jane",
    "lastName": "Doe",
    "attributes": {
      "acquisitionChannel": "tiktok",
      "country": "US"
    }
  },
  "items": [
    {
      "productId": "SKU-PROTEIN-1KG",
      "variantId": "SKU-PROTEIN-1KG-VANILLA",
      "sku": "VANILLA-1KG",
      "title": "Protein Powder",
      "variantTitle": "Vanilla",
      "quantity": 1,
      "priceCents": 8850
    }
  ],
  "customerTotals": {
    "ordersCount": 5,
    "totalSpentCents": 50000
  }
}

Response

Order queued for processing

successboolean
queuedboolean
jobIdstring
orderIdstring
statusstring

Example response

{
  "success": true,
  "queued": true,
  "orderId": "order-1001",
  "status": "placed"
}