PUT
/
wms
/
returns
/
{return_id}
curl --request PUT \
  --url https://production.trackstarhq.com/wms/returns/{return_id} \
  --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": [
      {
        "tracking_number": "tracking_number",
        "shipped_date": "2023-02-03T02:04:06Z",
        "arrived_date": "2023-02-03T02:04:06Z",
        "warehouse_id": "warehouse_id",
        "carrier": "carrier",
        "shipping_cost": 1.23,
        "measurements": {
          "length": 1,
          "width": 1,
          "height": 1,
          "unit": "in",
          "weight": 1,
          "weight_unit": "lb"
        },
        "line_items": [
          {
            "inventory_item_id": "item_id",
            "sku": "sku",
            "quantity": 4,
            "receiving_details": [
              {
                "quantity": 1,
                "condition": "good",
                "disposition": "restocked"
              },
              {
                "quantity": 1,
                "condition": "damaged",
                "disposition": "scrapped"
              }
            ]
          }
        ]
      }
    ],
    "external_system_url": "https://example.com/return/123",
    "trackstar_tags": [
      "tag1",
      "tag2",
      {
        "tag3": "value3"
      }
    ]
  },
  "id": "id",
  "unused_fields": [
    ""
  ]
}

Headers

x-trackstar-api-key
string
required

Your organization-level Trackstar API key.

Example:

"<x-trackstar-api-key>"

x-trackstar-access-token
string
required

Your user's access token for a specific integration (ShipHero, Extensiv, etc).

Example:

"<x-trackstar-access-token>"

Path Parameters

return_id
string
required

Body

application/json
warehouse_id
string

The ID of the warehouse receiving the return. Can be passed into the Warehouse endpoint for more details.

Example:

"warehouse"

order_id
string

The ID of the order that the return is associated with. Can be passed into the Order endpoint for more details.

Example:

"order_id"

line_items
object[]

A list of inventory items included in the return.

Example:
[{ "sku": "sku", "quantity": 1 }]
trackstar_tags
any[] | null

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'}]

Example:
["tag1", "tag2", { "tag3": "value3" }]

Response

200
application/json
Successful response
data
object
id
string

The ID of the object that has been created or modified

Example:

"id"

unused_fields
string[]

Unused fields