New: Stripe & TossPayments integration guides now available →
curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/returns/{id}/complete \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"return_type": "refund",
"status": "requested",
"reason": "<string>",
"reason_category": "defective",
"customer_notes": "<string>",
"admin_notes": "<string>",
"lines": [
{
"id": "<string>",
"order_line_id": "<string>",
"quantity": 123,
"reason": "<string>",
"condition": "<string>",
"exchange_variant_id": "<string>"
}
],
"refund": {
"id": "<string>",
"order_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"reason": "<string>",
"restock": true,
"status": "pending",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Completes the return. If the return type is refund, a refund is automatically created.
curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/returns/{id}/complete \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"return_type": "refund",
"status": "requested",
"reason": "<string>",
"reason_category": "defective",
"customer_notes": "<string>",
"admin_notes": "<string>",
"lines": [
{
"id": "<string>",
"order_line_id": "<string>",
"quantity": 123,
"reason": "<string>",
"condition": "<string>",
"exchange_variant_id": "<string>"
}
],
"refund": {
"id": "<string>",
"order_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"reason": "<string>",
"restock": true,
"status": "pending",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}API Key. Example: sk_live_xxxxx or pk_live_xxxxx
Resource ID
Success
refund, exchange requested, approved, rejected, received, completed, cancelled defective, wrong_item, changed_mind, damaged, other Show child attributes
Show child attributes