Cancel procurement order API
Use one of these equivalent routes:
POST /v1/orders/cancel— body requireschannelPOST /v1/orders/1688/cancel— body may omitchannelPOST /v1/orders/taobao/cancel— body may omitchannel
Optional idempotency header
Idempotency-Key is optional but recommended. Generate one unique value for a logical cancellation and reuse it only when retrying the same request.
POST /v1/orders/cancel
Authorization: Bearer <API_KEY>
Content-Type: application/json
Idempotency-Key: 2cc45e99-2424-4cc3-bb87-20c58c67170e
{"channel":"1688","order_id":"1234567890","cancel_reason":"buyerCancel"}| Situation | Result |
|---|---|
| First request | The Gateway runs the cancellation and stores the result |
| Same key + same normalized request | Stored result is replayed; response includes Idempotency-Replayed: true |
| Same key + different request | HTTP 409 IDEMPOTENCY_CONFLICT |
| Same key while the first request is running | HTTP 409 IDEMPOTENCY_REQUEST_IN_PROGRESS; retry after error.details.retry_after_ms |
| Earlier upstream result is uncertain | HTTP 409 CANCEL_RESULT_UNKNOWN; query order detail before taking further action |
Channel behavior
- 1688:
cancel_reasonenum —buyerCancel,sellerGoodsLack,other; optionalremark - Taobao: free-form
cancel_reason; optionalsub_order_idsfor partial cancel andcancel_remark - Taobao may return
pending: true, which means the asynchronous cancellation was accepted. Confirm the final state through order detail / purchase query.
Response
StandardOrderCancelResult — response model.
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days