Browse the API docs

Inventory transfers

Stock moving between locations, or arriving from a supplier. Stock leaves the origin when a transfer is marked as shipped, and is added at the destination as it's received.

Endpoints#

Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.

The inventory transfer object#

What the endpoints below return for one inventory transfer.

inventory_transfer
{
  "id": "cm2transfer02",
  "name": "T2",
  "number": 2,
  "status": "in_transit",
  "origin_location_id": "cm2location01",
  "destination_location_id": "cm2location02",
  "reference": "Truck run, Thursday",
  "note": null,
  "expected_at": "2026-10-25T17:00:00.000Z",
  "shipped_at": "2026-10-23T15:10:00.000Z",
  "received_at": null,
  "created_by": "Sam Rivera",
  "total_quantity": 14,
  "received_quantity": 0,
  "rejected_quantity": 0,
  "line_items": [
    {
      "id": "cm2titem01",
      "variant_id": "cm2variant01",
      "product_id": "cm2product01",
      "sku": "STONEWARE-01",
      "title": "Stoneware mug",
      "variant_title": "Oat",
      "quantity": 6,
      "received_quantity": 0,
      "rejected_quantity": 0
    }
  ],
  "created_at": "2026-10-22T10:00:00.000Z",
  "updated_at": "2026-10-23T15:10:00.000Z"
}

List transfers#

GET/inventory_transfers.jsonread_inventory
Query parameters
ParameterDescription
limitResults per page, 1–250 (default 50).
page_infoCursor from the Link header for the next or previous page.
since_idOnly results after this id.
idsComma-separated ids.
created_at_min / created_at_maxISO 8601 bounds on creation time.
updated_at_min / updated_at_maxISO 8601 bounds on last change.
statusdraft, in_transit, received or cancelled.
origin_location_idA location id, or supplier for stock coming from a supplier.
destination_location_idA location id.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "inventory_transfers": [ … ] }

Count transfers#

GET/inventory_transfers/count.jsonread_inventory
Query parameters
ParameterDescription
status, origin_location_id, destination_location_id, created_at_*, updated_at_*Same filters as the list.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers/count.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "count": 3 }

Get a transfer#

GET/inventory_transfers/{id}.jsonread_inventory
Request
curl "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers/$INVENTORY_TRANSFER_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "inventory_transfer": {
    "id": "cm2transfer02",
    "name": "T2",
    "number": 2,
    "status": "in_transit",
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "reference": "Truck run, Thursday",
    "note": null,
    "expected_at": "2026-10-25T17:00:00.000Z",
    "shipped_at": "2026-10-23T15:10:00.000Z",
    "received_at": null,
    "created_by": "Sam Rivera",
    "total_quantity": 14,
    "received_quantity": 0,
    "rejected_quantity": 0,
    "line_items": [
      { "id": "cm2titem01", "variant_id": "cm2variant01", "product_id": "cm2product01", "sku": "STONEWARE-01", "title": "Stoneware mug", "variant_title": "Oat", "quantity": 6, "received_quantity": 0, "rejected_quantity": 0 }
    ],
    "created_at": "2026-10-22T10:00:00.000Z",
    "updated_at": "2026-10-23T15:10:00.000Z"
  }
}

Create a transfer#

POST/inventory_transfers.jsonwrite_inventory

Creates a draft transfer, numbered T1, T2… Leave origin_location_id out (or null) for stock arriving from a supplier. Variants must track their quantity; a variant listed twice is added up. Nothing moves until the transfer is shipped.

