Repository navigation
Order Statuses
After your ERP imports an order, it reports fulfillment progress back to Selldone by updating the order's
delivery_state. This page lists the states, the request for each step with examples, and how to report a delivery
that came back.
| Field | Values | Meaning |
|---|---|---|
status |
Open, Reserved, Payed, Canceled, COD
|
The payment/checkout status of the order. ERPs usually import Payed (and COD) orders. |
delivery_state |
CheckQueue, OrderConfirm, PreparingOrder, SentOrder, ToCustomer
|
The fulfillment state. This is what your ERP updates. |
POST https://api.selldone.com/shops/{shop-id-here}/process-center/baskets/{order-id-here}/state
Replace {shop-id-here} with your actual shop ID and {order-id-here} with the specific order ID. Send JSON with
Authorization: Bearer <token>.

Selldone defines 5 steps in the order fulfillment process, which you manage by updating the delivery_state
parameter. New orders start in CheckQueue. Each state should be called sequentially after the previous one.
CheckQueue → OrderConfirm → PreparingOrder → SentOrder → ToCustomer (optional)
This step indicates that the order has been reviewed and confirmed.
Parameters:
-
state:OrderConfirm -
list: An array ofitem.ids that are confirmed. If you cannot fulfill an item, do not include its ID in this list. This helps the merchant understand how much to refund to the buyer in the Selldone panel.nullmeans all items are confirmed.
curl -X POST "https://api.selldone.com/shops/12345/process-center/baskets/67890/state" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer abcdef123456" \
-d '{
"state": "OrderConfirm",
"list": [23990, 23991]
}'Response 200:
{
"delivery_state": "OrderConfirm",
"updated": 2,
"changed": true,
"items": [
{
"id": 23990,
"basket_id": 15002,
"product_id": 2346,
"variant_id": null,
...
},
...
]
}At this stage, you set packaging information and indicate that the order is ready to ship (e.g., ready for courier pickup).
Parameters:
-
state:PreparingOrder -
delivery_info: If there are no changes todelivery_info, send the originalorder.delivery_infoin this parameter.nullmeans no changes.
curl -X POST "https://api.selldone.com/shops/12345/process-center/baskets/67890/state" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer abcdef123456" \
-d '{
"state": "PreparingOrder",
"list": null,
"delivery_info": {
"distance": 11312.99,
"volume": {
"width": 0,
"length": 0,
"height": 0
},
"weight": 0,
"days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Saturday"],
"time_spans": ["Morning", "Evening"],
"custom": false,
"type": "Cargo",
"connect_delivery": 0,
"inbound_delivery": 2,
"outbound_delivery": 0,
"vendor_delivery": 0,
"date": null
}
}'Response 200:
{
"delivery_state": "PreparingOrder",
"changed": true
}The delivery_info fields are described in Response Structure.
Use this when the order has been shipped (e.g., handed over to DHL).
Parameters:
-
state:SentOrder
curl -X POST "https://api.selldone.com/shops/12345/process-center/baskets/67890/state" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer abcdef123456" \
-d '{
"state": "SentOrder",
"list": null,
"delivery_info": null
}'Response 200:
{
"delivery_state": "SentOrder",
"changed": true
}After shipping, set the tracking information.
(Optional) This step indicates that the buyer has received their order.
Parameters:
-
state:ToCustomer
curl -X POST "https://api.selldone.com/shops/12345/process-center/baskets/67890/state" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer abcdef123456" \
-d '{
"state": "ToCustomer",
"list": null,
"delivery_info": null
}'Response 200:
{
"delivery_state": "ToCustomer",
"delivery_at": "2024-10-31T15:32:07.000000Z",
"changed": true
}If the shipping fails and the order is returned, send a POST request to the following endpoint:
POST https://api.selldone.com/shops/{shop-id-here}/process-center/baskets/{order-id-here}/delivery-returned
-
Sequential updates: Each state should be called after the previous state. For example, you should only send
SentOrderifPreparingOrderhas already been called. - ERP limitations: If your ERP system does not support multi-step fulfillment processes, you can create multiple API calls in a series to update the order status to the final state.
Example: move an order from CheckQueue to SentOrder in one go:
async function setState(shopId, orderId, token, body) {
const res = await fetch(
`https://api.selldone.com/shops/${shopId}/process-center/baskets/${orderId}/state`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify(body),
}
);
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
return res.json();
}
await setState(shopId, orderId, token, { state: "OrderConfirm", list: null });
await setState(shopId, orderId, token, { state: "PreparingOrder", list: null, delivery_info: null });
await setState(shopId, orderId, token, { state: "SentOrder", list: null, delivery_info: null });Update Order Demo: enter the shop ID, token and order
ID, choose a state and click Update Order. You can prefill the IDs with
?shopId=<shop_id>&orderId=<order_id>.