/v2/providers/openapi/apis/api/v5/vendors/{vendorId}/orders/{orderId}/cancel2609170000Cancel an order
Summary
Cancel an order
Details
Available buyer market: Korean, Taiwan
This API cancels orders at the status [Payment completed] or [Product in preparation] (returns an error at other status).
It immediately cancels an order at [Payment completed] and suspends the outbound shipment of the product at [Product in preparation].
If there are different bundled shipping numbers (shipmentBoxId) in one order number, you must request cancellation for each shipmentBoxId to be processed normally.
※ Cancelling an order using this API lowers your seller score (on-time delivery), so please manage your inventory and pricing so as not to use this API.
Path
Example endpoint
https://api-gateway.coupang.com/v2/providers/openapi/apis/api/v5/vendors/A00012345/orders/2000006593044/cancelURL API Name
Path parameters
| Name | Type | Description |
|---|---|---|
| vendorId* | string | Seller ID Unique code issued to Vendor by Coupang ex) A00012345 |
| orderId* | number | Order no. ex) 2000006593044 |
Request body
Request parameters
Body parameter
| Name | Type | Description |
|---|---|---|
| orderId* | integer | Order no. Must also enter path variable |
| vendorItemIds* | object[] | Array of the option ID (vendorItemId) for a product to cancel To be paired with receiptCounts |
| receiptCounts* | object[] | Array of the count of products to cancel, greater than 0 To be paired with vendorItemIds |
| bigCancelCode* | string | High-level code of order cancellation reason CANERR |
| middleCancelCode* | string | Mid-level code of order cancellation reason
|
| ㄱ* | string | Vendor ID, must also enter path variable
|
| userId* | string | Vendor's ID to log in Coupang Wing
|
{
"orderId": 2000006593044,
"vendorItemIds": [
3145181064,
3145181065,
3145181067
],
"receiptCounts": [
1,
2,
1
],
"bigCancelCode": "CANERR",
"middleCancelCode": "CCTTER",
"userId": "wing_login_id_123",
"vendorId": "A00123456"
}Response body
Response message
| Name | Type | Description |
|---|---|---|
| code | string | Response code 200 - Whole/partial cancellation succeeded, 400 - Cancellation failed |
| message | string | Reason and error message for failure
|
| data | string | Detailed info about cancellation success and failure
|
| ReceiptMap data.ReceiptMap | object | |
| receiptId data.ReceiptMap.receiptId | number | Receipt ID
|
| receiptType data.ReceiptMap.receiptType | string | Immediate cancellation receipt ID in case of CANCEL, Shipment Suspension Receipt ID in case of STOP_SHIPMENT |
| vendorItemIds data.ReceiptMap.vendorItemIds | object[] | List of product IDs cancelled by the receipt ID
|
| totalCount data.ReceiptMap.totalCount | number | Total count of products cancelled by the receipt ID
|
| orderId data.orderId | number | Order ID
|
| failedItemIds data.failedItemIds | object[] | VendorItemId with cancellation failure
|
Response Example
{
"code": "400",
"message": "[요청번호] 5d803ea1-e61d-44bd-a56d-44f3528f5136 \\r\\n [3145181067, 3145181065, 3145181064]<= 취소 가능한 개수보다 요청한 개수가 더 많습니다",
"data": {
"receiptMap": {
},
"orderId": 23000059824637,
"failedVendorItemIds": [
3145181067,
3145181065,
3145181064
]
}
}
}Error codes
| HTTP | Code | Message |
|---|---|---|
| 400 | HTTP_400 | Bad Request |
Error specification
| HTTP | Type | Error message | Solution |
|---|---|---|---|
| 400 | 400 (check request parameter) | Enter the order ID. | Check if the order ID (orderId) is correct. |
| 400 | 400 (check request parameter) | Enter a list of vendor item IDs to cancel. | Check if the product ID list (vendorItemIds) is correct. |
| 400 | 400 (check request parameter) | Enter the count of items to cancel. | Check if the array of the count of products to cancel (receiptCounts) is correct. |
| 400 | 400 (check request parameter) | Check the count of products requested and that of products to cancel. | Check if the count of options on the product ID list (vendorItemIds) matches that of products to cancel. |
| 400 | 400 (check request parameter) | Enter the high-level code of cancellation reason. | Check if the high-level code of cancellation reason is "CANERR." |
| 400 | 400 (check request parameter) | Enter the mid-level code of cancellation reason. | Check if the mid-level code of cancellation reason (middleCancelCode) is "CCTTER," "CCPNER" or "CCPRER." |
| 400 | 400 (check request parameter) | Enter the vendor ID. | Check if the seller ID (vendorId) is correct. |
| 400 | 400 (check request parameter) | Enter the right user ID for the vendor ID. | Check if the Wing user ID is right for the seller ID. |
| 400 | 400 (check request parameter) | Order info doesn't exist. | This occurs when no payment info exists for the requested order ID (OrderId) and product ID. Check the order ID and the status of each product. |
| 400 | 400 (check request parameter) | The requested count exceeds the cancellable count. | Check if the requested count is greater than the cancellable count of a certain option (= count of orders - count of orders being cancelled - count of orders cancelled). |
| 400 | 400 (check request parameter) | The order status of this vendor item is not Payment Completed/Product in Preparation. | Check if the order you are requesting to cancel is not at Payment Completed or Product in Preparation. |
| 400 | 400 (check request parameter) | This product is not the requesting seller's. | Check if the order you are requesting to cancel is on your product. |
| 400 | 400 (check request parameter) | An error has occurred in cancellation request. | Cancellation has failed for an order you are requesting to cancel at Payment Completed. Double-check the order status at Payment Completed. |
| 400 | 400 (check request parameter) | Partial cancellation is unavailable. | Partial cancellation has failed. Check if the count of options on the product ID list (vendorItemIds) and that of products to cancel are correct. |
| 400 | 400 (check request parameter) | Shipment suspension has failed. | Shipment suspension has failed for an order you are requesting to cancel at Product in Preparation. Check the order status of the option and if cancellation has been double-requested for the option. |
| 400 | 400 (check request parameter) | It has failed to roll back shipment suspension request [receipt ID]. | Shipment suspension has failed for an order you are requesting to cancel at Product in Preparation, and so did the suspension request roll-back. Check the processing status of the option. |
| 400 | 400 (check request parameter) | An internal error has occurred. Contact Coupang. Error no.: %s | Check the entries and send a request again sometime later. |