Appearance
Order Feed
We will call your endpoint with the query parameter "cursor" set to the unix timestamp of the previous fetch. For initial fetches, cursor is generally set to 0.
In return we expect all orders that have been updated since that time. If you have more orders than can fit in a single response, you should return a "nextCursor" that we can use to fetch the next batch of orders.
nextCursor must be higher than the cursor we sent you.
If you have no more orders to send, return nextCursor as null.
While there is no upper limit to the response size, our recommendation is to adjust the items per page to be able to reply within a couple of minutes.
The response should be a JSON object like the example below.
Note that all fields are overwritten with the last fetched value, so optional fields must be omitted if they are not included in the feed. Setting them to null, 0, empty array or similar will remove whatever was previously set.
Example Data Structure
json
"nextCursor": 1709547430,
"orders": [
{
"id": "O123",
"orderedAt": "2024-03-04T10:17:00Z",
"completedAt": "2024-03-04T10:17:00Z",
"cancelledAt": null,
"customer": {
"id": "C123",
"type": "guest", // or "member". optional if included in the customer feed
"firstName": "Test", // optional if included in the customer feed
"lastName": "Testsson", // optional if included in the customer feed
"email": "test@example.com" // optional if included in the customer feed
},
"rows": [
{
"quantity": 5,
"unitPrice": "19.90",
"product": {
"id": "SKU123"
}
}
],
"shippingMethod": {
"id": "SM123",
"name": "PostNord"
},
"shippingPrice": "49.00",
"payments": [
{
"method": {
"id": "PM123",
"name": "Klarna"
},
"amount": "148.50"
}
]
}
]
}