Create Refund - citiesocial/citiesocial-api-doc GitHub Wiki
Create Refund
-
URL
/orders/{{ order-id }}/refunds/create/
-
Method:
POST
-
URL Params
None
-
Data Params
{
"variant_id": 1793693507(integer),
"quantity": 2(integer)
}
-
Success Response:
- Code: 201 CREATED
Content:{"refund_id": "2196119"}
- Code: 201 CREATED
-
Error Response:
-
Code: 400 BAD REQUEST
Content:Invalid json format
{"errors": "Invalid json format."}
Unable to claim refund, quantity is more than the amount can be refund..
{"errors": "Unable to claim refund. refundable_quantity:1"}
No refundable line items, the order might already been cancelled, or not yet captured. Please check order-id is right.
{"errors": "No refundable line items."}
-
Code: 401 UNAUTHORIZED
Content:{"message": "Unauthorized access"}
-
Code: 405 METHOD NOT ALLOWED
Content:"POST is required."
-
-
Sample Successful Response:
{
"refund_id": "2196119"
}