Cancel Order - citiesocial/citiesocial-api-doc GitHub Wiki
Cancel Order
-
URL
/orders/{{ order-id }}/cancel/
-
Method:
POST
-
URL Params
None
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content: As sample success response below.
- Code: 200 OK
-
Error Response:
-
Code: 400 BAD REQUEST
Content:Order has already been captured.
{"errors": "Cannot cancel order that is already cancelled."}
Order has already been captured, cannot be cancelled, please consider create refund.
{"errors": "order has already been captured, cannot be cancelled."}
-
Code: 401 UNAUTHORIZED
Content:{"message": "Unauthorized access"}
-
Code: 404 NOT FOUND
Content: None -
Code: 405 METHOD NOT ALLOWED
Content:"POST is required."
-
-
Sample Successful Response:
{
"order": {
"total_price": 30,
"name": "#1208",
"items": [
{
"shipment": null,
"estimated_shipping_date": null,
"name": "Active 水煙筒 - 原木",
"is_refunded": false,
"variant_id": 1793693507
},
{
"shipment": null,
"estimated_shipping_date": null,
"name": "Active 水煙筒 - 原木",
"is_refunded": false,
"variant_id": 1793693507
},
{
"shipment": null,
"estimated_shipping_date": null,
"name": "Active 水煙筒 - 橘 - 橘灰",
"is_refunded": false,
"variant_id": 1793680195
}
],
"financial_status": "pending",
"id": "5764461518",
"shipping_address": {
"city": "台北市",
"first_name": "小明",
"last_name": "王",
"zip": "100",
"title": "先生",
"address1": "中正區",
"address2": "八德路一段",
"phone": "0912345678"
},
"is_cancelled": true,
"email": "[email protected]"
}
}