Retrieve a list of Returns
GET {{baseUrl}}/returns?cursor=<string>&from_date=<string>&to_date=<string>&parent_parcel_status=picked-up-by-driver&page_size=<number>
Retrieve a list of returns which have been created under your API credentials. The response includes return data for each parcel, plus up-to-date tracking history. The returned data is paginated and has a default number of items per page of 40 and can be controlled by the page_size
query param. You can filter the results to only include return parcels created within a specific time frame using the from_date
and to_date
parameters, or based on the parent_parcel_status
.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
cursor | string | The cursor query string is used as the pivot value to filter results. If no value is provided, the service must return the first page. The value is Base64 encoded GET parameters, for example: | |
For a cursor string, there are 3 possible parameters to encode: |
- `o`: Offset
- `r`: Reverse
- `p`: Position
Combine into GET parameters, for example: r=1&p=300
Base 64 encoded it would become: cj0xJnA9MzAw
GET parameter in URL would be https://some.url.com/api/endpoint/?cursor=cj0xJnA9MzAw
|
| from_date
| string | | (Required) Excludes all returns before this datetime |
| to_date
| string | | (Required) Excludes all returns after this datetime |
| parent_parcel_status
| string | | Search for returns with this parent status |
| page_size
| string | | Refers to the number of items per page |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"next":"\u003cstring\u003e","previous":"\u003cstring\u003e","data":[{"from_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"to_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_product":{"code":"\u003cstring\u003e"},"weight":{"value":"\u003cnumber\u003e","unit":"oz"},"send_tracking_emails":false,"is_cancellable":"\u003cboolean\u003e","status_history":[{"carrier_update_timestamp":"\u003cdateTime\u003e","parcel_status_history_id":"\u003cstring\u003e","parent_status":"\u003cstring\u003e","carrier_code":"\u003cstring\u003e","carrier_message":"\u003cstring\u003e"}],"created_at":"\u003cdateTime\u003e","dimensions":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"ft"},"collo_count":1,"parcel_items":[{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"oz"},"value":{"value":"\u003cnumber\u003e","currency":"USD"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"},{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"lbs"},"value":{"value":"\u003cnumber\u003e","currency":"GBP"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"}],"brand_id":"\u003cinteger\u003e","label_url":"\u003cstring,null\u003e","label":{"normal_printer":["\u003cstring\u003e","\u003cstring\u003e"],"label_printer":"\u003cstring\u003e"},"label_cost":{"value":"\u003cnumber\u003e","currency":"EUR"},"insurance":"\u003cboolean\u003e","tracking_number":"\u003cstring,null\u003e","tracking_url":"\u003cstring,null\u003e","delivered_at":"\u003cdateTime\u003e","reason":{"id":"\u003clong\u003e","description":"\u003cstring\u003e"},"order_number":"\u003cstring\u003e","contract":"\u003cinteger\u003e","customs_invoice_nr":"\u003cstring,null\u003e","customs_shipment_type":1,"delivery_option":"pickup","images":[{"filename":"\u003cstring\u003e","product_id":"\u003cstring,null\u003e","uploaded_image":"\u003curi\u003e","thumbnail_image":"\u003cstring,null-uri\u003e"},{"filename":"\u003cstring\u003e","product_id":"\u003cstring,null\u003e","uploaded_image":"\u003curi\u003e","thumbnail_image":"\u003cstring,null-uri\u003e"}],"status":"requested","customs_information":null},{"from_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"to_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"shipping_product":{"code":"\u003cstring\u003e"},"weight":{"value":"\u003cnumber\u003e","unit":"g"},"send_tracking_emails":false,"is_cancellable":"\u003cboolean\u003e","status_history":[{"carrier_update_timestamp":"\u003cdateTime\u003e","parcel_status_history_id":"\u003cstring\u003e","parent_status":"\u003cstring\u003e","carrier_code":"\u003cstring\u003e","carrier_message":"\u003cstring\u003e"}],"created_at":"\u003cdateTime\u003e","dimensions":{"length":"\u003cnumber\u003e","width":"\u003cnumber\u003e","height":"\u003cnumber\u003e","unit":"ft"},"collo_count":1,"parcel_items":[{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"g"},"value":{"value":"\u003cnumber\u003e","currency":"USD"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"},{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"lbs"},"value":{"value":"\u003cnumber\u003e","currency":"USD"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"}],"brand_id":"\u003cinteger\u003e","label_url":"\u003cstring,null\u003e","label":{"normal_printer":["\u003cstring\u003e","\u003cstring\u003e"],"label_printer":"\u003cstring\u003e"},"label_cost":{"value":"\u003cnumber\u003e","currency":"USD"},"insurance":"\u003cboolean\u003e","tracking_number":"\u003cstring,null\u003e","tracking_url":"\u003cstring,null\u003e","delivered_at":"\u003cdateTime\u003e","reason":{"id":"\u003clong\u003e","description":"\u003cstring\u003e"},"order_number":"\u003cstring\u003e","contract":"\u003cinteger\u003e","customs_invoice_nr":"\u003cstring,null\u003e","customs_shipment_type":3,"delivery_option":"drop_off_point","images":[{"filename":"\u003cstring\u003e","product_id":"\u003cstring,null\u003e","uploaded_image":"\u003curi\u003e","thumbnail_image":"\u003cstring,null-uri\u003e"},{"filename":"\u003cstring\u003e","product_id":"\u003cstring,null\u003e","uploaded_image":"\u003curi\u003e","thumbnail_image":"\u003cstring,null-uri\u003e"}],"status":"request_rejected","customs_information":{"invoice_number":"\u003cstring\u003e","export_reason":"returned_goods","export_type":"commercial_b2c","invoice_date":"\u003cdate\u003e","discount_granted":{"PriceWithOptionalCurrency":{"value":"208.32878219","currency":"qui"}},"freight_costs":{"PriceWithOptionalCurrency":{"value":"0149188371","currency":"qui"}},"insurance_costs":{"PriceWithOptionalCurrency":{"value":"0839.07142838","currency":"qui"}},"other_costs":{"PriceWithOptionalCurrency":null},"general_notes":"\u003cstring\u003e","additional_declaration_statements":["\u003cstring\u003e","\u003cstring\u003e"],"importer_of_record":null,"tax_numbers":{"sender":[{"name":"VAT","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"},{"name":"OKP","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"}],"receiver":[{"name":"KPP","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"},{"name":"EORI","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"}],"importer_of_record":[{"name":"RGP","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"},{"name":"STA","country_code":"\u003cstring\u003e","value":"\u003cstring\u003e"}]},"return_data":{"return_postal_code":"\u003cstring\u003e","outbound_tracking_number":"\u003cstring\u003e","outbound_shipment_date":"\u003cdate\u003e","outbound_carrier_name":"\u003cstring\u003e"}}}]}