SalesOrder

Report a buyer's cancel request on a Sales Order

Records a request the buyer made on the sales channel to cancel some or all of an order, keyed on channelCancelId, so the merchant can accept or refuse it in Zentail. Send it with status: PENDING first. A re-send changes nothing except refuseReasons, which are replaced until the merchant answers. Send CANCELLED or CLOSED once the channel settles the request; neither is ever undone. Read the merchant's answer from decision. Every lineItemId is checked first, so one unknown line rejects the whole request with a 400 and writes nothing.

post/salesOrder/{orderNumber}/buyerCancelRequest

Request

  • Base URL
    https://api.zentail.com/v1
  • Auth
    API key in header AUTHORIZATION

Path parameters

orderNumbernumber required

Zentail Order Number

Request body

channelCancelIdstring required

The unique identifier for the cancel request in the sales channel.

status'PENDING' | 'CANCELLED' | 'CLOSED' required

PENDING to report the request. Send CANCELLED once the channel cancels the units, or CLOSED once the request ends any other way. Neither is ever undone.

requestTsstring date-time

The time the buyer asked to cancel. In ISO-8601 format. Defaults to now.

respondByTsstring date-time

The time the channel needs an answer by. In ISO-8601 format.

Response

Success

buyerCancelRequestIdnumber

The unique identifier for the cancel request in Zentail

channelCancelIdstring

The unique identifier for the cancel request in the sales channel

status'PENDING' | 'CANCELLED' | 'CLOSED'

PENDING while the channel waits for an answer, CANCELLED once the channel cancelled the units, CLOSED once it ended any other way

requestTsstring date-time

The time the buyer asked to cancel. In ISO-8601 format

respondByTsstring date-time

The time the channel needs an answer by, if it set one. In ISO-8601 format

decision'ACCEPT' | 'REFUSE'

The merchant's answer in Zentail: ACCEPT, REFUSE, or null while unanswered

refuseReasonstring

The code of the refuse reason the merchant picked, when the decision is REFUSE

decidedTsstring date-time

The time the merchant answered. In ISO-8601 format

Changes

No recorded changes to this operation across all 1 revision of this API.