Browse the API docs

Fulfillments

Shipments of some or all of an order's items, with tracking details the customer sees on their order page.

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

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

fulfillment
{
  "id": "cm2fulf0001",
  "order_id": "cm2ordr0001",
  "status": "success",
  "location_id": "cm2locn0001",
  "tracking_company": "UPS",
  "tracking_number": "1Z999AA10123456784",
  "tracking_url": null,
  "courier": null,
  "shipment_status": null,
  "shipment_status_at": null,
  "delivered_at": null,
  "cod_amount": null,
  "line_items": [
    {
      "id": "cm2line0001",
      "quantity": 2
    }
  ],
  "created_at": "2026-10-23T10:05:00.000Z",
  "updated_at": "2026-10-23T10:05:00.000Z"
}

List an order's fulfillments#

GET/orders/{order_id}/fulfillments.jsonread_orders

Oldest first, including cancelled ones (status cancelled).

Request
curl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "fulfillments": [
    {
      "id": "cm2fulf0001",
      "order_id": "cm2ordr0001",
      "status": "success",
      "location_id": "cm2locn0001",
      "tracking_company": "UPS",
      "tracking_number": "1Z999AA10123456784",
      "tracking_url": null,
      "courier": null,
      "shipment_status": null,
      "shipment_status_at": null,
      "delivered_at": null,
      "cod_amount": null,
      "line_items": [
        {
          "id": "cm2line0001",
          "quantity": 2
        }
      ],
      "created_at": "2026-10-23T10:05:00.000Z",
      "updated_at": "2026-10-23T10:05:00.000Z"
    }
  ]
}

Count an order's fulfillments#

GET/orders/{order_id}/fulfillments/count.jsonread_orders
Request
curl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/count.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "count": 1
}

Get a fulfillment#

GET/orders/{order_id}/fulfillments/{id}.jsonread_orders
Request
curl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "fulfillment": {
    "id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "success",
    "location_id": "cm2locn0001",
    "tracking_company": "UPS",
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": null,
    "courier": null,
    "shipment_status": null,
    "shipment_status_at": null,
    "delivered_at": null,
    "cod_amount": null,
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "created_at": "2026-10-23T10:05:00.000Z",
    "updated_at": "2026-10-23T10:05:00.000Z"
  }
}

Fulfill items#

POST/orders/{order_id}/fulfillments.jsonwrite_orders

line_items lists { id, quantity } with the order's line item ids; leave it out to fulfill everything still unfulfilled. tracking_info takes company, number and url (http or https); UPS, USPS, FedEx and DHL Express get a tracking link from the number alone.

notify_customer (default false) emails the customer their shipping confirmation, unless the store has turned that email off. Cancelled orders can't be fulfilled. Fires fulfillments/create and orders/fulfilled or orders/partially_fulfilled.

Request body
{
  "fulfillment": {
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "tracking_info": {
      "company": "UPS",
      "number": "1Z999AA10123456784"
    },
    "notify_customer": true
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fulfillment": {
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "tracking_info": {
      "company": "UPS",
      "number": "1Z999AA10123456784"
    },
    "notify_customer": true
  }
}'
Example responseShow
{
  "fulfillment": {
    "id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "success",
    "location_id": "cm2locn0001",
    "tracking_company": "UPS",
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": null,
    "courier": null,
    "shipment_status": null,
    "shipment_status_at": null,
    "delivered_at": null,
    "cod_amount": null,
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "created_at": "2026-10-23T10:05:00.000Z",
    "updated_at": "2026-10-23T10:05:00.000Z"
  }
}

Update tracking#

POST/fulfillments/{id}/update_tracking.jsonwrite_orders

Fields of tracking_info you leave out keep their values; send null to clear one. notify_customer (default false) emails the customer a shipping update, unless the store has turned that email off. Fires fulfillments/update.

Request body
{
  "fulfillment": {
    "tracking_info": {
      "company": "FedEx",
      "number": "449044304137821"
    },
    "notify_customer": true
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/fulfillments/$FULFILLMENT_ID/update_tracking.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fulfillment": {
    "tracking_info": {
      "company": "FedEx",
      "number": "449044304137821"
    },
    "notify_customer": true
  }
}'
Example responseShow
{
  "fulfillment": {
    "id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "success",
    "location_id": "cm2locn0001",
    "tracking_company": "FedEx",
    "tracking_number": "449044304137821",
    "tracking_url": null,
    "courier": null,
    "shipment_status": null,
    "shipment_status_at": null,
    "delivered_at": null,
    "cod_amount": null,
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "created_at": "2026-10-23T10:05:00.000Z",
    "updated_at": "2026-10-23T10:05:00.000Z"
  }
}

Cancel a fulfillment#

POST/fulfillments/{id}/cancel.jsonwrite_orders

Its items count as unfulfilled again: on an open order their stock is held for it again where they shipped from; on a cancelled order it goes back into stock there. Refused (422) when items in it were refunded or are part of an open return. Fires fulfillments/update.

Request
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/fulfillments/$FULFILLMENT_ID/cancel.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "fulfillment": {
    "id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "cancelled",
    "location_id": "cm2locn0001",
    "tracking_company": "UPS",
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": null,
    "courier": null,
    "shipment_status": null,
    "shipment_status_at": null,
    "delivered_at": null,
    "cod_amount": null,
    "line_items": [
      {
        "id": "cm2line0001",
        "quantity": 2
      }
    ],
    "created_at": "2026-10-23T10:05:00.000Z",
    "updated_at": "2026-10-23T10:05:00.000Z"
  }
}