novinzodevelopers
API referenceCore for pluginsSales

Record Sales

POST/api/sales/entries

Records sales the calling plugin made for the store outside its checkout, at most 100 a call, which the dashboard adds to the store's revenue on the day each occurred. A sale in another currency than the store's is kept but, like an order in an earlier store currency, not added. Idempotent per ref, so a report can be retried whole; a ref already recorded as another sale is refused with SaleRefReused, and a sale dated more than a day ahead with SaleDatedAhead, each recording nothing of the report. Requires the store to have granted the plugin sales:write.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

sales*array<>
Items1 <= items <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/sales/entries" \  -H "Content-Type: application/json" \  -d '{    "sales": [      {        "ref": "string",        "occurredAt": "string",        "amountMinor": -9007199254740991,        "currency": "AED"      }    ]  }'
Empty