Sales order injection
When a customer buys on your channel, you send that order into Zentail so the seller can fulfil it. Zentail calls these sales orders.
Only a v1 route exists for injecting an order, so every call on this page is v1. That is the current API for this task, not a legacy one.
What you’ll build
Section titled “What you’ll build”A step in your order flow that sends each new order to the seller who should fulfil it, and releases it for fulfilment once payment clears.
Before you start
Section titled “Before you start”- You know which seller fulfils the order, and you hold that seller’s access token. Use it for every call below. See Authentication.
1. Send the order
Section titled “1. Send the order”Send the order to
POST /v1/salesOrder.
The reference page lists every field. The required ones are channelOrderId,
customerName, payment, status and products.
- Set
statustoPENDINGorPENDING_PAYMENT. UsePENDINGwhen the order has cleared payment. UsePENDING_PAYMENTwhen it has not: Zentail then reserves the inventory for a short period but takes no fulfilment action. - Leave out
integrationId. Zentail ignores it on a call from a registered application, so you don’t need to send it. - Send the commission, if you can. Put the commission your channel charged on the
order in
resellerCommission. It lets the seller see what they really earn on your channel.
The response is the order as Zentail stored it. Keep its orderNumber, the Zentail order
number: the next step and every other order call take it.
2. Mark the order paid
Section titled “2. Mark the order paid”Skip this step for an order you sent as PENDING.
For a PENDING_PAYMENT order, call
POST /v1/salesOrder/markPaid/{orderNumber}
once payment clears. That moves the order to PENDING, and Zentail starts fulfilling it.
Related routes
Section titled “Related routes”These v1 routes act on an order you have already sent. Only a v1 route exists for each of them.
POST /v1/salesOrder/accept/{orderNumber}: mark the order accepted for fulfilment.POST /v1/salesOrder/{orderNumber}/alert: raise or resolve an alert that tells the seller about a problem with the order.POST /v1/salesOrder/{orderNumber}/confirmStatus: confirm that your channel received a status change Zentail started. Don’t use it to cancel or ship an order.
Learn when the order ships in Order fulfillment retrieval.
API changelog · Built 0c509dd3