Cancel procurement order API

Use one of these equivalent routes:

  • POST /v1/orders/cancel — body requires channel
  • POST /v1/orders/1688/cancel — body may omit channel
  • POST /v1/orders/taobao/cancel — body may omit channel

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"}
SituationResult
First requestThe Gateway runs the cancellation and stores the result
Same key + same normalized requestStored result is replayed; response includes Idempotency-Replayed: true
Same key + different requestHTTP 409 IDEMPOTENCY_CONFLICT
Same key while the first request is runningHTTP 409 IDEMPOTENCY_REQUEST_IN_PROGRESS; retry after error.details.retry_after_ms
Earlier upstream result is uncertainHTTP 409 CANCEL_RESULT_UNKNOWN; query order detail before taking further action

Channel behavior

  • 1688: cancel_reason enum — buyerCancel, sellerGoodsLack, other; optional remark
  • Taobao: free-form cancel_reason; optional sub_order_ids for partial cancel and cancel_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

Email support