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}'
--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}'
--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
| Parameter | Einzelheiten | Beschreibung |
|---|---|---|
| return_number | Erforderlich | Unique return order number |
| name | Erforderlich | Title or name for the return |
| account_id | Erforderlich | Associated account ID |
| contact_id | Erforderlich | Associated contact ID |
| sales_order_id | Optional | Related sales order ID |
| status | Erforderlich | Status: pending, approved, rejected, completed |
| description | Optional | Reason 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" }'
--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" }'
--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}'
--url 'https://leads.qreq.com/api/return-orders/{id}' \
--header 'Authorization: Bearer {api_key}'
{
"success": true,
"message": "Return order deleted successfully."
}