API Documentation
- Management
- Sandbox
- Inventory
- Products
- Orders
- Inbound Shipments
- Shipping Methods
- Returns
- Billing
- Warehouses
- Warehouse Customers
Create Return
Get the required, optional, and integration specific fields by calling the integrations endpoint.
curl --request POST \
--url https://production.trackstarhq.com/wms/returns \
--header 'Content-Type: application/json' \
--header 'x-trackstar-access-token: <x-trackstar-access-token>' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '{
"warehouse_id": "warehouse",
"order_id": "order_id",
"line_items": [
{
"sku": "sku",
"quantity": 1
}
],
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
}'
{
"data": {
"id": "return_id",
"warehouse_customer_id": "warehouse_customer_id",
"created_date": "2022-01-01T00:00:00Z",
"updated_date": "2022-01-02T05:05:05Z",
"status": "open",
"raw_status": "raw_status",
"order_id": "order_id",
"notes": [
"This is a note"
],
"line_items": [
{
"inventory_item_id": "item_id",
"sku": "sku",
"expected_quantity": 1,
"received_quantity": 1,
"restocked_quantity": 1,
"return_reason": "Too Small",
"quantity": 1,
"warehouse_id": "warehouse_id",
"returned_date": ""
}
],
"shipments": [],
"external_system_url": "https://example.com/return/123",
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
},
"id": "id",
"unused_fields": [
""
]
}
Headers
Your organization-level Trackstar API key.
"<x-trackstar-api-key>"
Your user's access token for a specific integration (ShipHero, Extensiv, etc).
"<x-trackstar-access-token>"
Body
The ID of the warehouse receiving the return. Can be passed into the Warehouse endpoint for more details.
"warehouse"
The ID of the order that the return is associated with. Can be passed into the Order endpoint for more details.
"order_id"
A list of custom tags associated with the returns. A tag can be either a string or a dictionary with one key-value pair. e.g. ['tag1', 'tag2', {'key1': 'value1'}]
["tag1", "tag2", { "tag3": "value3" }]
Response
The unique ID of the return.
"return_id"
The ID of the merchant/tenant/customer that owns the return. Can be passed into the Warehouse Customer endpoint for more details.
"warehouse_customer_id"
The date the return was created.
"2022-01-01T00:00:00Z"
The date the return was last updated.
"2022-01-02T05:05:05Z"
The status of the return. See the return information for more details.
open
, in-transit
, receiving
, received
, cancelled
, other
"open"
The raw status (if available) returned directly from the WMS.
"raw_status"
The ID of the order that the return is associated with. Can be passed into the Order endpoint for more details.
"order_id"
A list of notes associated with the return.
This is a note
["This is a note"]
A list of inventory items included in the return.
Can be passed into the Inventory endpoint for more details.
"item_id"
"sku"
How many units are expected to arrive.
1
How many units actually arrived.
1
The number of returned inventory items that have been restocked.
1
The reason for the return.
"Too Small"
This field is deprecated.
1
This field is deprecated.
"warehouse_id"
This field is deprecated.
""
[
{
"inventory_item_id": "item_id",
"sku": "sku",
"expected_quantity": 1,
"received_quantity": 1,
"restocked_quantity": 1,
"return_reason": "Too Small",
"quantity": 1,
"warehouse_id": "warehouse_id",
"returned_date": ""
}
]
List of the shipments associated with the return.
The tracking number of the shipment.
""
The date the shipment was sent.
""
The date the shipment arrived.
""
The ID of the warehouse the shipment was sent to. Can be passed into the Warehouse endpoint for more details.
"warehouse_id"
The carrier of the shipment.
""
The cost of the shipment.
0
1.5
1.5
1.5
The unit of measurement for the size of the shipment.
cm
, in
"in"
2.5
The unit of measurement for the weight of the shipment.
kg
, oz
, lb
"lb"
List of inventory items items in the shipment.
Can be passed into the Inventory endpoint for more details.
"item_id"
"sku"
How many units were shipped.
1
Details about received items in the shipment.
How many units were received in this condition and disposition.
1
The condition of the item received.
"good"
The disposition of the item received, eg restocked or discarded.
"restocked"
[
{
"quantity": 1,
"condition": "good",
"disposition": "restocked"
}
]
[]
URL link to the return in the external system (WMS/Freight etc).
"https://example.com/return/123"
A list of custom tags associated with the return. A tag can be either a string or a dictionary with one key-value pair. e.g. ['tag1', 'tag2', {'key1': 'value1'}]
["tag1", "tag2", { "tag3": "value3" }]
The ID of the object that has been created or modified
"id"
Unused fields
curl --request POST \
--url https://production.trackstarhq.com/wms/returns \
--header 'Content-Type: application/json' \
--header 'x-trackstar-access-token: <x-trackstar-access-token>' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '{
"warehouse_id": "warehouse",
"order_id": "order_id",
"line_items": [
{
"sku": "sku",
"quantity": 1
}
],
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
}'
{
"data": {
"id": "return_id",
"warehouse_customer_id": "warehouse_customer_id",
"created_date": "2022-01-01T00:00:00Z",
"updated_date": "2022-01-02T05:05:05Z",
"status": "open",
"raw_status": "raw_status",
"order_id": "order_id",
"notes": [
"This is a note"
],
"line_items": [
{
"inventory_item_id": "item_id",
"sku": "sku",
"expected_quantity": 1,
"received_quantity": 1,
"restocked_quantity": 1,
"return_reason": "Too Small",
"quantity": 1,
"warehouse_id": "warehouse_id",
"returned_date": ""
}
],
"shipments": [],
"external_system_url": "https://example.com/return/123",
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
},
"id": "id",
"unused_fields": [
""
]
}