Return Orders

GET https://leads.qreq.com/api/return-orders
curl --request GET \
--url 'https://leads.qreq.com/api/return-orders' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "data": { "current_page": 1, "data": [], "first_page_url": "https://leads.qreq.com/api/return-orders?page=1", "from": null, "last_page": 1, "last_page_url": "https://leads.qreq.com/api/return-orders?page=1", "links": [], "next_page_url": null, "path": "https://leads.qreq.com/api/return-orders", "per_page": 10, "prev_page_url": null, "to": null, "total": 0 } }
GET https://leads.qreq.com/api/return-orders/{id}
curl --request GET \
--url 'https://leads.qreq.com/api/return-orders/{id}' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "message": "Return order retrieved successfully.", "data": { "id": 1, "return_number": "RO-001", "sales_order_id": 2, "account": {"id": 1, "name": "ABC Traders"}, "contact": {"id": 3, "name": "Jane Doe"}, "status": "pending", "reason": "Damaged item", "created_at": "2025-11-06T08:00:00Z" } }
POST https://leads.qreq.com/api/return-orders
Parameters Details Description
return_numberRequiredUnique return order number
nameRequiredTitle or name for the return
account_idRequiredAssociated account ID
contact_idRequiredAssociated contact ID
sales_order_idOptionalRelated sales order ID
statusRequiredStatus: pending, approved, rejected, completed
descriptionOptionalReason or details for return
curl --request POST \
--url 'https://leads.qreq.com/api/return-orders' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "return_number": "RO-001", "name": "Return for damaged product", "account_id": 1, "contact_id": 2, "sales_order_id": 1, "status": "pending", "description": "Damaged screen" }'
{ "success": true, "message": "Return order created successfully.", "data": { "id": 1, "return_number": "RO-001", "status": "pending" } }
PUT https://leads.qreq.com/api/return-orders/{id}
curl --request PUT \
--url 'https://leads.qreq.com/api/return-orders/{id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "status": "approved", "description": "Return approved by admin" }'
{ "success": true, "message": "Return order updated successfully.", "data": { "id": 1, "status": "approved" } }
DELETE https://leads.qreq.com/api/return-orders/{id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/return-orders/{id}' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "message": "Return order deleted successfully." }