Browse the API docs

Loom Flow

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.

List the app's Loom Flow triggers#

GET/flow/triggers.jsonwrite_flow
Request
curl "https://store.weftgrid.com/api/admin/2026-10/flow/triggers.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "triggers": [
    {
      "handle": "parcel-weighed",
      "type": "custom:cm2appx0001:parcel-weighed",
      "title": "Parcel weighed",
      "description": "The warehouse scale weighed an order's parcel.",
      "fields": [
        {
          "key": "order_id",
          "label": "Order ID",
          "type": "string",
          "example": "cm2ordr0001"
        },
        {
          "key": "weight_kg",
          "label": "Weight (kg)",
          "type": "number",
          "example": 1.4
        }
      ],
      "updated_at": "2026-10-30T09:15:00.000Z"
    }
  ]
}

Declare a Loom Flow trigger#

PUT/flow/triggers/{handle}.jsonwrite_flow

Creates or replaces one of the app's triggers. Merchants then see it under Apps when they choose what starts a workflow, with your title and description.

fields describes the payload you'll send, for the workflow editor's variable picker: each has a key, a label, a type (string, number, money, boolean, date, tags, object, list) and optionally an example and, for objects and lists, fields. Up to 25 triggers per app.

Request body
{
  "trigger": {
    "title": "Parcel weighed",
    "description": "The warehouse scale weighed an order's parcel.",
    "fields": [
      {
        "key": "order_id",
        "label": "Order ID",
        "type": "string",
        "example": "cm2ordr0001"
      },
      {
        "key": "weight_kg",
        "label": "Weight (kg)",
        "type": "number",
        "example": 1.4
      }
    ]
  }
}
Request with curl
curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/flow/triggers/$HANDLE.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "trigger": {
    "title": "Parcel weighed",
    "description": "The warehouse scale weighed an order'\''s parcel.",
    "fields": [
      {
        "key": "order_id",
        "label": "Order ID",
        "type": "string",
        "example": "cm2ordr0001"
      },
      {
        "key": "weight_kg",
        "label": "Weight (kg)",
        "type": "number",
        "example": 1.4
      }
    ]
  }
}'
Example responseShow
{
  "trigger": {
    "handle": "parcel-weighed",
    "type": "custom:cm2appx0001:parcel-weighed",
    "title": "Parcel weighed",
    "description": "The warehouse scale weighed an order's parcel.",
    "fields": [
      {
        "key": "order_id",
        "label": "Order ID",
        "type": "string",
        "example": "cm2ordr0001"
      },
      {
        "key": "weight_kg",
        "label": "Weight (kg)",
        "type": "number",
        "example": 1.4
      }
    ],
    "updated_at": "2026-10-30T09:15:00.000Z"
  }
}

Delete a Loom Flow trigger#

DELETE/flow/triggers/{handle}.jsonwrite_flow

Workflows that start from it stay, but won't start again until it's declared again.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/flow/triggers/$HANDLE.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}

Send a Loom Flow trigger#

POST/flow/triggers/{handle}/fire.jsonwrite_flow

Starts every active workflow on this trigger, with your payload (a JSON object, up to 64 KB) as {{ payload.… }}. Answers 202 with how many runs were queued: 0 when no workflow listens or Loom Flow isn't installed.

Send an event_id to make retries safe to tell apart in the run history.

Request body
{
  "event_id": "scale-88412",
  "payload": {
    "order_id": "cm2ordr0001",
    "weight_kg": 1.4
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/admin/2026-10/flow/triggers/$HANDLE/fire.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "event_id": "scale-88412",
  "payload": {
    "order_id": "cm2ordr0001",
    "weight_kg": 1.4
  }
}'
Example responseShow
{
  "runs_queued": 1,
  "loom_flow_installed": true
}