Siren

Report a Sale

POST /event/sale — create a SaleTriggered event from an external commerce system.

Requires Siren Essentials

Last updated: April 30, 2026

POST /siren/v1/event/sale

Creates a SaleTriggered event from a checkout that did not run through a Siren-aware WordPress commerce extension. Used by the Siren Connect plugin and by custom bridges that route sales from an external commerce stack into Siren’s attribution pipeline.

The endpoint is purpose-built for the connector format. If you are integrating a new commerce platform from scratch, prefer building a Siren extension that fires SaleTriggered directly from the platform’s webhook — the request shape here is constrained to the connector’s payload, not a general-purpose sale envelope.

Request Body:

FieldTypeRequiredDescription
sourcestringYesIdentifier of the originating system — e.g., "woocommerce", "shopify". Used as the event source and to derive the binding type (<source>_order).
externalIdstringYesThe order or transaction ID in the originating system. Used as the binding ID for refund matching.
totalnumericYesOrder total. Multiplied by 100 internally to land in the smallest currency unit, so pass dollars as a decimal (e.g., 49.99).
trackingIdintegerYesThe opportunity ID from the visitor’s earlier site-visit tracking. Becomes the event’s opportunityId.
currencystringNoISO currency code. Defaults to USD if omitted.
itemsarrayNoLine items: [{ externalId, name, quantity, amount }]. If provided, each item becomes a transaction detail entry; if omitted, a single Order line with the total is created.

Example Request:

POST /wp-json/siren/v1/event/sale
Content-Type: application/json

{
  "source": "shopify",
  "externalId": "ORD-1004",
  "trackingId": 4218,
  "total": 49.99,
  "items": [
    { "externalId": "SKU-1", "name": "Annual Plan", "quantity": 1, "amount": 49.99 }
  ]
}

Example Response:

HTTP/1.1 200 OK
X-Siren-OID: 4218
Access-Control-Expose-Headers: X-Siren-OID

Empty body. The X-Siren-OID header echoes the resolved opportunity ID.

Internally this fires SaleTriggered, which kicks off the standard conversion pipeline: programs are evaluated, conversions are awarded, and obligations are issued. See the attribution pipeline for what happens after.