Skip to main content

Order Details API (Returns)

Retrieve a paginated list of return orders with filtering and sorting options.

Method: POST Endpoint: /custom/api/v1/returns

Request Parameters

Pagination Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
per_pageinteger20Records per page (max: 100)

Sort Parameters

ParameterTypeDefaultDescription
sort_bystringcreated_atField to sort by
sort_orderstringdescSort direction: asc or desc

Filter Parameters

ParameterTypeDescription
searchstringFull search across display_id, customer details, tracking number, SKU, etc.
statusstringFilter by status: return_requested, pickup_scheduled, in_transit, return_received, cancelled
granular_status[]arrayFilter by granular status
warehouse_id[]arrayFilter by warehouse IDs
channel[]arrayFilter by order channel
store_name[]arrayFilter by store name
carrier_ids[]arrayFilter by carrier IDs
zone[]arrayFilter by shipping zone
refund_status[]arrayFilter by refund status
qc_status[]arrayFilter by QC status
display_id[]arrayFilter by return display IDs
sku[]arrayFilter by SKU codes
is_dangerous_goodsbooleanFilter by dangerous goods status

Date Range Parameters

ParameterTypeDescription
created_at__gtetimestampCreated at from date
created_at__ltetimestampCreated at to date
return_pickup_scheduled_at__gtetimestampPickup scheduled from date
return_pickup_scheduled_at__ltetimestampPickup scheduled to date
return_delivered_at__gtetimestampReturn delivered from date
return_delivered_at__ltetimestampReturn delivered to date

Sample Requests

Basic Request

curl -X POST "https://shazam.velocity.in/custom/api/v1/returns" \
-H "Authorization: your_access_token" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"per_page": 20
}'

Filter by Status

curl -X POST "https://shazam.velocity.in/custom/api/v1/returns" \
-H "Authorization: your_access_token" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"per_page": 20,
"status": "in_transit"
}'

Filter by Date Range

curl -X POST "https://shazam.velocity.in/custom/api/v1/returns" \
-H "Authorization: your_access_token" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"per_page": 20,
"created_at__gte": "2024-01-01T00:00:00Z",
"created_at__lte": "2024-01-31T23:59:59Z"
}'

Filter by QC and Refund Status

curl -X POST "https://shazam.velocity.in/custom/api/v1/returns" \
-H "Authorization: your_access_token" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"per_page": 20,
"qc_status": ["passed", "pending"],
"refund_status": ["pending", "processed"]
}'

Complex Filter

curl -X POST "https://shazam.velocity.in/custom/api/v1/returns" \
-H "Authorization: your_access_token" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"per_page": 50,
"status": "return_received",
"warehouse_id": ["warehouse-uuid"],
"channel": ["shopify"],
"qc_status": ["passed"],
"refund_status": ["pending"],
"sort_by": "created_at",
"sort_order": "desc"
}'

Success Response

{
"data": [
{
"id": "return-uuid",
"type": "return",
"attributes": {
"return_reason": "defective_product",
"request_date": "2024-01-10T10:00:00Z",
"display_id": "RET-12345",
"qc_status": "passed",
"qc_required": true,
"status": "delivered",
"warehouse_id": "warehouse-uuid",
"shipping_address": {
"name": "Customer Name",
"phone": "9876543210",
"city": "Delhi",
"state": "Delhi",
"zip": "110001"
},
"total_price": 1500.00,
"is_exchange": false,
"refund_status": "processed",
"created_at": "2024-01-10T10:00:00Z",
"return_items": [
{
"id": "return-item-uuid",
"quantity": 1,
"price": 1500.00,
"name": "Product Name",
"sku": "SKU-001",
"return_reason": "defective_product"
}
],
"weight": {
"value": 500,
"metric_unit": "g"
},
"shipment": {
"id": "shipment-uuid",
"tracking_number": "RETTRACK123456",
"status": "delivered",
"carrier": {
"id": "carrier-uuid",
"name": "Delhivery"
},
"shipment_milestones": [
{
"milestone": "return_pickup_scheduled",
"milestone_at": "2024-01-11T10:00:00Z"
},
{
"milestone": "return_delivered",
"milestone_at": "2024-01-15T14:00:00Z"
}
]
},
"order": {
"id": "order-uuid",
"display_id": "ORD-12345",
"channel": "shopify",
"store_name": "My Store"
}
}
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 45,
"next_search_after": ["1705320000000", "return-uuid"]
}
}