Browse the API docs

Fulfillment events

A shipment's tracking history: updates from the courier it was booked with, or added by staff.

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

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

fulfillment_event
{
  "id": "cm2fevt0001",
  "fulfillment_id": "cm2fulf0001",
  "order_id": "cm2ordr0001",
  "status": "in_transit",
  "message": "Arrived at Lahore hub",
  "city": "Lahore",
  "happened_at": "2026-10-23T14:20:00.000Z",
  "created_at": "2026-10-23T14:21:05.000Z"
}

List a fulfillment's tracking events#

GET/orders/{order_id}/fulfillments/{fulfillment_id}/events.jsonread_orders

Oldest first. status is one of label_printed, confirmed, picked_up, in_transit, out_for_delivery, attempted_delivery, delivered, failure, on_hold, returning, returned, cancelled; message is the courier's own words.

Request
curl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID/events.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "fulfillment_events": [
    {
      "id": "cm2fevt0001",
      "fulfillment_id": "cm2fulf0001",
      "order_id": "cm2ordr0001",
      "status": "in_transit",
      "message": "Arrived at Lahore hub",
      "city": "Lahore",
      "happened_at": "2026-10-23T14:20:00.000Z",
      "created_at": "2026-10-23T14:21:05.000Z"
    }
  ]
}

Get a tracking event#

GET/orders/{order_id}/fulfillments/{fulfillment_id}/events/{id}.jsonread_orders
Request
curl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID/events/$EVENT_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "fulfillment_event": {
    "id": "cm2fevt0001",
    "fulfillment_id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "in_transit",
    "message": "Arrived at Lahore hub",
    "city": "Lahore",
    "happened_at": "2026-10-23T14:20:00.000Z",
    "created_at": "2026-10-23T14:21:05.000Z"
  }
}

Add a tracking event#

POST/orders/{order_id}/fulfillments/{fulfillment_id}/events.jsonwrite_orders

status is required: one of label_printed, confirmed, picked_up, in_transit, out_for_delivery, attempted_delivery, delivered, failure, on_hold, returning, returned, cancelled. message (500 characters) and city (100) are optional; happened_at (ISO 8601) defaults to now.

When the event is the newest one, the fulfillment's shipment_status becomes its status, the same way a courier update moves it: the customer gets the out for delivery or delivered email (unless the store turned it off), and a cash on delivery parcel booked with a courier marks the order paid on delivery when the store has that on. An event identical to one already there (same status, message and minute) returns that one with status 200 instead of adding it again.

Fires fulfillment_events/create, and fulfillments/update when the fulfillment's status changes. Cancelled fulfillments can't get events.

Request body
{
  "event": {
    "status": "in_transit",
    "message": "Arrived at Lahore hub",
    "city": "Lahore",
    "happened_at": "2026-10-23T14:20:00Z"
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID/events.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "event": {
    "status": "in_transit",
    "message": "Arrived at Lahore hub",
    "city": "Lahore",
    "happened_at": "2026-10-23T14:20:00Z"
  }
}'
Example responseShow
{
  "fulfillment_event": {
    "id": "cm2fevt0001",
    "fulfillment_id": "cm2fulf0001",
    "order_id": "cm2ordr0001",
    "status": "in_transit",
    "message": "Arrived at Lahore hub",
    "city": "Lahore",
    "happened_at": "2026-10-23T14:20:00.000Z",
    "created_at": "2026-10-23T14:21:05.000Z"
  }
}

Delete a tracking event#

DELETE/orders/{order_id}/fulfillments/{fulfillment_id}/events/{id}.jsonwrite_orders

When it was the newest event, the fulfillment takes the status of the newest one left. A payment recorded on delivery stays (refund it if the parcel wasn't delivered). Fires fulfillments/update when the status changes.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID/events/$EVENT_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}