Request body
{
  "inventory_transfer": {
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "expected_at": "2026-10-30",
    "reference": "Truck run, Thursday",
    "line_items": [{ "variant_id": "cm2variant01", "quantity": 6 }]
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "inventory_transfer": {
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "expected_at": "2026-10-30",
    "reference": "Truck run, Thursday",
    "line_items": [{ "variant_id": "cm2variant01", "quantity": 6 }]
  }
}'
Example responseShow
{
  "inventory_transfer": {
    "id": "cm2transfer02",
    "name": "T2",
    "number": 2,
    "status": "in_transit",
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "reference": "Truck run, Thursday",
    "note": null,
    "expected_at": "2026-10-25T17:00:00.000Z",
    "shipped_at": "2026-10-23T15:10:00.000Z",
    "received_at": null,
    "created_by": "Sam Rivera",
    "total_quantity": 14,
    "received_quantity": 0,
    "rejected_quantity": 0,
    "line_items": [
      { "id": "cm2titem01", "variant_id": "cm2variant01", "product_id": "cm2product01", "sku": "STONEWARE-01", "title": "Stoneware mug", "variant_title": "Oat", "quantity": 6, "received_quantity": 0, "rejected_quantity": 0 }
    ],
    "created_at": "2026-10-22T10:00:00.000Z",
    "updated_at": "2026-10-23T15:10:00.000Z"
  }
}

Mark a transfer as shipped#

POST/inventory_transfers/{id}/ship.jsonwrite_inventory

Draft → in_transit. The stock leaves the origin now (recorded as transfer_out); from a supplier nothing leaves. Refused when the origin doesn't have enough of a line.

Request
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers/$INVENTORY_TRANSFER_ID/ship.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "inventory_transfer": {
    "id": "cm2transfer02",
    "name": "T2",
    "number": 2,
    "status": "in_transit",
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "reference": "Truck run, Thursday",
    "note": null,
    "expected_at": "2026-10-25T17:00:00.000Z",
    "shipped_at": "2026-10-23T15:10:00.000Z",
    "received_at": null,
    "created_by": "Sam Rivera",
    "total_quantity": 14,
    "received_quantity": 0,
    "rejected_quantity": 0,
    "line_items": [
      { "id": "cm2titem01", "variant_id": "cm2variant01", "product_id": "cm2product01", "sku": "STONEWARE-01", "title": "Stoneware mug", "variant_title": "Oat", "quantity": 6, "received_quantity": 0, "rejected_quantity": 0 }
    ],
    "created_at": "2026-10-22T10:00:00.000Z",
    "updated_at": "2026-10-23T15:10:00.000Z"
  }
}

Receive a transfer#

POST/inventory_transfers/{id}/receive.jsonwrite_inventory

Accepts units into stock at the destination (transfer_in) and records rejected ones (damaged or wrong items, not added to stock). Partial receiving is fine: the transfer becomes received once every unit is accepted or rejected.

Request body
{ "line_items": [{ "id": "cm2titem01", "accepted": 5, "rejected": 1 }] }
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers/$INVENTORY_TRANSFER_ID/receive.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "line_items": [{ "id": "cm2titem01", "accepted": 5, "rejected": 1 }] }'
Example responseShow
{
  "inventory_transfer": {
    "id": "cm2transfer02",
    "name": "T2",
    "number": 2,
    "status": "in_transit",
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "reference": "Truck run, Thursday",
    "note": null,
    "expected_at": "2026-10-25T17:00:00.000Z",
    "shipped_at": "2026-10-23T15:10:00.000Z",
    "received_at": null,
    "created_by": "Sam Rivera",
    "total_quantity": 14,
    "received_quantity": 0,
    "rejected_quantity": 0,
    "line_items": [
      { "id": "cm2titem01", "variant_id": "cm2variant01", "product_id": "cm2product01", "sku": "STONEWARE-01", "title": "Stoneware mug", "variant_title": "Oat", "quantity": 6, "received_quantity": 0, "rejected_quantity": 0 }
    ],
    "created_at": "2026-10-22T10:00:00.000Z",
    "updated_at": "2026-10-23T15:10:00.000Z"
  }
}

Cancel a transfer#

POST/inventory_transfers/{id}/cancel.jsonwrite_inventory

Cancels a draft or in-transit transfer. Units of a shipped transfer that weren't received or rejected go back to the origin (transfer_cancelled); units already received stay at the destination.

Request
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/inventory_transfers/$INVENTORY_TRANSFER_ID/cancel.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "inventory_transfer": {
    "id": "cm2transfer02",
    "name": "T2",
    "number": 2,
    "status": "in_transit",
    "origin_location_id": "cm2location01",
    "destination_location_id": "cm2location02",
    "reference": "Truck run, Thursday",
    "note": null,
    "expected_at": "2026-10-25T17:00:00.000Z",
    "shipped_at": "2026-10-23T15:10:00.000Z",
    "received_at": null,
    "created_by": "Sam Rivera",
    "total_quantity": 14,
    "received_quantity": 0,
    "rejected_quantity": 0,
    "line_items": [
      { "id": "cm2titem01", "variant_id": "cm2variant01", "product_id": "cm2product01", "sku": "STONEWARE-01", "title": "Stoneware mug", "variant_title": "Oat", "quantity": 6, "received_quantity": 0, "rejected_quantity": 0 }
    ],
    "created_at": "2026-10-22T10:00:00.000Z",
    "updated_at": "2026-10-23T15:10:00.000Z"
  }
}