Skip to main content

Exchange Orders API

Returns a paginated list of exchange orders with filtering and sorting options.

Method: POST Endpoint: /custom/api/v1/exchange-orders

Request Parameters​

Pagination​

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

Alternatively, use nested format: page[number] and page[per_page].

Sort Parameters​

ParameterTypeDefaultDescription
sort_bystringcreated_atColumn to sort by
sort_orderstringdescSort direction: asc or desc

Filter Parameters​

ParameterTypeDescription
searchstringFull-text search across order details
statusstringFilter by exchange order status
display_idstringFilter by exchange order display ID
return_display_idstringFilter by return order display ID
created_at__gtestringCreated at or after this datetime (ISO 8601)
created_at__ltestringCreated at or before this datetime (ISO 8601)
updated_at__gtestringUpdated at or after this datetime (ISO 8601)
updated_at__ltestringUpdated at or before this datetime (ISO 8601)
warehouse_id[]arrayFilter by warehouse ID(s)
channel[]arrayFilter by sales channel(s) (e.g., shopify, website)
carrier_ids[]arrayFilter by carrier ID(s)
carrier_group_id[]arrayFilter by carrier group ID(s)
store_name[]arrayFilter by store name(s)
sku[]arrayFilter by SKU code(s)
zone[]arrayFilter by shipping zone(s)
refund_status[]arrayFilter by refund status
granular_status[]arrayFilter by granular status
qc_status[]arrayFilter by QC status
return_status[]arrayFilter by return order status
forward_status[]arrayFilter by forward order status
return_shipment_status[]arrayFilter by return shipment status
forward_shipment_status[]arrayFilter by forward shipment status

Sample Requests​

Basic Request​

curl --location 'https://shazam.velocity.in/custom/api/v1/exchange-orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_access_token' \
--data '{
"page": 1,
"per_page": 20
}'

Filter by Date Range​

curl --location 'https://shazam.velocity.in/custom/api/v1/exchange-orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_access_token' \
--data '{
"page": 1,
"per_page": 20,
"created_at__gte": "2024-01-01T00:00:00+05:30",
"created_at__lte": "2024-01-31T23:59:59+05:30"
}'

Filter by Status​

curl --location 'https://shazam.velocity.in/custom/api/v1/exchange-orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_access_token' \
--data '{
"page": 1,
"per_page": 20,
"status": "pending"
}'

Filter by Channel and Warehouse​

curl --location 'https://shazam.velocity.in/custom/api/v1/exchange-orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_access_token' \
--data '{
"page": 1,
"per_page": 50,
"channel": ["shopify"],
"warehouse_id": ["WHYYB5"],
"sort_by": "created_at",
"sort_order": "desc"
}'

Success Response​

{
"data": [
{
"id": "exchange-order-uuid",
"type": "exchange_order",
"attributes": {
"client_id": 123,
"display_id": "ORDER-EXCH-001",
"unique_id": "EXCHABC123",
"status": "pending",
"channel": "shopify",
"created_at": "2024-03-15T14:30:00.000+05:30",
"updated_at": "2024-03-15T14:30:00.000+05:30",
"fare_breakup": {
"total": 185.5
},
"order": {
"data": {
"attributes": {
"unique_id": "ORDKDKHOFL07I",
"display_id": "ORDER-EXCH-001",
"status": "processing",
"payment_method": "prepaid"
}
}
},
"forward_shipment": {
"data": {
"attributes": {
"unique_id": "SHIHB0BMT4DYM",
"tracking_number": "34812010700125",
"status": "pending",
"courier_name": "Delhivery Standard"
}
}
},
"return": {
"data": {
"attributes": {
"unique_id": "RETABC123DEF",
"display_id": "ORDER-EXCH-001-RET",
"status": "pending"
}
}
},
"return_shipment": {
"data": {
"attributes": {
"unique_id": "SHIXYZ789ABC",
"tracking_number": "84161310011340",
"status": "pending",
"courier_name": "Delhivery Standard"
}
}
}
}
}
],
"meta": {
"total": 142,
"page": 1,
"per_page": 20,
"total_pages": 8
}
}

Notes​

  • display_id corresponds to the order_id you supplied when creating the exchange via Exchange Order API
  • Each record includes the nested forward order, forward shipment, return order, return shipment, and carrier details
  • Array filter parameters (e.g., channel[], warehouse_id[]) accept multiple values and apply an OR match within the same field