Skip to content

Outbound orders

One JSON request creates one order immediately — built for a live checkout flow. Every endpoint here uses the x-access-key / x-secret-key headers, not the bearer token.

POST /api/web/orders

Creates one outbound order. Resubmitting the same orderNumber is safe — you’ll get back the order that was already created instead of a duplicate, so it’s safe to retry on a timeout.

Field Type Notes
orderNumber string required — your own order reference; also the idempotency key
warehouseCode string optional — omit to use the warehouse configured for your account
destinationName string required — recipient name
destinationAddress string required
destinationPhone string optional
destinationEmail string optional — must be a valid email format if present
destinationPostcode string optional
note string optional
orderDate string (ISO 8601) optional — when the customer placed the order on your side; defaults to when we receive this request
paymentDate string (ISO 8601) optional — when payment was confirmed on your side
pickupTime string (ISO 8601) optional — requested courier pickup time
courier string optional — only if you already know it at creation time; otherwise set it later via Attach shipping label
awb string optional — same as courier, set now or later
shippingType string optional — courier service type, e.g. REG, YES, INSTANT; set now or later via Attach shipping label. Use one fixed spelling per type (letter case doesn’t matter).
items array required, at least 1 item — see below

Each entry in items:

Field Type Notes
sku string required — your product SKU, same value Get stock returns
qty number required, whole number, at least 1
Terminal window
curl -X POST 'https://api.wms.restock.tech/api/web/orders' \
-H 'x-access-key: <your access key>' \
-H 'x-secret-key: <your secret key>' \
-H 'Content-Type: application/json' \
-d '{
"orderNumber": "PERSIJA-ORD-10245",
"destinationName": "Jane Doe",
"destinationAddress": "Jl. Sudirman No. 1, Jakarta",
"destinationPhone": "081234567890",
"destinationPostcode": "12190",
"orderDate": "2026-08-24T10:15:00.000Z",
"paymentDate": "2026-08-24T10:16:30.000Z",
"items": [
{ "sku": "JERSEY-HOME-M", "qty": 2 },
{ "sku": "SCARF-01", "qty": 1 }
]
}'
{
"success": true,
"code": 201,
"message": "",
"errors": [],
"data": {
"outboundId": "a1b2c3d4-...",
"orderNumber": "PERSIJA-ORD-10245",
"status": "PENDING"
}
}

Save outboundId — it’s how Restock ops identifies this order internally if you need to ask about it. status is one of the order statuses; a resubmitted orderNumber returns the order’s current status.

Cause What you get back
Missing/invalid x-access-key or x-secret-key 401, invalid credentials
Required field missing, or a SKU not found for your account 400, message names the field/SKU
Not enough available stock for one or more lines 400 — the whole order is rejected, not just the short lines; fix and resubmit
warehouseCode given but not one of yours, or no default warehouse configured and none given 400
{
"success": false,
"code": 400,
"data": null,
"errors": ["SKU not found: JERSEY-HOME-M"],
"message": "SKU not found: JERSEY-HOME-M"
}

POST /api/web/orders/shipping-label

Once you’ve handed the order to a courier, submit the courier name and AWB (tracking) number — or update them if you already sent a value at creation and it’s changed. This is what lets Restock ops mark the order shipped — completion is blocked until an AWB is on file. Safe to call more than once for the same order; each call overwrites the previous value.

Field Type Notes
orderNumber string required — the same reference you used to create the order
courier string required — courier name, e.g. JNE
awb string required — tracking/AWB number
shippingType string optional — courier service type, e.g. REG, YES, INSTANT. Printed as “Layanan” on the shipping label and used to batch picking, so use one fixed spelling per type (letter case doesn’t matter). Omit it to keep the value sent at order creation.
Terminal window
curl -X POST 'https://api.wms.restock.tech/api/web/orders/shipping-label' \
-H 'x-access-key: <your access key>' \
-H 'x-secret-key: <your secret key>' \
-H 'Content-Type: application/json' \
-d '{
"orderNumber": "PERSIJA-ORD-10245",
"courier": "JNE",
"awb": "JNE1234567890",
"shippingType": "YES"
}'
{
"success": true,
"code": 200,
"message": "",
"errors": [],
"data": {
"outboundId": "a1b2c3d4-...",
"orderNumber": "PERSIJA-ORD-10245",
"status": "READY_TO_SHIP"
}
}
  • 400 if orderNumber doesn’t match any order created on your account. No PDF/label file needed — just the courier and AWB.
  • status is the order’s current status (usually READY_TO_SHIP, or PROCESSING if you attach the label early).
  • Attaching a label does not send a status webhook by itself, because the order’s status doesn’t change. The courier and AWB appear in the next status update, and in Get order right away.

GET /api/web/orders/:orderNumber

Returns the current state of one of your orders, in the same shape as the status webhook’s data. Use it on startup, or after your endpoint was down, to catch up — apply the same version rule as for webhooks.

Terminal window
curl 'https://api.wms.restock.tech/api/web/orders/PERSIJA-ORD-10245' \
-H 'x-access-key: <your access key>' \
-H 'x-secret-key: <your secret key>'
{
"success": true,
"code": 200,
"message": "",
"errors": [],
"data": {
"timestamp": "2026-09-30T03:05:00.000Z",
"data": {
"outboundId": "a1b2c3d4-...",
"orderNumber": "PERSIJA-ORD-10245",
"warehouseCode": "WH-JKT",
"status": "SHIP",
"version": 7,
"awb": "JNE1234567890",
"courier": "JNE"
}
}
}

404 if the order number is not one of your orders.