Browse the API docs

Locations

Places the store keeps stock: shops, warehouses, a studio. Online orders take stock from active locations that fulfill online orders, in priority order.

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 location object#

What the endpoints below return for one location, and the payload of the locations/create, locations/update webhooks.

location
{
  "id": "cm2location01",
  "name": "Warehouse — Gresham",
  "address1": "2650 NE Kane Drive",
  "address2": null,
  "city": "Gresham",
  "province": "Oregon",
  "zip": "97030",
  "country": "United States",
  "country_code": "US",
  "phone": "+1 503 555 0139",
  "active": true,
  "fulfills_online_orders": true,
  "position": 1,
  "local_pickup": {
    "enabled": false,
    "ready_in": "24h",
    "instructions": null
  },
  "created_at": "2026-09-19T16:00:00.000Z",
  "updated_at": "2026-10-23T09:30:00.000Z"
}

List locations#

GET/locations.jsonread_locations

Active and inactive locations. position is the fulfillment priority: online orders take stock from active locations in this order, and position 0 is the default location.

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.
activetrue or false.
fieldsComma-separated fields to return.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/locations.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "locations": [ … ] }

Count locations#

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

Get a location#

GET/locations/{id}.jsonread_locations
Request
curl "https://store.weftgrid.com/api/admin/2026-10/locations/$LOCATION_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "location": {
    "id": "cm2location01",
    "name": "Warehouse — Gresham",
    "address1": "2650 NE Kane Drive",
    "address2": null,
    "city": "Gresham",
    "province": "Oregon",
    "zip": "97030",
    "country": "United States",
    "country_code": "US",
    "phone": "+1 503 555 0139",
    "active": true,
    "fulfills_online_orders": true,
    "position": 1,
    "local_pickup": { "enabled": false, "ready_in": "24h", "instructions": null },
    "created_at": "2026-09-19T16:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}

Create a location#

POST/locations.jsonwrite_locations

Adds an active location at the end of the fulfillment priority. name and country_code are required; when you send a street address, city is required too. fulfills_online_orders defaults to true.

Request body
{
  "location": {
    "name": "Pop-up at Saturday market",
    "address1": "108 SW Ash Street",
    "city": "Portland",
    "province": "Oregon",
    "zip": "97204",
    "country_code": "US",
    "phone": "+1 503 555 0110",
    "fulfills_online_orders": false
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/locations.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "location": {
    "name": "Pop-up at Saturday market",
    "address1": "108 SW Ash Street",
    "city": "Portland",
    "province": "Oregon",
    "zip": "97204",
    "country_code": "US",
    "phone": "+1 503 555 0110",
    "fulfills_online_orders": false
  }
}'
Example responseShow
{
  "location": {
    "id": "cm2location01",
    "name": "Warehouse — Gresham",
    "address1": "2650 NE Kane Drive",
    "address2": null,
    "city": "Gresham",
    "province": "Oregon",
    "zip": "97030",
    "country": "United States",
    "country_code": "US",
    "phone": "+1 503 555 0139",
    "active": true,
    "fulfills_online_orders": true,
    "position": 1,
    "local_pickup": { "enabled": false, "ready_in": "24h", "instructions": null },
    "created_at": "2026-09-19T16:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}

Update a location#

PUT/locations/{id}.jsonwrite_locations

Fields you leave out keep their values (in local_pickup too). local_pickup.enabled: true lets customers collect online orders here: the location needs to be active and to have a street address and city. ready_in is how soon orders are usually ready (1h, 2h, 4h, 24h or 2_4_days); instructions are plain text shown at checkout and in the ready-for-pickup email. active: false deactivates the location: refused while open orders hold stock there, transfers to or from it are in transit, or it's the store's last active location (or last one that fulfills online orders). Its stock stays recorded but stops counting online. active: true reactivates it at the end of the priority. position (0-based, active locations only) moves it in the fulfillment priority.

Request body
{ "location": { "phone": "+1 503 555 0139", "fulfills_online_orders": true, "position": 0 } }
Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/locations/$LOCATION_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "location": { "phone": "+1 503 555 0139", "fulfills_online_orders": true, "position": 0 } }'
Example responseShow
{
  "location": {
    "id": "cm2location01",
    "name": "Warehouse — Gresham",
    "address1": "2650 NE Kane Drive",
    "address2": null,
    "city": "Gresham",
    "province": "Oregon",
    "zip": "97030",
    "country": "United States",
    "country_code": "US",
    "phone": "+1 503 555 0139",
    "active": true,
    "fulfills_online_orders": true,
    "position": 1,
    "local_pickup": { "enabled": false, "ready_in": "24h", "instructions": null },
    "created_at": "2026-09-19T16:00:00.000Z",
    "updated_at": "2026-10-23T09:30:00.000Z"
  }
}