{
  "openapi": "3.1.0",
  "info": {
    "title": "Floormode REST API",
    "version": "0.1.0",
    "summary": "The external REST surface of the Floormode WMS + OMS, generated from its registry.",
    "description": "The external REST API of Floormode — a WMS + OMS for e-commerce.\n\nEvery endpoint below is generated from the operations registry\n(`src/shared/operations.ts`), which is the single source of truth behind both\nthis API and the MCP server. An operation's **operation id** (`orders_list`)\nnames the same operation on all three surfaces, so what you learn here transfers\nto an agent calling MCP code mode, where the first `_` becomes a dot:\n`app.orders.list({…})`.\n\n## Authentication\n\nSend `Authorization: Bearer <token>`. Two token types are accepted:\n\n- a **WorkOS OAuth access token** — this is the external/agent path; discovery\n  metadata lives at `/.well-known/oauth-protected-resource` (RFC 9728);\n- a **Shopify session token**, when the caller is the embedded app.\n\nThe app's own browser session cookie is also accepted, but that path exists for\nthe standalone SPA, not for integrations. A request with no usable identity is\nanswered `401`.\n\n## Plans\n\nThe external API is open on every plan, also before a plan is chosen. Individual\noperations may declare a minimum plan; that is published per operation as\n`x-min-plan` and repeated in the operation's description. A call below it is\nanswered `403` with `{\"code\": \"plan_required\", \"requiredPlan\": …}` — a plan\nrefusal is an authorization refusal, so it shares the one `403` status with\nevery other `forbidden` answer and is distinguished by its `code`.\n\n## Request shape\n\n- `GET` and `DELETE` take their input from the **query string**. Values are\n  coerced against each parameter's declared type before validation, so\n  `?limit=25` reaches a numeric field as the number `25`. Arrays accept a\n  repeated parameter (`?ids=a&ids=b`) or a JSON array; objects accept JSON.\n- A query parameter the operation does not declare is **refused**, not ignored:\n  `400` with `{\"code\": \"unknown_parameter\", \"unknown\": […], \"accepted\": […]}`.\n  A misspelled filter therefore fails loudly instead of returning an unfiltered\n  list that looks correct.\n- `POST`, `PUT` and `PATCH` take a **JSON body**. Unknown body keys are\n  ignored, so a caller's own envelope fields are harmless.\n\n## Response shape\n\nA success is always `{\"data\": …}`. Because the operation's return contract is\ndeclared on the handler rather than in the published registry, `data` is\ndescribed permissively here; each operation's description says what it returns.\n\nAn error is always `{\"error\": \"<human message>\"}`, plus `\"code\"` whenever the\nfailure is a domain refusal the object classified. Those codes map to HTTP\nstatuses like this:\n\n| Code | HTTP status |\n| --- | --- |\n| `confirmation_required` | 428 |\n| `conflict` | 409 |\n| `forbidden` | 403 |\n| `internal` | 500 |\n| `invalid_input` | 400 |\n| `invalid_output` | 500 |\n| `not_found` | 404 |\n| `organization_changed` | 409 |\n| `payload_too_large` | 413 |\n| `storage_full` | 507 |\n| `unauthorized` | 401 |\n| `unavailable` | 503 |\n| `unknown_function` | 404 |\n\n`GET /api/v1` returns the machine-readable catalog of every operation with its\ninput JSON Schema — the same information as this document, served live by the\nAPI itself. It takes the same bearer credential as every operation (`401`\nwithout one), but needs no plan.\n\n## Topics\n\nEvery operation belongs to one topic, its `x-topic`; the sidebar groups the tags by topic (`x-tagGroups`), the catalog names each entry's `topic`, and MCP's `search({ topics: [\"…\"] })` lists one.\n\n- **Orders** (`orders`): Orders, holds, edits and merges, order routing, automation rules, delivery dates. [Docs](https://docs.floormode.app/features/orders/overview/)\n- **Picking and packing** (`fulfillment`): Pick batches, waves, packing, floor tasks, stations, boxes and day plans. [Docs](https://docs.floormode.app/features/fulfillment/overview/)\n- **Shipping** (`shipping`): Shipments, carriers, labels and printers, manifests, pickups, tracking, exceptions. [Docs](https://docs.floormode.app/features/fulfillment/shipping/)\n- **Receiving** (`receiving`): Expected deliveries, receipts, discrepancies and putaway. [Docs](https://docs.floormode.app/features/inventory/receiving/)\n- **Inventory** (`inventory`): Stock levels and movements, counts, lots and serials, transfers, replenishment, value. [Docs](https://docs.floormode.app/features/inventory/overview/)\n- **Returns** (`returns`): Return requests, receipts, grading and disposition. [Docs](https://docs.floormode.app/features/returns/overview/)\n- **Warehouse layout** (`layout`): Warehouses, the location tree, bins, zones and slotting. [Docs](https://docs.floormode.app/features/settings/warehouses/)\n- **Catalog** (`catalog`): Products and variants: barcodes, dimensions, customs, tracking, product links. [Docs](https://docs.floormode.app/features/inventory/stock/)\n- **Customers** (`customers`): The shopper's tracking pages, customer e-mails, sending domains, privacy requests. [Docs](https://docs.floormode.app/features/settings/customer-notifications/)\n- **People and access** (`people`): Team members, invitations, roles and worker profiles. [Docs](https://docs.floormode.app/features/settings/team/)\n- **Stores and sync** (`integrations`): Connected stores, the Shopify sync and its health, webhooks and event feeds, background updates. [Docs](https://docs.floormode.app/integrations/overview/)\n- **Reports and history** (`reports`): Analytics, dashboards, forecasts, accounting, alerts, timelines and the archive. [Docs](https://docs.floormode.app/features/insights/overview/)\n- **Account and settings** (`account`): The account, its settings, setup, plan, saved views, notes and search. [Docs](https://docs.floormode.app/features/settings/overview/)"
  },
  "servers": [
    {
      "url": "https://{host}",
      "description": "The Cloudflare Worker your Floormode app is deployed on. Replace `host` with your own app domain — every tenant is addressed by the caller's identity, never by the URL.",
      "variables": {
        "host": {
          "default": "app.example.com",
          "description": "Your Floormode app's domain."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "accounting",
      "description": "10 operations under `/api/v1/accounting` (topic `reports`)."
    },
    {
      "name": "alerts",
      "description": "1 operation under `/api/v1/alerts` (topic `reports`)."
    },
    {
      "name": "analytics",
      "description": "8 operations under `/api/v1/analytics` (topic `reports`)."
    },
    {
      "name": "billing",
      "description": "2 operations under `/api/v1/billing` (topic `account`)."
    },
    {
      "name": "bins",
      "description": "10 operations under `/api/v1/bins` (topic `layout`)."
    },
    {
      "name": "boxes",
      "description": "5 operations under `/api/v1/boxes` (topic `fulfillment`)."
    },
    {
      "name": "carriers",
      "description": "5 operations under `/api/v1/carriers` (topic `shipping`)."
    },
    {
      "name": "cartonization",
      "description": "1 operation under `/api/v1/cartonization` (topic `fulfillment`)."
    },
    {
      "name": "catalog",
      "description": "4 operations under `/api/v1/catalog` (topic `catalog`)."
    },
    {
      "name": "checkout-options",
      "description": "2 operations under `/api/v1/checkout-options` (topic `shipping`)."
    },
    {
      "name": "collection-times",
      "description": "3 operations under `/api/v1/collection-times` (topic `shipping`)."
    },
    {
      "name": "collections",
      "description": "1 operation under `/api/v1/collections` (topic `shipping`)."
    },
    {
      "name": "connections",
      "description": "1 operation under `/api/v1/connections` (topic `inventory`)."
    },
    {
      "name": "costing",
      "description": "3 operations under `/api/v1/costing` (topic `inventory`)."
    },
    {
      "name": "costing (reports)",
      "description": "1 operation under `/api/v1/costing` (topic `reports`)."
    },
    {
      "name": "counts",
      "description": "13 operations under `/api/v1/counts` (topic `inventory`)."
    },
    {
      "name": "customer-pages",
      "description": "3 operations under `/api/v1/customer-pages` (topic `customers`)."
    },
    {
      "name": "dangerous-goods",
      "description": "3 operations under `/api/v1/dangerous-goods` (topic `catalog`)."
    },
    {
      "name": "dashboard",
      "description": "5 operations under `/api/v1/dashboard` (topic `reports`)."
    },
    {
      "name": "discovery",
      "description": "Runtime discovery of the API itself."
    },
    {
      "name": "disposition",
      "description": "3 operations under `/api/v1/disposition` (topic `returns`)."
    },
    {
      "name": "domains",
      "description": "4 operations under `/api/v1/domains` (topic `customers`)."
    },
    {
      "name": "entity-events",
      "description": "1 operation under `/api/v1/entity-events` (topic `reports`)."
    },
    {
      "name": "events",
      "description": "6 operations under `/api/v1/events` (topic `integrations`)."
    },
    {
      "name": "exceptions",
      "description": "2 operations under `/api/v1/exceptions` (topic `shipping`)."
    },
    {
      "name": "floor-devices",
      "description": "1 operation under `/api/v1/floor-devices` (topic `people`)."
    },
    {
      "name": "forecast",
      "description": "4 operations under `/api/v1/forecast` (topic `reports`)."
    },
    {
      "name": "freight",
      "description": "3 operations under `/api/v1/freight` (topic `shipping`)."
    },
    {
      "name": "history",
      "description": "9 operations under `/api/v1/history` (topic `reports`)."
    },
    {
      "name": "holds",
      "description": "6 operations under `/api/v1/holds` (topic `orders`)."
    },
    {
      "name": "integrations",
      "description": "3 operations under `/api/v1/integrations` (topic `integrations`)."
    },
    {
      "name": "inventory",
      "description": "32 operations under `/api/v1/inventory` (topic `inventory`)."
    },
    {
      "name": "jobs",
      "description": "2 operations under `/api/v1/jobs` (topic `integrations`)."
    },
    {
      "name": "label-printer-profiles",
      "description": "4 operations under `/api/v1/label-printer-profiles` (topic `shipping`)."
    },
    {
      "name": "label-templates",
      "description": "5 operations under `/api/v1/label-templates` (topic `shipping`)."
    },
    {
      "name": "labour",
      "description": "7 operations under `/api/v1/labour` (topic `fulfillment`)."
    },
    {
      "name": "lanes",
      "description": "12 operations under `/api/v1/lanes` (topic `shipping`)."
    },
    {
      "name": "local-items",
      "description": "7 operations under `/api/v1/local-items` (topic `inventory`)."
    },
    {
      "name": "local-stock",
      "description": "2 operations under `/api/v1/local-stock` (topic `inventory`)."
    },
    {
      "name": "location-types",
      "description": "2 operations under `/api/v1/location-types` (topic `layout`)."
    },
    {
      "name": "locations",
      "description": "23 operations under `/api/v1/locations` (topic `layout`)."
    },
    {
      "name": "lots",
      "description": "10 operations under `/api/v1/lots` (topic `inventory`)."
    },
    {
      "name": "lots (reports)",
      "description": "2 operations under `/api/v1/lots` (topic `reports`)."
    },
    {
      "name": "manifests",
      "description": "3 operations under `/api/v1/manifests` (topic `shipping`)."
    },
    {
      "name": "notes",
      "description": "2 operations under `/api/v1/notes` (topic `account`)."
    },
    {
      "name": "notifications",
      "description": "7 operations under `/api/v1/notifications` (topic `customers`)."
    },
    {
      "name": "orders",
      "description": "33 operations under `/api/v1/orders` (topic `orders`)."
    },
    {
      "name": "orders (customers)",
      "description": "2 operations under `/api/v1/orders` (topic `customers`)."
    },
    {
      "name": "pack-instructions",
      "description": "3 operations under `/api/v1/pack-instructions` (topic `fulfillment`)."
    },
    {
      "name": "packing",
      "description": "26 operations under `/api/v1/packing` (topic `fulfillment`)."
    },
    {
      "name": "people",
      "description": "21 operations under `/api/v1/people` (topic `people`)."
    },
    {
      "name": "picking",
      "description": "31 operations under `/api/v1/picking` (topic `fulfillment`)."
    },
    {
      "name": "pickup-plans",
      "description": "2 operations under `/api/v1/pickup-plans` (topic `shipping`)."
    },
    {
      "name": "pickups",
      "description": "6 operations under `/api/v1/pickups` (topic `shipping`)."
    },
    {
      "name": "print-jobs",
      "description": "2 operations under `/api/v1/print-jobs` (topic `shipping`)."
    },
    {
      "name": "printers",
      "description": "1 operation under `/api/v1/printers` (topic `shipping`)."
    },
    {
      "name": "printnode",
      "description": "1 operation under `/api/v1/printnode` (topic `shipping`)."
    },
    {
      "name": "privacy",
      "description": "4 operations under `/api/v1/privacy` (topic `customers`)."
    },
    {
      "name": "production",
      "description": "1 operation under `/api/v1/production` (topic `fulfillment`)."
    },
    {
      "name": "products",
      "description": "3 operations under `/api/v1/products` (topic `catalog`)."
    },
    {
      "name": "receiving",
      "description": "27 operations under `/api/v1/receiving` (topic `receiving`)."
    },
    {
      "name": "replenishment",
      "description": "2 operations under `/api/v1/replenishment` (topic `inventory`)."
    },
    {
      "name": "return-requests",
      "description": "14 operations under `/api/v1/return-requests` (topic `returns`)."
    },
    {
      "name": "returns",
      "description": "21 operations under `/api/v1/returns` (topic `returns`)."
    },
    {
      "name": "returns (integrations)",
      "description": "1 operation under `/api/v1/returns` (topic `integrations`)."
    },
    {
      "name": "roles",
      "description": "4 operations under `/api/v1/roles` (topic `people`)."
    },
    {
      "name": "routing",
      "description": "13 operations under `/api/v1/routing` (topic `orders`)."
    },
    {
      "name": "rules",
      "description": "12 operations under `/api/v1/rules` (topic `orders`)."
    },
    {
      "name": "saved-views",
      "description": "6 operations under `/api/v1/saved-views` (topic `account`)."
    },
    {
      "name": "scan",
      "description": "1 operation under `/api/v1/scan` (topic `fulfillment`)."
    },
    {
      "name": "search",
      "description": "1 operation under `/api/v1/search` (topic `account`)."
    },
    {
      "name": "serials",
      "description": "5 operations under `/api/v1/serials` (topic `inventory`)."
    },
    {
      "name": "serials (reports)",
      "description": "1 operation under `/api/v1/serials` (topic `reports`)."
    },
    {
      "name": "settings",
      "description": "3 operations under `/api/v1/settings` (topic `account`)."
    },
    {
      "name": "settings (catalog)",
      "description": "2 operations under `/api/v1/settings` (topic `catalog`)."
    },
    {
      "name": "settings (fulfillment)",
      "description": "2 operations under `/api/v1/settings` (topic `fulfillment`)."
    },
    {
      "name": "settings (inventory)",
      "description": "2 operations under `/api/v1/settings` (topic `inventory`)."
    },
    {
      "name": "settings (orders)",
      "description": "3 operations under `/api/v1/settings` (topic `orders`)."
    },
    {
      "name": "setup",
      "description": "2 operations under `/api/v1/setup` (topic `account`)."
    },
    {
      "name": "sheet-imports",
      "description": "4 operations under `/api/v1/sheet-imports` (topic `layout`)."
    },
    {
      "name": "shipments",
      "description": "14 operations under `/api/v1/shipments` (topic `shipping`)."
    },
    {
      "name": "shipping",
      "description": "1 operation under `/api/v1/shipping` (topic `shipping`)."
    },
    {
      "name": "shipping-rules",
      "description": "6 operations under `/api/v1/shipping-rules` (topic `shipping`)."
    },
    {
      "name": "shopify-locations",
      "description": "2 operations under `/api/v1/shopify-locations` (topic `integrations`)."
    },
    {
      "name": "sku-slotting",
      "description": "4 operations under `/api/v1/sku-slotting` (topic `layout`)."
    },
    {
      "name": "slotting",
      "description": "10 operations under `/api/v1/slotting` (topic `layout`)."
    },
    {
      "name": "station-supplies",
      "description": "6 operations under `/api/v1/station-supplies` (topic `fulfillment`)."
    },
    {
      "name": "stations",
      "description": "8 operations under `/api/v1/stations` (topic `fulfillment`)."
    },
    {
      "name": "stocktakes",
      "description": "15 operations under `/api/v1/stocktakes` (topic `inventory`)."
    },
    {
      "name": "store",
      "description": "1 operation under `/api/v1/store` (topic `account`)."
    },
    {
      "name": "stores",
      "description": "6 operations under `/api/v1/stores` (topic `integrations`)."
    },
    {
      "name": "stores (catalog)",
      "description": "2 operations under `/api/v1/stores` (topic `catalog`)."
    },
    {
      "name": "sync",
      "description": "9 operations under `/api/v1/sync` (topic `integrations`)."
    },
    {
      "name": "tasks",
      "description": "16 operations under `/api/v1/tasks` (topic `fulfillment`)."
    },
    {
      "name": "tenant",
      "description": "1 operation under `/api/v1/tenant` (topic `account`)."
    },
    {
      "name": "trackers",
      "description": "1 operation under `/api/v1/trackers` (topic `shipping`)."
    },
    {
      "name": "tracking-brand",
      "description": "1 operation under `/api/v1/tracking-brand` (topic `customers`)."
    },
    {
      "name": "user-prefs",
      "description": "4 operations under `/api/v1/user-prefs` (topic `account`)."
    },
    {
      "name": "values",
      "description": "1 operation under `/api/v1/values` (topic `account`)."
    },
    {
      "name": "variants",
      "description": "18 operations under `/api/v1/variants` (topic `catalog`)."
    },
    {
      "name": "warehouse-transfers",
      "description": "15 operations under `/api/v1/warehouse-transfers` (topic `inventory`)."
    },
    {
      "name": "warehouses",
      "description": "15 operations under `/api/v1/warehouses` (topic `layout`)."
    },
    {
      "name": "waves",
      "description": "9 operations under `/api/v1/waves` (topic `fulfillment`)."
    },
    {
      "name": "webhooks",
      "description": "12 operations under `/api/v1/webhooks` (topic `integrations`)."
    },
    {
      "name": "work",
      "description": "2 operations under `/api/v1/work` (topic `fulfillment`)."
    },
    {
      "name": "worker-profiles",
      "description": "4 operations under `/api/v1/worker-profiles` (topic `people`)."
    },
    {
      "name": "zones",
      "description": "6 operations under `/api/v1/zones` (topic `layout`)."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Orders",
      "x-topic": "orders",
      "tags": [
        "holds",
        "orders",
        "routing",
        "rules",
        "settings (orders)"
      ]
    },
    {
      "name": "Picking and packing",
      "x-topic": "fulfillment",
      "tags": [
        "boxes",
        "cartonization",
        "labour",
        "pack-instructions",
        "packing",
        "picking",
        "production",
        "scan",
        "settings (fulfillment)",
        "station-supplies",
        "stations",
        "tasks",
        "waves",
        "work"
      ]
    },
    {
      "name": "Shipping",
      "x-topic": "shipping",
      "tags": [
        "carriers",
        "checkout-options",
        "collection-times",
        "collections",
        "exceptions",
        "freight",
        "label-printer-profiles",
        "label-templates",
        "lanes",
        "manifests",
        "pickup-plans",
        "pickups",
        "print-jobs",
        "printers",
        "printnode",
        "shipments",
        "shipping",
        "shipping-rules",
        "trackers"
      ]
    },
    {
      "name": "Receiving",
      "x-topic": "receiving",
      "tags": [
        "receiving"
      ]
    },
    {
      "name": "Inventory",
      "x-topic": "inventory",
      "tags": [
        "connections",
        "costing",
        "counts",
        "inventory",
        "local-items",
        "local-stock",
        "lots",
        "replenishment",
        "serials",
        "settings (inventory)",
        "stocktakes",
        "warehouse-transfers"
      ]
    },
    {
      "name": "Returns",
      "x-topic": "returns",
      "tags": [
        "disposition",
        "return-requests",
        "returns"
      ]
    },
    {
      "name": "Warehouse layout",
      "x-topic": "layout",
      "tags": [
        "bins",
        "location-types",
        "locations",
        "sheet-imports",
        "sku-slotting",
        "slotting",
        "warehouses",
        "zones"
      ]
    },
    {
      "name": "Catalog",
      "x-topic": "catalog",
      "tags": [
        "catalog",
        "dangerous-goods",
        "products",
        "settings (catalog)",
        "stores (catalog)",
        "variants"
      ]
    },
    {
      "name": "Customers",
      "x-topic": "customers",
      "tags": [
        "customer-pages",
        "domains",
        "notifications",
        "orders (customers)",
        "privacy",
        "tracking-brand"
      ]
    },
    {
      "name": "People and access",
      "x-topic": "people",
      "tags": [
        "floor-devices",
        "people",
        "roles",
        "worker-profiles"
      ]
    },
    {
      "name": "Stores and sync",
      "x-topic": "integrations",
      "tags": [
        "events",
        "integrations",
        "jobs",
        "returns (integrations)",
        "shopify-locations",
        "stores",
        "sync",
        "webhooks"
      ]
    },
    {
      "name": "Reports and history",
      "x-topic": "reports",
      "tags": [
        "accounting",
        "alerts",
        "analytics",
        "costing (reports)",
        "dashboard",
        "entity-events",
        "forecast",
        "history",
        "lots (reports)",
        "serials (reports)"
      ]
    },
    {
      "name": "Account and settings",
      "x-topic": "account",
      "tags": [
        "billing",
        "notes",
        "saved-views",
        "search",
        "settings",
        "setup",
        "store",
        "tenant",
        "user-prefs",
        "values"
      ]
    },
    {
      "name": "This API",
      "tags": [
        "discovery"
      ]
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "operations_catalog",
        "summary": "List every operation this API exposes, with its input JSON Schema.",
        "description": "The self-describing catalog. Returns the same operations this document describes, straight from the running registry — a client that wants to discover the surface at runtime reads this instead of shipping a copy of the spec. Bearer-gated like every operation below it (audit S-14), but needs no plan.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "The operations catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationsCatalog"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/v1/accounting/connection": {
      "get": {
        "operationId": "accounting_connection_get",
        "summary": "accounting_connection_get",
        "description": "The connected ledger (QuickBooks Online or Xero) Floormode posts each closed month to as ONE journal (the same lines accounting_export answers): its status (active, needs_reauth), the ledger's name and base currency, its lock date, the mapping of the journal's roles (stock, stockChange, cogs) to ledger accounts and of warehouses to tracking options and whether it is complete, automatic posting, the first month posted (postFrom), the first month still owed, the last refusal waiting for a person, a provider's wait (retryAt), and the newest journal legs. connection is null without a ledger. No token or customer data.\n\n**Operation id:** `accounting_connection_get` — the same operation is `app.accounting.connection_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_connection_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "attentionAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}:-?\\d{1,6}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "accounting_connection_set",
        "summary": "accounting_connection_set",
        "description": "Change how the connected ledger is posted to: the mapping (each role to a ledger account from accounting_ledger_options, warehouses to tracking options), automatic posting on or off, the first month posted (postFrom; an earlier month owes its posts), and what a locked month does (ask, or next_open: post on the first open day). Saving what is stored changes nothing; a mapping that fixes a refused month resumes posting.\n\n**Operation id:** `accounting_connection_set` — the same operation is `app.accounting.connection_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_connection_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "accounts": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "stock",
                            "stockChange",
                            "cogs"
                          ]
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "code": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 32
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            }
                          },
                          "required": [
                            "id",
                            "code",
                            "name"
                          ]
                        }
                      },
                      "tracking": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "categoryId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "format": "floormode-id",
                                "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                              },
                              "categoryName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "options": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "maxLength": 64
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 64
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 160
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "categoryId",
                              "categoryName",
                              "options"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "accounts",
                      "tracking"
                    ]
                  },
                  "autoPost": {
                    "type": "boolean"
                  },
                  "postFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "lockedPeriod": {
                    "type": "string",
                    "enum": [
                      "ask",
                      "next_open"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/accounting/disconnect": {
      "post": {
        "operationId": "accounting_disconnect",
        "summary": "accounting_disconnect",
        "description": "Disconnect the ledger: Floormode revokes its access at QuickBooks or Xero (best effort) and deletes the stored tokens. The journals already posted stay in the ledger and in accounting_posts_list.\n\n**Operation id:** `accounting_disconnect` — the same operation is `app.accounting.disconnect({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_disconnect`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/accounting/export": {
      "get": {
        "operationId": "accounting_export",
        "summary": "accounting_export",
        "description": "A month's accounting figures for the accountant, read from the history archive's books: the cost of goods sold and the stock value at the month's end and start, per currency (cents), the journal lines the chosen booking method posts (debit and credit account, per warehouse when the setup splits), the shipments without a cost, the month's state (ready, waiting for its books, open, first, empty, no_costs, books_required, setup) and the files: download them from GET /api/accounting/export/{YYYY-MM}?format=datev|xero|csv. The month is a calendar month in the store's first warehouse's time zone; without one, the month that closed last (currentMonth names the open one).\n\n**Operation id:** `accounting_export` — the same operation is `app.accounting.export({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_export`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "The month, `YYYY-MM`, on the calendar of the store's first warehouse. Absent: the month that closed last.",
            "schema": {
              "description": "The month, `YYYY-MM`, on the calendar of the store's first warehouse. Absent: the month that closed last.",
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Which file `files` names first; the figures are the same.",
            "schema": {
              "description": "Which file `files` names first; the figures are the same.",
              "type": "string",
              "enum": [
                "datev",
                "xero",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/accounting/ledger-options": {
      "get": {
        "operationId": "accounting_ledger_options",
        "summary": "accounting_ledger_options",
        "description": "The connected ledger's accounts (id, code, name, type, active) and tracking categories with their options, read from QuickBooks or Xero now: what accounting_connection_set's mapping chooses from.\n\n**Operation id:** `accounting_ledger_options` — the same operation is `app.accounting.ledger_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_ledger_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/accounting/post-now": {
      "post": {
        "operationId": "accounting_post_now",
        "summary": "accounting_post_now",
        "description": "Post a closed month to the connected ledger now, whether automatic posting is on or off; `postOn` (YYYY-MM-DD) posts a locked month on that open day instead. A month posted already is changed with accounting_repost. Irreversible: the journal lands in the merchant's books.\n\n**Operation id:** `accounting_post_now` — the same operation is `app.accounting.post_now({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_post_now`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "postOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "month"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/accounting/posts": {
      "get": {
        "operationId": "accounting_posts_list",
        "summary": "accounting_posts_list",
        "description": "The journals Floormode posted to the connected ledger, newest month first: per leg the month, revision, kind (journal or reversal), status (planned, posting, posted, unknown, refused, nothing), the reference (FM-… in QuickBooks' DocNumber, in Xero's narration), the amount in cents, the posting day, the ledger's journal id and a refusal's reason. Pages with `cursor`.\n\n**Operation id:** `accounting_posts_list` — the same operation is `app.accounting.posts_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_posts_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/accounting/posts/resolve": {
      "post": {
        "operationId": "accounting_leg_resolve",
        "summary": "accounting_leg_resolve",
        "description": "Settle a journal Floormode cannot confirm: check reads the ledger again, posted takes the person's word (with the ledger's journal id when known), post_again sends it under a new key (irreversible: check the ledger first), reversed_by_hand closes a refused reversal the merchant booked in the ledger themselves.\n\n**Operation id:** `accounting_leg_resolve` — the same operation is `app.accounting.leg_resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_leg_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "legId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "check",
                      "posted",
                      "post_again",
                      "reversed_by_hand"
                    ]
                  },
                  "journalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  }
                },
                "required": [
                  "legId",
                  "resolution"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/accounting/repost": {
      "post": {
        "operationId": "accounting_repost",
        "summary": "accounting_repost",
        "description": "Correct a posted month: Floormode reverses the posted journal from its own posted lines, then posts the month's journal again from today's figures (a month that is now zero is only reversed). One open re-post a month. Irreversible.\n\n**Operation id:** `accounting_repost` — the same operation is `app.accounting.repost({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_repost`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  "postOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "month"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/accounting/settings": {
      "post": {
        "operationId": "accounting_settings_set",
        "summary": "accounting_settings_set",
        "description": "Save how the accounting export books a month, once for the store: the chart of accounts (skr03, skr04, xero or custom), whether purchases are booked as expense (the month posts the change of the stock value) or to stock (it posts the cost of goods sold), the accounts (digits of the DATEV account length for SKR and custom, up to 10 letters or digits for Xero), whether lines are split by warehouse, and the DATEV and Xero details. Saving what is stored changes nothing.\n\n**Operation id:** `accounting_settings_set` — the same operation is `app.accounting.settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/accounting_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "accounting"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "v": {
                    "type": "number",
                    "const": 1
                  },
                  "chart": {
                    "type": "string",
                    "enum": [
                      "skr03",
                      "skr04",
                      "xero",
                      "custom",
                      "ledger"
                    ]
                  },
                  "purchasesAre": {
                    "type": "string",
                    "enum": [
                      "expense",
                      "stock"
                    ]
                  },
                  "accounts": {
                    "type": "object",
                    "properties": {
                      "stock": {
                        "type": "string",
                        "maxLength": 10
                      },
                      "stockChange": {
                        "type": "string",
                        "maxLength": 10
                      },
                      "cogs": {
                        "type": "string",
                        "maxLength": 10
                      }
                    },
                    "required": [
                      "stock",
                      "stockChange",
                      "cogs"
                    ]
                  },
                  "splitByWarehouse": {
                    "type": "boolean"
                  },
                  "datev": {
                    "type": "object",
                    "properties": {
                      "consultantNumber": {
                        "type": "string",
                        "pattern": "^(\\d{4,7})?$"
                      },
                      "clientNumber": {
                        "type": "string",
                        "pattern": "^(\\d{1,5})?$"
                      },
                      "accountLength": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 8
                      },
                      "fiscalYearStartMonth": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      }
                    },
                    "required": [
                      "consultantNumber",
                      "clientNumber",
                      "accountLength",
                      "fiscalYearStartMonth"
                    ]
                  },
                  "xero": {
                    "type": "object",
                    "properties": {
                      "region": {
                        "type": "string",
                        "enum": [
                          "uk",
                          "au",
                          "nz",
                          "us"
                        ]
                      },
                      "taxRate": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      }
                    },
                    "required": [
                      "region",
                      "taxRate"
                    ]
                  }
                },
                "required": [
                  "v",
                  "chart",
                  "purchasesAre",
                  "accounts",
                  "splitByWarehouse",
                  "datev",
                  "xero"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/alerts": {
      "get": {
        "operationId": "alerts_list",
        "summary": "alerts_list",
        "description": "The tenant's operational alert timeline: SLA breaches, sync-failure spikes, count variances, near-expiry lots, inventory writer gaps, peer outages. Each row carries the alert `type`, `severity` (info, warning, critical), `message`, the `entityRef` it is about (`ffd:<entity>:<id>`) and who raised it. Recorded whether or not Alertified is connected — forwarding is what the connection gates. Filter by a set of `severities`, a set of `types` (any of these alert types, a closed vocabulary; the input schema lists every member, e.g. [\"sla_breach\"]), an instant (`atFromMs`) or `notSent`; sort newest first (default) or oldest first; a disclosed page (`rows`/`capped`/`cursor`, max 50): pass the answered `cursor` back. Cursors issued before 2026-10-06 are refused; restart from page one.\n\n**Operation id:** `alerts_list` — the same operation is `app.alerts.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/alerts_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "alerts"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "severities",
            "in": "query",
            "required": false,
            "description": "Any of these severities; absent = every severity. Repeat `severities` for each value (`?severities=info&severities=warning`), or pass a JSON array (`?severities=[\"info\",\"warning\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "info",
              "warning"
            ],
            "schema": {
              "description": "Any of these severities; absent = every severity.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "info",
                  "warning",
                  "critical"
                ]
              }
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Any of these alert types, e.g. [\"sla_breach\", \"sync_failure\"] (the catalog lists them all); absent = every type. Repeat `types` for each value (`?types=sla_breach&types=sync_failure`), or pass a JSON array (`?types=[\"sla_breach\",\"sync_failure\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "sla_breach",
              "sync_failure"
            ],
            "schema": {
              "description": "Any of these alert types, e.g. [\"sla_breach\", \"sync_failure\"] (the catalog lists them all); absent = every type.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "automation_rule",
                  "backorder",
                  "backorder_restocked",
                  "barcode_aliases_refused",
                  "checkout_options_cap_reached",
                  "count_variance",
                  "external_fulfillment_unbooked",
                  "fo_close_deferred",
                  "fulfillment_cancel_restocked",
                  "handback_overdue",
                  "integration_key_reuse",
                  "inventory_writer_drift",
                  "inventory_writer_drift_cleared",
                  "inventory_writer_gap",
                  "landed_cost_refused",
                  "local_snapshot_skipped",
                  "lot_blocked",
                  "lot_expiry_tightened",
                  "near_expiry",
                  "order_action_attention",
                  "order_edit_mirror_refresh_dead",
                  "order_refresh_dead",
                  "oversell_risk",
                  "pack_ship_skipped",
                  "packaging_short",
                  "payment_auth_window",
                  "peer_capability_revoked",
                  "peer_reachable",
                  "peer_unreachable",
                  "pick_lines_dropped",
                  "pick_release_skipped",
                  "po_push_confirmation_overflow",
                  "receipt_price_deviation",
                  "refund_failure",
                  "refund_restock_unreceived",
                  "refund_stock_unbooked",
                  "reorder_suggested",
                  "return_label_unprintable",
                  "shipment_weight_estimated",
                  "sibling_report_refused",
                  "sla_breach",
                  "source_lines_exceeded",
                  "station_supply_unrefillable",
                  "stock_release_clamped",
                  "sync_failure",
                  "token_refresh_refused",
                  "token_refresh_unresolved",
                  "transfer_source_effect_refused",
                  "wave_auto_release_refused",
                  "webhook_endpoint_off"
                ]
              }
            }
          },
          {
            "name": "atFromMs",
            "in": "query",
            "required": false,
            "description": "Alerts at or after this instant (milliseconds since 1970, UTC).",
            "schema": {
              "description": "Alerts at or after this instant (milliseconds since 1970, UTC).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "`open` (the default: alerts whose condition still holds) or `all` (resolved ones too).",
            "schema": {
              "description": "`open` (the default: alerts whose condition still holds) or `all` (resolved ones too).",
              "type": "string",
              "enum": [
                "open",
                "all"
              ]
            }
          },
          {
            "name": "notSent",
            "in": "query",
            "required": false,
            "description": "Only alerts that could not be forwarded. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only alerts that could not be forwarded.",
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
            "schema": {
              "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
              "type": "string",
              "enum": [
                "at:desc",
                "at:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Alerts per page (max 50).",
            "schema": {
              "description": "Alerts per page (max 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/adjustments-by-reason": {
      "get": {
        "operationId": "analytics_adjustments_by_reason",
        "summary": "analytics_adjustments_by_reason",
        "description": "Stock adjustments grouped by reason code in the window: unsigned units, signed net and movement counts from the adjust ledger. Bounded scan.\n\n**Operation id:** `analytics_adjustments_by_reason` — the same operation is `app.analytics.adjustments_by_reason({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_adjustments_by_reason`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Window start, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window start, epoch milliseconds (inclusive)."
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Window end, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window end, epoch milliseconds (inclusive)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/fulfillment-times": {
      "get": {
        "operationId": "analytics_fulfillment_times",
        "summary": "analytics_fulfillment_times",
        "description": "The team's fulfillment times per day over each warehouse's last `days` calendar days (1 = today, at most a year) or its month or year to date (`toDate`; exactly one of the two), in one warehouse or every one, each warehouse on its own calendar (its time zone, else UTC): customer pick batches completed and the units they picked, parcels completed, the typical (median) pick time per batch and pack time per parcel, and units picked per hour of walking (over timed batches only), plus the same figures for the whole window. Team totals only, never a figure per person: a time or rate taken over fewer than two people is withheld (null, with `pickWithheld` or `packWithheld`), per day and for the window; the other kind's figure stays. Counts are exact; a typical time is the middle of the median's duration bucket (eight to each doubling), within about 4 %. Read as one row a day and warehouse; parcels completed are the one count of parcels packed (dashboard_output and packing_time_summary count today the same).\n\n**Operation id:** `analytics_fulfillment_times` — the same operation is `app.analytics.fulfillment_times({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_fulfillment_times`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
            "schema": {
              "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
              "type": "integer",
              "minimum": 1,
              "maximum": 366
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "required": false,
            "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
            "schema": {
              "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
              "type": "string",
              "enum": [
                "month",
                "year"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "One warehouse; absent or null = every warehouse.",
            "schema": {
              "description": "One warehouse; absent or null = every warehouse.",
              "anyOf": [
                {
                  "type": "string",
                  "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                  "format": "floormode-id"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/inventory-value": {
      "get": {
        "operationId": "analytics_inventory_value",
        "summary": "analytics_inventory_value",
        "description": "Current inventory value: Σ on-hand across bins × variant unit price (a point-in-time snapshot, no date range). Unit cost is not mirrored from Shopify, so the basis is the selling price (reported via `basis`).\n\n**Operation id:** `analytics_inventory_value` — the same operation is `app.analytics.inventory_value({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_inventory_value`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/on-time-ship": {
      "get": {
        "operationId": "analytics_on_time_ship",
        "summary": "analytics_on_time_ship",
        "description": "On-time-ship percentage for shipments in the window (shipped on or before the fulfillment order's fulfillBy). Only shipments whose order has a due date are counted; `unmeasured` is the number shipped without one.\n\n**Operation id:** `analytics_on_time_ship` — the same operation is `app.analytics.on_time_ship({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_on_time_ship`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Window start, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window start, epoch milliseconds (inclusive)."
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Window end, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window end, epoch milliseconds (inclusive)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/order-cycle-time": {
      "get": {
        "operationId": "analytics_order_cycle_time",
        "summary": "analytics_order_cycle_time",
        "description": "Order cycle time in hours (created → first shipment) for orders shipped in the window: count, average, median, p90 and a per-day average series.\n\n**Operation id:** `analytics_order_cycle_time` — the same operation is `app.analytics.order_cycle_time({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_order_cycle_time`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Window start, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window start, epoch milliseconds (inclusive)."
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Window end, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window end, epoch milliseconds (inclusive)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/pick-accuracy": {
      "get": {
        "operationId": "analytics_pick_accuracy",
        "summary": "analytics_pick_accuracy",
        "description": "Pick accuracy over the same span as analytics_throughput: lines picked in full / (picked in full + short), counted when their pick list is finished, on each warehouse's own calendar, plus a per-day picked/short series. Lines, not scans: a line picked in part and then reported short is one short line. A day whose lines were not counted yet (before the counting started) is left out. Read as one row a day and warehouse; `capped` only when there are more warehouses than one read takes.\n\n**Operation id:** `analytics_pick_accuracy` — the same operation is `app.analytics.pick_accuracy({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_pick_accuracy`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
            "schema": {
              "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
              "type": "integer",
              "minimum": 1,
              "maximum": 366
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "required": false,
            "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
            "schema": {
              "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
              "type": "string",
              "enum": [
                "month",
                "year"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "One warehouse; absent or null = every warehouse.",
            "schema": {
              "description": "One warehouse; absent or null = every warehouse.",
              "anyOf": [
                {
                  "type": "string",
                  "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                  "format": "floormode-id"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/return-rate-by-reason": {
      "get": {
        "operationId": "analytics_return_rate_by_reason",
        "summary": "analytics_return_rate_by_reason",
        "description": "Returned units grouped by reason code, from return ledger movements in the window. Bounded scan with capped/scannedThrough disclosure.\n\n**Operation id:** `analytics_return_rate_by_reason` — the same operation is `app.analytics.return_rate_by_reason({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_return_rate_by_reason`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Window start, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window start, epoch milliseconds (inclusive)."
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Window end, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window end, epoch milliseconds (inclusive)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/analytics/throughput": {
      "get": {
        "operationId": "analytics_throughput",
        "summary": "analytics_throughput",
        "description": "Items picked per day over each warehouse's last `days` calendar days (1 = today, at most a year) or its month or year to date (`toDate`; exactly one of the two), each warehouse on its own calendar: the units of the customer pick lists finished that day (a list still being picked counts once finished, a cancelled one never), as team totals (never per person). The same days analytics_fulfillment_times counts parcels packed on. Read as one row a day and warehouse; `capped` only when there are more warehouses than one read takes.\n\n**Operation id:** `analytics_throughput` — the same operation is `app.analytics.throughput({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/analytics_throughput`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "analytics"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
            "schema": {
              "description": "How many of each warehouse's own calendar days, ending with its today: 1 = today, 7 = today and the six days before it. At most a year.",
              "type": "integer",
              "minimum": 1,
              "maximum": 366
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "required": false,
            "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
            "schema": {
              "description": "Each warehouse's month or year so far, by its own calendar, its today included.",
              "type": "string",
              "enum": [
                "month",
                "year"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "One warehouse; absent or null = every warehouse.",
            "schema": {
              "description": "One warehouse; absent or null = every warehouse.",
              "anyOf": [
                {
                  "type": "string",
                  "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                  "format": "floormode-id"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/billing": {
      "get": {
        "operationId": "billing_current",
        "summary": "billing_current",
        "description": "The tenant's subscription plan (none/essential/elevate/enhanced/enterprise), its status (active/cancelled), the managed-pricing plan name, the current period end and `effectivePlan` — the plan that actually grants features (only an active subscription counts; a cancelled one degrades to none).\n\n**Operation id:** `billing_current` — the same operation is `app.billing.current({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/billing_current`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "billing"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/billing/usage": {
      "get": {
        "operationId": "billing_usage",
        "summary": "billing_usage",
        "description": "The current billing period's order volume against the plan's allowance: the period bounds (epoch ms), `ordersInPeriod`, the effective plan's `limit` (null = no enforced allowance), `overLimit` and the cheapest `recommendedPlan` whose allowance covers the volume. Counts first operational release once per order. Exceeding grants grace through the confirmed cycle end; only new admissions then require a sufficient confirmed plan. No usage fees. Unknown cycle bounds are null; existing work always continues.\n\n**Operation id:** `billing_usage` — the same operation is `app.billing.usage({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/billing_usage`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "billing"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/bins": {
      "get": {
        "operationId": "bins_list",
        "summary": "bins_list",
        "description": "One warehouse's bins, a disclosed page at a time (`rows`/`capped`/`cursor`, max 200): by code (`code:asc`, the default) or along the pick route (`route:asc`). Every filter is a server predicate: a case-insensitive code prefix or a whole barcode (`search`), `zoneId`, a set of `binTypes`, `level` (`bins` = the stock-holding leaves, the default; `all` = every layout level), `state` (`active` by default, `archived`, `all`), `occupancy`, `sellable`, `pickable`, `flagged`, or an exact `code`. Pass the answered `cursor` back; a cursor from other filters, another warehouse or a reordered route is refused as `stale_cursor`. Without `warehouseId` it lists every warehouse's bins in code order (the route sorts are refused, walk_needs_warehouse). Since 2026-10-06 `search` matches a code prefix or a whole barcode (no longer a substring); the former zone-code, include-archived and single-type arguments are refused.\n\n**Operation id:** `bins_list` — the same operation is `app.bins.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "The warehouse whose bins are listed; absent: every warehouse's, in code order (the route sorts need a warehouse).",
            "schema": {
              "description": "The warehouse whose bins are listed; absent: every warehouse's, in code order (the route sorts need a warehouse).",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "A code prefix (case-insensitive) or a whole barcode.",
            "schema": {
              "description": "A code prefix (case-insensitive) or a whole barcode.",
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Only bins in this zone.",
            "schema": {
              "description": "Only bins in this zone.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "binTypes",
            "in": "query",
            "required": false,
            "description": "Any of these bin types; absent (or every type) = every type. Repeat `binTypes` for each value (`?binTypes=receiving&binTypes=qc`), or pass a JSON array (`?binTypes=[\"receiving\",\"qc\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "receiving",
              "qc"
            ],
            "schema": {
              "description": "Any of these bin types; absent (or every type) = every type.",
              "minItems": 1,
              "maxItems": 11,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "receiving",
                  "qc",
                  "quarantine",
                  "bulk",
                  "pick",
                  "packing",
                  "staging",
                  "returns",
                  "unassigned",
                  "lane",
                  "dock_door"
                ]
              }
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "`bins` (stock-holding leaves, the default) or `all` levels of the layout tree.",
            "schema": {
              "description": "`bins` (stock-holding leaves, the default) or `all` levels of the layout tree.",
              "type": "string",
              "enum": [
                "bins",
                "all"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "`active` (the default), `archived` or `all`.",
            "schema": {
              "description": "`active` (the default), `archived` or `all`.",
              "type": "string",
              "enum": [
                "active",
                "archived",
                "all"
              ]
            }
          },
          {
            "name": "occupancy",
            "in": "query",
            "required": false,
            "description": "`empty` (nothing booked in the bin) or `occupied`.",
            "schema": {
              "description": "`empty` (nothing booked in the bin) or `occupied`.",
              "type": "string",
              "enum": [
                "empty",
                "occupied"
              ]
            }
          },
          {
            "name": "sellable",
            "in": "query",
            "required": false,
            "description": "Only sellable (true) or non-sellable (false) bins. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only sellable (true) or non-sellable (false) bins.",
              "type": "boolean"
            }
          },
          {
            "name": "pickable",
            "in": "query",
            "required": false,
            "description": "Only pickable (true) or non-pickable (false) bins. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only pickable (true) or non-pickable (false) bins.",
              "type": "boolean"
            }
          },
          {
            "name": "flagged",
            "in": "query",
            "required": false,
            "description": "Only bins with (true) or without (false) a problem flag. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only bins with (true) or without (false) a problem flag.",
              "type": "boolean"
            }
          },
          {
            "name": "blocked",
            "in": "query",
            "required": false,
            "description": "Only bins a person blocked (true: their stock is not picked or promised) or bins nobody blocked (false). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only bins a person blocked (true: their stock is not picked or promised) or bins nobody blocked (false).",
              "type": "boolean"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "description": "Exact bin code, case-insensitive: the one-row lookup a deep link needs.",
            "schema": {
              "description": "Exact bin code, case-insensitive: the one-row lookup a deep link needs.",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`code:asc` (by code, the default), `code:desc` (by code, Z to A), `route:asc` (along the pick route) or `route:desc` (the pick route from its last bin).",
            "schema": {
              "description": "`code:asc` (by code, the default), `code:desc` (by code, Z to A), `route:asc` (along the pick route) or `route:desc` (the pick route from its last bin).",
              "type": "string",
              "enum": [
                "code:asc",
                "code:desc",
                "route:asc",
                "route:desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Bins per page (max 200).",
            "schema": {
              "description": "Bins per page (max 200).",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "bins_create",
        "summary": "bins_create",
        "description": "Create one bin. The code is uppercased and must be unique inside the warehouse; barcode defaults to the code and pick sequence to the end of the warehouse. A code or barcode a live cart or one of its slots answers to is refused (cart_code_taken).\n\n**Operation id:** `bins_create` — the same operation is `app.bins.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "barcode": {
                    "type": "string"
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "binType": {
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "pickable": {
                    "type": "boolean"
                  },
                  "sellable": {
                    "type": "boolean"
                  },
                  "shopifyInventoryState": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "available",
                          "damaged",
                          "reserved",
                          "quality_control",
                          "safety_stock"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "code",
                  "binType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/bins/archive": {
      "post": {
        "operationId": "bins_archive",
        "summary": "bins_archive",
        "description": "Archive a bin. Rejected while the bin still holds stock or reservations.\n\n**Operation id:** `bins_archive` — the same operation is `app.bins.archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "binId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/bins/block": {
      "post": {
        "operationId": "bins_block",
        "summary": "bins_block",
        "description": "Block a bin: from now nothing in it is planned or picked. Its reservations that no pick work owns are re-planned onto other bins, or the order goes short; picks already under way stay with their pickers, whose next scan of the bin is refused (source_not_pickable) with the way on. cause: damaged, inspection, recall, unreachable or other; note up to 500 characters. stopSelling: also make the bin not sellable, its units named in Shopify as damaged (damaged), quality_control (inspection, recall) or safety_stock (unreachable, other) — only when the sellable switch's own rule allows it; the block commits either way. A blocked bin takes the new cause and note. Answers { replanned, ordersShort, beingPicked { count, units, batches, capped }, pending (a background pass re-plans the rest), stopSelling (done, after_picks: reservations still stand on a live item; needs_count: the switch refused, stopSellingWords says why; not_asked), stopSellingWords }.\n\n**Operation id:** `bins_block` — the same operation is `app.bins.block({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_block`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "document id of the bin.",
                    "format": "floormode-id"
                  },
                  "cause": {
                    "type": "string",
                    "enum": [
                      "damaged",
                      "inspection",
                      "recall",
                      "unreachable",
                      "other"
                    ],
                    "description": "Why: damaged, inspection, recall, unreachable or other."
                  },
                  "note": {
                    "description": "Shown on the bin, in its timeline and on the floor's refusal.",
                    "type": "string",
                    "maxLength": 500
                  },
                  "stopSelling": {
                    "description": "Also stop selling the bin's units (default false). Shopify then counts them by cause: damaged, quality control or safety stock.",
                    "type": "boolean"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "binId",
                  "cause"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/bins/block-preview": {
      "get": {
        "operationId": "bins_block_preview",
        "summary": "bins_block_preview",
        "description": "What blocking a bin would do, before bins_block: its units and items on hand, the reservations a block re-plans (orders, units), the picks under way it leaves with their pickers (count, units, their pick lists), whether it is sellable, and the block standing on it. linesCapped: the bin holds more open reservation lines than one read walks, and the numbers are at least.\n\n**Operation id:** `bins_block_preview` — the same operation is `app.bins.block_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_block_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "binId",
            "in": "query",
            "required": true,
            "description": "document id of the bin.",
            "schema": {
              "type": "string",
              "description": "document id of the bin.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/bins/by-ids": {
      "post": {
        "operationId": "bins_by_ids",
        "summary": "bins_by_ids",
        "description": "Resolve up to 200 bins by document id to their label data (code, barcode, zone, bin type, warehouse name). Unknown or foreign ids are skipped. Batch hydration for label printing and scan follow-ups.\n\n**Operation id:** `bins_by_ids` — the same operation is `app.bins.by_ids({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_by_ids`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "document ids of the bins."
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/bins/get": {
      "get": {
        "operationId": "bins_get",
        "summary": "bins_get",
        "description": "Get one bin with its warehouse and current contents (max 100 stock rows).\n\n**Operation id:** `bins_get` — the same operation is `app.bins.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "binId",
            "in": "query",
            "required": true,
            "description": "document id of the bin.",
            "schema": {
              "type": "string",
              "description": "document id of the bin.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/bins/picker": {
      "get": {
        "operationId": "bins_picker_search",
        "summary": "bins_picker_search",
        "description": "Find bins of one warehouse as the bin field does: a case-insensitive code prefix in code order (max 50 per page, keyset cursor). `exact` is the one location whose code or barcode equals the text (null, with `ambiguous` true, when two differ); `destination` keeps only bins that may receive it in the rows: stock = active leaf bins, restock = sellable ones, quarantine = quarantine bins not for sale.\n\n**Operation id:** `bins_picker_search` — the same operation is `app.bins.picker_search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_picker_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "destination",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "stock",
                "restock",
                "quarantine"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/bins/unblock": {
      "post": {
        "operationId": "bins_unblock",
        "summary": "bins_unblock",
        "description": "Clear reasons standing on a bin: blocked (a person's block), short_pick or move_source_empty (the floor's). Once none stands the bin is planned and picked from again and the warehouse's short orders are re-planned. Never makes the bin sellable again (bins_update sellable). Answers { removed, cleared }.\n\n**Operation id:** `bins_unblock` — the same operation is `app.bins.unblock({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_unblock`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "document id of the bin.",
                    "format": "floormode-id"
                  },
                  "reasons": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "short_pick",
                        "move_source_empty",
                        "blocked"
                      ]
                    },
                    "description": "The standing reasons to clear: blocked (a person's block), short_pick or move_source_empty (the floor's, cleared by a count too)."
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "binId",
                  "reasons"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/bins/update": {
      "post": {
        "operationId": "bins_update",
        "summary": "bins_update",
        "description": "Update bin master data (a bin's problem reasons are bins_block / bins_unblock). SIDE EFFECT: changing `sellable` queues a Shopify availability push for every variant stocked in the bin (bounded at 500 distinct variants per call) — those units enter or leave what the shop may offer without moving.\n\n**Operation id:** `bins_update` — the same operation is `app.bins.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/bins_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "bins"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "barcode": {
                    "type": "string",
                    "minLength": 1
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "binType": {
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "pickable": {
                    "type": "boolean"
                  },
                  "sellable": {
                    "type": "boolean"
                  },
                  "shopifyInventoryState": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "available",
                          "damaged",
                          "reserved",
                          "quality_control",
                          "safety_stock"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "binId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/boxes": {
      "get": {
        "operationId": "boxes_list",
        "summary": "boxes_list",
        "description": "List the pack station's boxes in name-ordered pages of 100 (pass the answer's `cursor` for the next page); deleted boxes are hidden unless includeDeleted is set.\n\n**Operation id:** `boxes_list` — the same operation is `app.boxes.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/boxes_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "boxes"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "boxes_create",
        "summary": "boxes_create",
        "description": "Create a box with its inner dimensions in millimetres, its type (a fragile item takes a box only) and its box group (items naming the group are suggested only its boxes).\n\n**Operation id:** `boxes_create` — the same operation is `app.boxes.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/boxes_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "boxes"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lengthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "widthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "heightMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "emptyWeightGrams": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxWeightGrams": {
                    "description": "Weight the box may carry, in grams; the cartonization split cap.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costCents": {
                    "description": "Box cost in cents.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stockVariantId": {
                    "description": "A Floormode material (boxes_material_options) the box is: each parcel fulfilled in the box takes one unit of it out of stock. Null or absent: not tracked.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "packagingType": {
                    "description": "box (default), mailer (a bag or satchel), envelope or tube; a fragile item takes a box.",
                    "type": "string",
                    "enum": [
                      "box",
                      "mailer",
                      "envelope",
                      "tube"
                    ]
                  },
                  "boxGroup": {
                    "description": "Its box group: items naming the group are suggested only its boxes; null clears.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "lengthMm",
                  "widthMm",
                  "heightMm"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/boxes/delete": {
      "post": {
        "operationId": "boxes_delete",
        "summary": "boxes_delete",
        "description": "Soft-delete a box; pack jobs packed in it keep their reference.\n\n**Operation id:** `boxes_delete` — the same operation is `app.boxes.delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/boxes_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "boxes"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boxId": {
                    "type": "string",
                    "description": "A boxes id, e.g. \"boxes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "boxId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/boxes/material-options": {
      "get": {
        "operationId": "boxes_material_options",
        "summary": "boxes_material_options",
        "description": "The Floormode materials a box may track as its stock: live, counted in pieces, untracked; `search` is the item search (a title word, SKU or barcode), 20 a page with `capped`. `selected` (a box's current material) comes first, `eligible: false` when a link would refuse it now.\n\n**Operation id:** `boxes_material_options` — the same operation is `app.boxes.material_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/boxes_material_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "boxes"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "selected",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/boxes/update": {
      "post": {
        "operationId": "boxes_update",
        "summary": "boxes_update",
        "description": "Update name, dimensions, weights, cost, stock material, type or box group of a box.\n\n**Operation id:** `boxes_update` — the same operation is `app.boxes.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/boxes_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "boxes"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boxId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lengthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "widthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "heightMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "emptyWeightGrams": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxWeightGrams": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "costCents": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stockVariantId": {
                    "description": "Link a Floormode material (boxes_material_options), or null to stop tracking.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "packagingType": {
                    "description": "box (default), mailer (a bag or satchel), envelope or tube; a fragile item takes a box.",
                    "type": "string",
                    "enum": [
                      "box",
                      "mailer",
                      "envelope",
                      "tube"
                    ]
                  },
                  "boxGroup": {
                    "description": "Its box group: items naming the group are suggested only its boxes; null clears.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "boxId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/carriers": {
      "get": {
        "operationId": "carriers_list",
        "summary": "carriers_list",
        "description": "List the tenant's carrier accounts (max 100): provider, label, mode, capabilities, contract handle, status and BYOC flag. The encrypted credentials are never returned — only the Worker decrypts them. Filter by one or more statuses (active, needs_reauth, disabled); a store connects at most 50 accounts that are not disabled, so a filter within active and needs_reauth answers the whole set.\n\n**Operation id:** `carriers_list` — the same operation is `app.carriers.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carriers_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "carriers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `status` for each value (`?status=active&status=needs_reauth`), or pass a JSON array (`?status=[\"active\",\"needs_reauth\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "active",
              "needs_reauth"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "needs_reauth",
                  "disabled"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/carriers/get": {
      "get": {
        "operationId": "carriers_get",
        "summary": "carriers_get",
        "description": "Get one connected carrier account by id, credential-free (provider, label, mode, capabilities, contract handle, status, BYOC flag); null for an unknown id. The encrypted credentials are never returned.\n\n**Operation id:** `carriers_get` — the same operation is `app.carriers.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carriers_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "carriers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "carrierAccountId",
            "in": "query",
            "required": true,
            "description": "document id of the carrier account.",
            "schema": {
              "type": "string",
              "description": "document id of the carrier account.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/carriers/options": {
      "post": {
        "operationId": "carriers_set_options",
        "summary": "carriers_set_options",
        "description": "Set a carrier account's options. `encloseReturnLabel`: put a DHL return label in every domestic parcel of this DHL account, printed beside its shipping label; refused (`option_unavailable`) unless the account's DHL contract holds a DHL RETOURE billing number (procedure 07). `dangerousGoodsAgreement`: the merchant's contract covers dangerous goods, so the classes this carrier carries under an agreement (lithium batteries in, with or without a device and limited quantities for Sendcloud, EasyPost, ShipEngine and DHL Paket, the last within Germany) may be labelled; refused (`option_unavailable`) for a carrier that carries none that way. `recipientEmail`: pass the customer's e-mail to this carrier, only for the services that cannot deliver or return the parcel without it (Colissimo Point Retrait, an InPost locker, a PostNL point, and the services that take an e-mail or a phone when the order has no phone); off by default, and a label for such a service is refused `recipient_email_switch_off` while it is off; refused (`option_unavailable`) for a carrier none of whose services needs it. An option left out keeps its value.\n\n**Operation id:** `carriers_set_options` — the same operation is `app.carriers.set_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carriers_set_options`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "carriers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "carrierAccountId": {
                    "type": "string",
                    "description": "document id of the carrier account.",
                    "format": "floormode-id"
                  },
                  "encloseReturnLabel": {
                    "type": "boolean"
                  },
                  "dangerousGoodsAgreement": {
                    "description": "The merchant's contract with the carrier covers dangerous goods: the classes it carries under an agreement may be labelled.",
                    "type": "boolean"
                  },
                  "recipientEmail": {
                    "description": "Pass the customer's e-mail to this carrier, only for the services that cannot deliver or return a parcel without it (a pickup point's notice). Off by default.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "carrierAccountId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/carriers/sample-label": {
      "post": {
        "operationId": "carriers_sample_label",
        "summary": "carriers_sample_label",
        "description": "Ask for a sample label on one carrier account: a 1 kg parcel from a warehouse to its own address on the account's first service, with no pack job and no shipment. It shows whether the contract holds the product before the first real order. Allowed only where it costs nothing: sandbox credentials, or a live account of a carrier that does not bill unscanned labels; otherwise refused with `code: sample_label_not_allowed`. The label is made in the background; carriers.get answers it as `lastSampleLabel` (`pending`, then `created` with the label's `documentId` and tracking number, `refused` with the carrier's words, or `unanswered`). One request at a time per account (`sample_label_pending`); `warehouseId` names the warehouse, else the first active one with a complete address (`sample_label_no_address` when none has one).\n\n**Operation id:** `carriers_sample_label` — the same operation is `app.carriers.sample_label({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carriers_sample_label`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "carriers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "carrierAccountId": {
                    "type": "string",
                    "description": "document id of the carrier account.",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "description": "document id of the warehouse to send from and to; optional.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "carrierAccountId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/carriers/services": {
      "get": {
        "operationId": "carriers_services_list",
        "summary": "carriers_services_list",
        "description": "List the carrier services a checkout option can ship with, per parcel carrier account that is active or needs its credentials renewed (needs_reauth), max 100, in label order. Each account lists its services by `serviceCode` — the exact, connection-scoped code its rates carry, the pair checkout_options_set_target takes — and label: the adapter's fixed list for UPS, DHL Parcel DE and Hermes (`catalogue: static`), otherwise the services the account's rate answers named (`catalogue: observed`, empty until the account's first rates). Disconnected and freight accounts are not listed.\n\n**Operation id:** `carriers_services_list` — the same operation is `app.carriers.services_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carriers_services_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "carriers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/cartonization/recommend": {
      "get": {
        "operationId": "cartonization_recommend",
        "summary": "cartonization_recommend",
        "description": "Recommend one or more boxes for a shipment, pack job or an explicit item list against the active box catalog (OMS-079). Returns a packing plan: which goods go in which box, per-box dims/weight and wasted volume, plus any items with no recorded dimensions. Pass exactly one of shipmentId, packJobId or items.\n\n**Operation id:** `cartonization_recommend` — the same operation is `app.cartonization.recommend({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/cartonization_recommend`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "cartonization"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": false,
            "description": "Cartonize this shipment's order lines.",
            "schema": {
              "description": "Cartonize this shipment's order lines.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "packJobId",
            "in": "query",
            "required": false,
            "description": "Cartonize this pack job's order lines.",
            "schema": {
              "description": "Cartonize this pack job's order lines.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "items",
            "in": "query",
            "required": false,
            "description": "Cartonize an explicit item list with dims supplied directly. Pass a JSON array of objects (`?items=[{…}]`): a repeated parameter cannot carry an object.",
            "style": "form",
            "explode": true,
            "schema": {
              "description": "Cartonize an explicit item list with dims supplied directly.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "sku": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "lengthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "widthMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "heightMm": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "weightGrams": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "quantity",
                  "lengthMm",
                  "widthMm",
                  "heightMm",
                  "weightGrams"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/catalog/picker": {
      "get": {
        "operationId": "catalog_picker_search",
        "summary": "catalog_picker_search",
        "description": "Browse the catalog as the product picker does: products in title order (max 50 per page, keyset cursor), each with up to 25 live variants (variantsCapped says more exist) and the physical on-hand per variant over every warehouse or one. Scope all | title | sku (sku also matches primary and alternate barcodes exactly); vendor matches case-insensitively; status active restricts to active products.\n\n**Operation id:** `catalog_picker_search` — the same operation is `app.catalog.picker_search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_picker_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "catalog"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "title",
                "sku"
              ]
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "active"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "required": false,
            "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "exact",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "default": "title_asc",
              "type": "string",
              "enum": [
                "title_asc",
                "title_desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 800
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/catalog/picker/recent": {
      "get": {
        "operationId": "catalog_picker_recent",
        "summary": "catalog_picker_recent",
        "description": "The items most recently used in receipts, transfers or stock adjustments (`context`): up to 20 distinct live variants from the newest 200 lines or adjustments, grouped by product, newest first, with on-hand over every warehouse or one. Derived on every read, never stored.\n\n**Operation id:** `catalog_picker_recent` — the same operation is `app.catalog.picker_recent({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_picker_recent`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "catalog"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "context",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "receipt",
                "transfer",
                "adjust"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/catalog/picker/variants": {
      "get": {
        "operationId": "catalog_picker_variants",
        "summary": "catalog_picker_variants",
        "description": "One product's live variants for the picker's detail pane, in the shop's variant order (Shopify's position; variants no sync has positioned yet first, in the order they were added; max 50 per page, keyset cursor), each with its options (name and value per product option) and the physical on-hand over every warehouse or one. Continues a search row whose variantsCapped is true from its variantsCursor.\n\n**Operation id:** `catalog_picker_variants` — the same operation is `app.catalog.picker_variants({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_picker_variants`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "catalog"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "productId",
            "in": "query",
            "required": true,
            "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 800
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/catalog/picker/vendors": {
      "get": {
        "operationId": "catalog_picker_vendors",
        "summary": "catalog_picker_vendors",
        "description": "The vendors of live products for the picker's chips: one per vendor (case-insensitive), in alphabetical order, 100 per page; `after` continues from the last vendor of a page, `text` narrows to a case-insensitive prefix.\n\n**Operation id:** `catalog_picker_vendors` — the same operation is `app.catalog.picker_vendors({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_picker_vendors`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "catalog"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/checkout-options": {
      "get": {
        "operationId": "checkout_options_list",
        "summary": "checkout_options_list",
        "description": "List the store's checkout options — every shipping option customers chose at checkout, learned from the orders (up to 200 of them; one bounded page, `cursor: null`) — needs review first, then the most recently chosen. Each row: the title the customer saw, source and code, `sourceKind` (shopify_rate, carrier_app, pickup, local_delivery, other), `target` (unreviewed, service, rules, no_label — a non-shipping option takes no label) with the mapped carrier account and service, the `revision` an edit sends back, open fulfillment orders (`openCount`, counted up to 500 with `openCapped`), orders of the last 30 days, first and last seen, and a `suggestion` for an unreviewed option (the mapping of the option a renamed rate replaced, or the service a person picked by hand for its last three labels). `overCap` counts options refused once the store holds the maximum: their orders follow the shipping rules. Filter by state, kind, when last seen or part of the title or code.\n\n**Operation id:** `checkout_options_list` — the same operation is `app.checkout.options_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/checkout_options_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "checkout-options"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Options in any of these states (needs_review, mapped, rules, no_label); absent = every state. Repeat `statuses` for each value (`?statuses=needs_review&statuses=mapped`), or pass a JSON array (`?statuses=[\"needs_review\",\"mapped\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "needs_review",
              "mapped"
            ],
            "schema": {
              "description": "Options in any of these states (needs_review, mapped, rules, no_label); absent = every state.",
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "needs_review",
                  "mapped",
                  "rules",
                  "no_label"
                ]
              }
            }
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Options of any of these kinds (shopify_rate, carrier_app, pickup, local_delivery, other); absent = every kind. Repeat `sources` for each value (`?sources=shopify_rate&sources=carrier_app`), or pass a JSON array (`?sources=[\"shopify_rate\",\"carrier_app\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "shopify_rate",
              "carrier_app"
            ],
            "schema": {
              "description": "Options of any of these kinds (shopify_rate, carrier_app, pickup, local_delivery, other); absent = every kind.",
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "shopify_rate",
                  "carrier_app",
                  "pickup",
                  "local_delivery",
                  "other"
                ]
              }
            }
          },
          {
            "name": "seen",
            "in": "query",
            "required": false,
            "description": "`7d` / `30d`: chosen at checkout in the last 7 or 30 days; `stale`: not in 30 days.",
            "schema": {
              "description": "`7d` / `30d`: chosen at checkout in the last 7 or 30 days; `stale`: not in 30 days.",
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "stale"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Part of the option's title or code (case-insensitive).",
            "schema": {
              "description": "Part of the option's title or code (case-insensitive).",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/checkout-options/target": {
      "post": {
        "operationId": "checkout_options_set_target",
        "summary": "checkout_options_set_target",
        "description": "Map a checkout option: ship its orders with one carrier service (`kind: service`, an account and a serviceCode from carriers_services_list), let the shipping rules decide (`kind: rules`), or mark it unreviewed again. Applies to every order with this option from the next rate call on; nothing already rated or bought changes. Send the option's `revision`: a stale one is refused as a conflict (revision_mismatch); asking for the mapping the option already has changes nothing. Refused: a non-shipping option (option_locked), a disconnected or freight account (carrier_account_unusable; needs_reauth is accepted), a code the account's catalogue does not list (unknown_service). Every change is recorded on the option's timeline.\n\n**Operation id:** `checkout_options_set_target` — the same operation is `app.checkout.options_set_target({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/checkout_options_set_target`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "checkout-options"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "optionId": {
                    "type": "string",
                    "description": "document id of the checkout option.",
                    "format": "floormode-id"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The option's revision, as checkout_options_list returned it."
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "service"
                          },
                          "carrierAccountId": {
                            "type": "string",
                            "description": "document id of the carrier account.",
                            "format": "floormode-id"
                          },
                          "serviceCode": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "description": "A serviceCode of that account from carriers_services_list."
                          }
                        },
                        "required": [
                          "kind",
                          "carrierAccountId",
                          "serviceCode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "rules"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "unreviewed"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "optionId",
                  "revision",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/collection-times": {
      "get": {
        "operationId": "collection_times_list",
        "summary": "collection_times_list",
        "description": "A warehouse's collection times (max 50 rows): per carrier account (null = Every carrier, the default for work whose carrier is not chosen yet), the services it serves (empty = all), the weekdays (empty = every dispatch day) and up to 6 times (HH:MM, the warehouse's time); `leadMinutes` (orders in by that many minutes before each collection), the dispatch weekdays and `shipByStampedAt` (when the warehouse's queues began ordering by ship-by; null while they order oldest first).\n\n**Operation id:** `collection_times_list` — the same operation is `app.collection.times_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/collection_times_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "collection-times"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/collection-times/delete": {
      "post": {
        "operationId": "collection_times_delete",
        "summary": "collection_times_delete",
        "description": "Delete a collection time. The warehouse's last one switches its queues back to oldest first at once.\n\n**Operation id:** `collection_times_delete` — the same operation is `app.collection.times_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/collection_times_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "collection-times"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rowId": {
                    "type": "string",
                    "description": "A collectionTimes id, e.g. \"collectionTimes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "rowId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/collection-times/save": {
      "post": {
        "operationId": "collection_times_save",
        "summary": "collection_times_save",
        "description": "Add (omit `rowId`) or update a collection time: the carrier account (null = Every carrier: no services, always the default, one a warehouse), its services, weekdays and 1 to 6 HH:MM times, and whether it is the default for work whose carrier is not chosen yet. The open work's ship-by is stamped again in the background; the queues order by it once that ends. Refused: collection_times_full (50 rows), collection_every_carrier_exists, collection_default_taken, invalid_input (a bad row), carrier_account_unusable (not a parcel account), carrier_account_inactive (disconnected).\n\n**Operation id:** `collection_times_save` — the same operation is `app.collection.times_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/collection_times_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "collection-times"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "rowId": {
                    "type": "string",
                    "description": "A collectionTimes id, e.g. \"collectionTimes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "carrierAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "services": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    }
                  },
                  "weekdays": {
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    }
                  },
                  "times": {
                    "minItems": 1,
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 5
                    }
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "carrierAccountId",
                  "services",
                  "weekdays",
                  "times",
                  "isDefault"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/collections/today": {
      "get": {
        "operationId": "collections_today",
        "summary": "collections_today",
        "description": "A warehouse's collections: the last one passed today and the next `limit` (1..8), each with its carriers, services and `toPack` (work of every carrier due for it, `bound` exact / atLeast / unknown past the 1,000-row read a status); `missed` (work whose collection passed, up to 1,000); `closeOuts`: per manifesting carrier account, one End of day offer per passed collection with labels to close out (or, for an account with no times, the labels bought before today), counted under the close-out's own rule reading at most 1,000 labels (`capped`: more may wait); pass its `collectionAtMs` to manifests_close_out. `coversAccount`: the carrier closes every open label of the account, so close out without a collection. `nextChangeAtMs`: when the answer changes next. Writes nothing.\n\n**Operation id:** `collections_today` — the same operation is `app.collections.today({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/collections_today`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "collections"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            }
          },
          {
            "name": "atMs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/connections/disconnect": {
      "post": {
        "operationId": "local_stock_disconnect",
        "summary": "local_stock_disconnect",
        "description": "Disconnect a sibling connection as a HANDOVER rather than a switch (M16 W5b-F2). This is the operation the Settings → Apps & API switch calls, and what it does depends on the peer's local-stock phase. ⚠️ SIDE EFFECTS: when the peer holds local stock here (phase `active`) it first CANCELS the peer's open component pick batches (picked units go back to their bins, `wo_pick_status: cancelled` goes out), then FREEZES that stock and queues the cutover snapshot — exactly local_stock_begin_disconnect — and deliberately LEAVES THE CONNECTION SWITCHED ON until the peer confirms the handback; the answer is `state: \"handing_back\"`. Calling it again while `disconnecting` re-derives and re-sends the same snapshot under the same idempotency key (the retry path for a rejected handback), never a second release, unless the peer refused that release as a `conflict` (its generation fence already holds a newer release, e.g. after this app was reinstalled): then the refused release is marked failed and the same frozen stock goes out under a new generation. Once the peer has acknowledged (phase `released`), or when it never held local stock at all (`inactive`), it writes the connection setting to false and answers `state: \"disconnected\"`. Turning a connection back ON is settings_set, which starts it fresh: nothing from the time it was off is sent later. REFUSALS (coded in `details.localRefusal`, and every one of them leaves the phase and the ledger exactly as they were — nothing is frozen and nothing is sent): `details.seamExit` — something only the peer or the floor can settle, every one named (a location Logistified still delegates here, the peer's items in an open transfer or pending receipt); `unmapped_warehouse_stock` — the peer's goods sit in a warehouse that maps to no Shopify location, and a handback states quantities per location, so they would simply be left out of the total; `no_writer_location` — an item holding no stock anywhere is handed back as a zero at every warehouse mapped as the inventory writer, and none is (map one under Settings → Warehouses first), so the item would be left out and the peer would keep its own stale number. A catalog larger than the 500 quantities one message may carry is not a refusal (contracts 1.6.0): the snapshot is split into verified parts the peer stages until the set is whole, so the handover stays all-or-nothing on both sides.\n\n**Operation id:** `local_stock_disconnect` — the same operation is `app.local.stock_disconnect({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_stock_disconnect`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "connections"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "peer": {
                    "type": "string",
                    "enum": [
                      "logistified",
                      "assemblified",
                      "alertified"
                    ]
                  }
                },
                "required": [
                  "peer"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/costing/apply-receipt-cost": {
      "post": {
        "operationId": "costing_apply_receipt_cost",
        "summary": "costing_apply_receipt_cost",
        "description": "Roll the weighted-average unit cost forward for the received lines of a receipt and allocate a freight/duty total across them by value or weight. `lines` sets the base purchase unit cost per received variant (major currency units); freight+duty is split by the chosen method and folded into each line's receipt unit cost, which then updates the (variant, warehouse) weighted average. Runs once per receipt, after it is received (completed) — a weighted average cannot be re-applied — and values only the received units still in the warehouse. Every received line of the receipt is costed or the call is refused; a line whose (variant, warehouse) position is already valued in a DIFFERENT currency is left untouched and reported in `skipped`, never blended.\n\n**Operation id:** `costing_apply_receipt_cost` — the same operation is `app.costing.apply_receipt_cost({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/costing_apply_receipt_cost`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "costing"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "document id of the receipt to cost.",
                    "format": "floormode-id"
                  },
                  "lines": {
                    "description": "Base purchase unit cost per received variant; missing lines default to 0.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "format": "floormode-id",
                          "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                        },
                        "unitCost": {
                          "type": "number",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "variantId",
                        "unitCost"
                      ]
                    }
                  },
                  "freight": {
                    "description": "Freight to allocate (default 0).",
                    "type": "number",
                    "minimum": 0
                  },
                  "duty": {
                    "description": "Duty/other landed cost to allocate (default 0).",
                    "type": "number",
                    "minimum": 0
                  },
                  "method": {
                    "description": "Allocate freight+duty by line value or by line weight (default value).",
                    "type": "string",
                    "enum": [
                      "value",
                      "weight"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "ISO 4217 code of the currency the costs are priced in, usually the store's: three letters; lower case is accepted and upper-cased."
                  }
                },
                "required": [
                  "receiptId",
                  "currency"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/costing/inventory-value": {
      "get": {
        "operationId": "costing_inventory_value",
        "summary": "costing_inventory_value",
        "description": "Recorded inventory cost per currency: current shelf weighted-average positions plus outstanding physical transfer quantities at frozen dispatch cost. Accepted, returned and lost quantities leave transit; cancellation alone does not. No COGS or revaluation. Reads at most five hundred current shelf cost positions and five hundred active transit lines, with separate cap flags; capped values are subtotals. Unknown cost/currency units are excluded and counted. Stock without any recorded cost position is outside shelf valuation.\n\n**Operation id:** `costing_inventory_value` — the same operation is `app.costing.inventory_value({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/costing_inventory_value`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "costing"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/costing/margin-report": {
      "get": {
        "operationId": "costing_margin_report",
        "summary": "costing_margin_report",
        "description": "Shipped merchandise per SKU: units, verified discounted net line revenue snapshotted at shipment, booked weighted-average cost and their margin. Excludes shipping, fees and subsequent refunds. Unknown revenue makes its bucket revenue/margin null; known zero stays zero. revenueDecimals preserves source precision. Every SKU row and every entry in `totals` carries its currency — money is never summed across currencies, so the flat totalRevenue/totalCost/totalMargin scalars are null when the window holds more than one. Bounded scan with capped/scannedThrough disclosure; `unknownRevenueEntries` counts unverified net revenue, `unknownCostEntries` counts cost without a recorded currency, and `mixedCurrencyEntries` counts differing currencies.\n\n**Operation id:** `costing_margin_report` — the same operation is `app.costing.margin_report({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/costing_margin_report`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "costing (reports)"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Window start, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window start, epoch milliseconds (inclusive)."
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Window end, epoch milliseconds (inclusive).",
            "schema": {
              "type": "number",
              "description": "Window end, epoch milliseconds (inclusive)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/costing/variant-costs": {
      "get": {
        "operationId": "costing_variant_costs",
        "summary": "costing_variant_costs",
        "description": "Current weighted-average cost position per (variant, warehouse): unit cost, valued on-hand quantity and total valuation (max 200). Filter by variant and/or warehouse.\n\n**Operation id:** `costing_variant_costs` — the same operation is `app.costing.variant_costs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/costing_variant_costs`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "costing"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/counts": {
      "get": {
        "operationId": "counts_list",
        "summary": "counts_list",
        "description": "List cycle counts, in the chosen order (`sort`; newest first by default), one page, with counted-line and variance counters. Filter by status (open, counting, review, approving — an approval still booking its differences —, approved, cancelled) or warehouse. zoneId matches the task's zone SCOPE exactly, so a count scoped to explicit bins or to a whole warehouse is in no zone; stationId narrows to the station's warehouse. A year-end stocktake's sheet names its `stocktake` (id, short id, sheet number of sheetCount, group); null for every other count.\n\n**Operation id:** `counts_list` — the same operation is `app.counts.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `statuses` for each value (`?statuses=open&statuses=counting`), or pass a JSON array (`?statuses=[\"open\",\"counting\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "open",
              "counting"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "counting",
                  "review",
                  "approving",
                  "approved",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Counts scoped to this zone.",
            "schema": {
              "description": "Counts scoped to this zone.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "assignment",
            "in": "query",
            "required": false,
            "description": "mine = assigned to the caller or to nobody; all = everyone's.",
            "schema": {
              "description": "mine = assigned to the caller or to nobody; all = everyone's.",
              "type": "string",
              "enum": [
                "mine",
                "all"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "counts_create",
        "summary": "counts_create",
        "description": "Create a cycle count (`#CT-…`) over exactly one scope: binIds (max 200), zone or all. The expected quantities are a snapshot of the current bin projection, one line per (bin, item, lot) with stock on hand; `blind: true` hides them from the floor. `snapshotCapped` is true when a bin holds more stocked rows than one snapshot may read (100 per bin) — the count then covers part of that bin. Pass a `requestKey` per count opened, kept across retries of it: a lost answer re-sent answers the count the first call opened; the same key for another scope is refused (`idempotency_key_reused`).\n\n**Operation id:** `counts_create` — the same operation is `app.counts.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binIds": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "zone": {
                    "type": "string"
                  },
                  "all": {
                    "type": "boolean"
                  },
                  "blind": {
                    "type": "boolean"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/approve": {
      "post": {
        "operationId": "counts_approve",
        "summary": "counts_approve",
        "description": "Approve a reviewed count: every variance becomes one `count` ledger movement in the counted bin (uncounted lines are left alone). The variance applied is REBASED — counted minus (the snapshot plus everything the ledger did to that (bin, item, lot) since it was snapshotted) — so a receipt or pick during the count is not applied twice; a window too large to reconstruct refuses with `details.code: \"recount_required\"`. A count that finds fewer units than are reserved is applied and the holding allocation is trimmed and marked short. Variances beyond the warehouse's guard (more than settings.countVarianceGuard.pct percent of the rebased expectation and more than its minUnits; default 20 % and 0) require acceptVariances: true. Idempotent per (count, approval, bin, variant, lot). A variance on a LOCAL item (VMAT-/ASM-/CSTM-) mirrors the new levels to the owning peer, and is REFUSED with a coded `details.localRefusal` when the item stopped being ours between the scan and the approval (a disconnect in between) — an approval of up to 40 variances then rolls back whole rather than posting half of it. A count with more than 40 variances answers `status: \"approving\"`: this call freezes its variances and schedules their booking in its one transaction, and the background books them in batches of 40 lines, each batch its own transaction; it becomes `approved` with the last. A batch the stock door refuses (a local-item refusal included) rolls back alone: the batches booked before it stay booked, and the count goes back to `review` with the rest left to approve again. An approval over bins another count still books in is refused with `details.code: \"count_approving_overlap\"`.\n\n**Operation id:** `counts_approve` — the same operation is `app.counts.approve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_approve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "acceptVariances": {
                    "type": "boolean"
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for accept_count_difference, when variances beyond the guard are accepted by someone who does not hold floor.approve at the desk.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "countTaskId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/cancel": {
      "post": {
        "operationId": "counts_cancel",
        "summary": "counts_cancel",
        "description": "Cancel a cycle count that has not been approved (open, counting or review). Nothing reaches the ledger and nothing is released — a count holds no reservation — while the snapshot and the counted quantities stay on the task as its record. Refused with `details.code: \"illegal_transition\"` once the count was approved (its variances were applied). Cancelling a cancelled count is a no-op. Who cancelled and the `note` stay on the count; a year-end stocktake's sheet needs the note (`details.code: \"note_required\"`).\n\n**Operation id:** `counts_cancel` — the same operation is `app.counts.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "countTaskId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/confirm-bin-empty": {
      "post": {
        "operationId": "counts_confirm_bin_empty",
        "summary": "counts_confirm_bin_empty",
        "description": "Confirm that a bin of the count's scope is empty (FT4-01). Only for a bin with no line on the count — the snapshot found it empty — so visiting it is part of the count's progress like counting a bin's lines; a bin with a line not at 0 is refused (count each item, 0 where none is left). Stock booked into the bin since the count was cut becomes one line per stocked row counted 0 (`zeroedLines`), a difference the review shows and the approval corrects. Confirming twice answers `confirmed: false`; an item recorded there later with `counts_record_count` moves the bin to its line.\n\n**Operation id:** `counts_confirm_bin_empty` — the same operation is `app.counts.confirm_bin_empty({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_confirm_bin_empty`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedBin": {
                    "description": "Bin code or barcode.",
                    "type": "string"
                  }
                },
                "required": [
                  "countTaskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/decide-lot-report": {
      "post": {
        "operationId": "counts_decide_lot_report",
        "summary": "counts_decide_lot_report",
        "description": "Decide a lot the floor reported on a count (`counts_get.reportedLots`, QA r1 L06-F06). `brought_in` creates the lot for the item with `expiryDate` (required where the report's `lotDate.required` says the item's lots must be dated: expiry_required without it) and books the reported units into the bin as a stock correction (reason found), once; `dismissed` books nothing. Each report is decided once: the same decision again answers what was recorded, the other one is refused (count_report_decided). Answers { reportId, lotNumber, binCode, countedQty, decision, movementId }.\n\n**Operation id:** `counts_decide_lot_report` — the same operation is `app.counts.decide_lot_report({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_decide_lot_report`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reportId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The report's id, as counts_get names it.",
                    "format": "floormode-id"
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "brought_in",
                      "dismissed"
                    ]
                  },
                  "expiryDate": {
                    "description": "The brought-in lot's date, YYYY-MM-DD; required where the item's lots must be dated.",
                    "type": "string"
                  }
                },
                "required": [
                  "countTaskId",
                  "reportId",
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/get": {
      "get": {
        "operationId": "counts_get",
        "summary": "counts_get",
        "description": "Get one cycle count: every snapshot line with its counted quantity and variance, plus the variance review list and whether approval needs acceptVariances. lotTrackedItems says whether one of the count's items tracks lots; with desk: true, whether any item does. `stocktake` names the year-end stocktake a sheet belongs to, null for every other count.\n\n**Operation id:** `counts_get` — the same operation is `app.counts.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "countTaskId",
            "in": "query",
            "required": true,
            "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "desk",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/counts/record-count": {
      "post": {
        "operationId": "counts_record_count",
        "summary": "counts_record_count",
        "description": "Record one counted quantity. Bin and item are resolved server-side (binId/scannedBin, variantId/scannedCode); a variant that was not in the snapshot is added as a found row whose expectation is read from the CURRENT bin projection. A second count of the same (bin, item, lot) row REPLACES the first — the answer names it in `previousCountedQty`. Bins outside the count scope are rejected. A bin holding lot-tracked stock of the item needs the lot (lotId, or the scanned lotNumber of a lot the item already has), or the call is refused with `details.code: \"lot_required\"`: one count line is one (bin, item, lot). A count never creates a lot: a lot number the item does not have is refused with `details.code: \"lot_unknown\"`; report the find with `counts_report_lot` (E-0023). Pass a `requestKey` per physical observation, kept across retries of it: a lost answer re-sent answers the first answer and keeps that observation's baseline, so a stock move made since is not counted back; the same key for another count is refused (`idempotency_key_reused`). A recount takes a new key; a call without one is always a new observation.\n\n**Operation id:** `counts_record_count` — the same operation is `app.counts.record_count({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_record_count`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedBin": {
                    "description": "Bin code or barcode.",
                    "type": "string"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string"
                  },
                  "lotId": {
                    "description": "A lot the item has; `null` names the bin's untracked row when the bin also holds lots.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lotNumber": {
                    "description": "Lot number as scanned off the carton.",
                    "type": "string"
                  },
                  "countedQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "countTaskId",
                  "countedQty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/reject": {
      "post": {
        "operationId": "counts_reject",
        "summary": "counts_reject",
        "description": "Send a reviewed count back to the floor; the counted quantities are kept.\n\n**Operation id:** `counts_reject` — the same operation is `app.counts.reject({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_reject`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "countTaskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/report-bin-not-empty": {
      "post": {
        "operationId": "counts_report_bin_not_empty",
        "summary": "counts_report_bin_not_empty",
        "description": "A picker's no to \"Is the bin empty now?\" (asked when picking_record_pick answers `binEmptied`): the pick line's bin gets a count (`#CT-…`, `raised: true`), or the answer names the unfinished count it already is in (`raised: false`). `requestKey` (one per answer, kept across retries) answers a retry with the first answer. Null when the bin is no longer a live merchant bin.\n\n**Operation id:** `counts_report_bin_not_empty` — the same operation is `app.counts.report_bin_not_empty({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_report_bin_not_empty`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickLineId": {
                    "type": "string",
                    "description": "A pickLines id, e.g. \"pickLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  }
                },
                "required": [
                  "pickLineId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/report-lot": {
      "post": {
        "operationId": "counts_report_lot",
        "summary": "counts_report_lot",
        "description": "Report a lot number the counter found in a bin that the item does not have (review 2026-09-14, E-0023). A count never creates a lot — `counts_record_count` refuses an unknown lot number — so this call records the find on the count task's timeline (`count_lot_reported`: lot, bin, item and the units seen, reason `lot_unknown`) for a manager to bring the lot in through receiving or a stock correction. Nothing is counted and no lot is created; a lot number the item already has is refused (count it instead). The report is also kept on the count (`counts_get.reportedLots`, at most 50 a count), where a manager decides it with counts_decide_lot_report.\n\n**Operation id:** `counts_report_lot` — the same operation is `app.counts.report_lot({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_report_lot`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lotNumber": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Lot number as read off the carton."
                  },
                  "countedQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Units of that lot seen in the bin."
                  },
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedBin": {
                    "description": "Bin code or barcode.",
                    "type": "string"
                  },
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "lotNumber",
                  "countedQty",
                  "countTaskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/submit": {
      "post": {
        "operationId": "counts_submit",
        "summary": "counts_submit",
        "description": "Submit a count for review: computes the variances (counted − expected) and reports whether any of them exceeds the warehouse's variance guard (settings.countVarianceGuard, default more than 20 % and more than 0 units). A count is finished when every bin of its scope is done (each line counted, each bin without lines confirmed empty); sending it earlier needs `notCountedReason`, else it is refused with `details.code: \"count_incomplete\"`. Lines not counted stay NOT COUNTED — the approval never applies them as zero.\n\n**Operation id:** `counts_submit` — the same operation is `app.counts.submit({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_submit`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countTaskId": {
                    "type": "string",
                    "description": "A countTasks id, e.g. \"countTasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "notCountedReason": {
                    "description": "Why bins or lines were left: out_of_time, cannot_reach or other.",
                    "type": "string",
                    "enum": [
                      "out_of_time",
                      "cannot_reach",
                      "other"
                    ]
                  }
                },
                "required": [
                  "countTaskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/counts/year": {
      "get": {
        "operationId": "counts_year_page",
        "summary": "counts_year_page",
        "description": "Export every approved count whose observations can fall between `from` and `to` (YYYY-MM-DD, at most a year; optionally one `warehouseId`): whole counts a page, each with its locations (state, who confirmed one empty and when, this count's observation span, and `credited` when that span lies inside the range), its lines (expected, counted, by whom and when, the booked difference) and its reported lots. Selected by approval time (a December count approved in January is in), never after the first page's `upTo` snapshot, which the `cursor` carries. The first page answers `totals` (approved counts and counted lines, `capped` past 20,000). Refuses a range older than the hot two years with \"counts_archived\" (the counts history book has them).\n\n**Operation id:** `counts_year_page` — the same operation is `app.counts.year_page({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/counts_year_page`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "counts"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/customer-pages/brand": {
      "get": {
        "operationId": "customerPages_brand_get",
        "summary": "customerPages_brand_get",
        "description": "Read one store's customer brand (roadmap I-A): the three colours and their derived, WCAG-checked tokens, corners, the logo's size, the languages and the merchant's voice per language (e-mail intro, footer, sign-off), help links and address, the store's From address with its sending domain's state, and the store page's link settings. storeId is a store of the account (stores_list); omitted, the store the call acts as. A store that never saved a brand answers revision 0 with the account's legacy e-mail settings read as a brand, English only.\n\n**Operation id:** `customerPages_brand_get` — the same operation is `app.customerPages.brand_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/customerPages_brand_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "customer-pages"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": false,
            "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "operationId": "customerPages_brand_save",
        "summary": "customerPages_brand_save",
        "description": "Save one store's customer brand, which every customer e-mail of that store wears from then on. Pass expectedRevision from the latest read (0 before the first save); a stale one is refused revision_mismatch with the current revision. Refused as a field error: text on the background below 4.5:1 (the message names the nearest colour that passes), an unknown placeholder in an override ({store} and {order} where the key allows them), a default language the brand does not list. A From address at a hostname the account has not verified saves, and the store sends from the platform address until it is verified (domains_request).\n\n**Operation id:** `customerPages_brand_save` — the same operation is `app.customerPages.brand_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/customerPages_brand_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "customer-pages"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "storeId": {
                    "type": "string",
                    "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "brand": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 80
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "accent": {
                        "type": "string"
                      },
                      "background": {
                        "type": "string"
                      },
                      "ink": {
                        "type": "string"
                      },
                      "corners": {
                        "type": "string",
                        "enum": [
                          "square",
                          "soft",
                          "round"
                        ]
                      },
                      "logo": {
                        "type": "object",
                        "properties": {
                          "width": {
                            "type": "integer",
                            "minimum": 80,
                            "maximum": 240
                          },
                          "align": {
                            "type": "string",
                            "enum": [
                              "left",
                              "center"
                            ]
                          }
                        },
                        "required": [
                          "width",
                          "align"
                        ]
                      },
                      "locales": {
                        "minItems": 1,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "en",
                            "de"
                          ]
                        }
                      },
                      "defaultLocale": {
                        "type": "string",
                        "enum": [
                          "en",
                          "de"
                        ]
                      },
                      "overrides": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "en",
                            "de"
                          ]
                        },
                        "additionalProperties": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "enum": [
                              "email.intro",
                              "email.footer",
                              "email.signoff",
                              "slip.footer"
                            ]
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "help": {
                        "type": "object",
                        "properties": {
                          "links": {
                            "maxItems": 4,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 60
                                },
                                "url": {
                                  "type": "string",
                                  "maxLength": 2048,
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "email": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 254,
                                "format": "email",
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "links",
                          "email"
                        ]
                      },
                      "sender": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string",
                                "maxLength": 254,
                                "format": "email",
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                              }
                            },
                            "required": [
                              "address"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "storefront": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string",
                            "pattern": "^\\/(?:apps|a|community|tools)\\/[A-Za-z0-9_-]{1,30}$"
                          },
                          "linkTarget": {
                            "type": "string",
                            "enum": [
                              "store",
                              "carrier"
                            ]
                          }
                        },
                        "required": [
                          "path",
                          "linkTarget"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "accent",
                      "background",
                      "ink",
                      "corners",
                      "logo",
                      "locales",
                      "defaultLocale",
                      "overrides",
                      "help",
                      "sender",
                      "storefront"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "expectedRevision",
                  "brand"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/customer-pages/health": {
      "get": {
        "operationId": "customerPages_health",
        "summary": "customerPages_health",
        "description": "Is the store's customer page working: where it is (host and path, null host until Shopify names one), where its links go, and how many order pages wait to be published (count, capped). storeId as customerPages_brand_get; omitted, the store the call acts as.\n\n**Operation id:** `customerPages_health` — the same operation is `app.customerPages.health({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/customerPages_health`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "customer-pages"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": false,
            "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dangerous-goods/suggestions": {
      "get": {
        "operationId": "dg_suggestions_list",
        "summary": "dg_suggestions_list",
        "description": "The stored dangerous-goods suggestions (AI lane U5b): one status's page (`ready` by default), or one item's row (`variantId`), each saying whether its product text moved since (`stale`) and why a failed row was not checked (`failure`); `withCounts` adds the count per status, the check's run status and whether the daily AI limit stopped it (`limitReached`).\n\n**Operation id:** `dg_suggestions_list` — the same operation is `app.dg.suggestions_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dg_suggestions_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dangerous-goods"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asked",
                "ready",
                "checked",
                "failed"
              ]
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 0,
              "maximum": 50
            }
          },
          {
            "name": "withCounts",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dangerous-goods/suggestions/check": {
      "post": {
        "operationId": "dg_suggestions_request",
        "summary": "dg_suggestions_request",
        "description": "Check up to 200 items for dangerous goods from their product text (AI lane U5b): each is asked again, and a background check reads its title, type and Shopify description. The answers are suggestions (`dg_suggestions_list`); nothing is marked until one is used. A linked listing asks its stock item. More than 500 items in flight is refused `dg_suggestions_busy`. While suggestions are switched off, or once the daily AI limit is reached, the check asks no model and its items end failed with that `failure`. Pass a `requestKey` to make a retry answer the first result.\n\n**Operation id:** `dg_suggestions_request` — the same operation is `app.dg.suggestions_request({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dg_suggestions_request`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dangerous-goods"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "variantIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/dangerous-goods/suggestions/resolve": {
      "post": {
        "operationId": "dg_suggestions_resolve",
        "summary": "dg_suggestions_resolve",
        "description": "Decide stored dangerous-goods suggestions (AI lane U5b): `use` writes each named row's lithium class and UN number through the class's own writer (a row without a class, one whose product text changed since it was read, or one over another family's class is refused by name, unwritten); `dismiss` deletes the named rows; `stop` ends the check (its asked rows, a page at a time); `clear_checked` clears the rows that found nothing; `retry` restarts a stopped check.\n\n**Operation id:** `dg_suggestions_resolve` — the same operation is `app.dg.suggestions_resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dg_suggestions_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dangerous-goods"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "use",
                      "dismiss",
                      "stop",
                      "clear_checked",
                      "retry"
                    ]
                  },
                  "suggestionIds": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A dangerousGoodsSuggestions id, e.g. \"dangerousGoodsSuggestions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/dashboard/needs-attention": {
      "get": {
        "operationId": "dashboard_needs_attention",
        "summary": "dashboard_needs_attention",
        "description": "The exception worklist for the home screen, ranked: orders on hold grouped by reason (with the covering document when the hold names one), orders the allocation engine could not fill (with the number of missing skus), side effects that did not go through — failed (dead), held while the peer is not answering, or expired out of the backlog — grouped by status and action with the affected document named, open shipping exceptions, and open orders that have not changed in over a week. Each group carries a count and up to three examples with a typed route (the Integrations health panel for side effects). Counts are per ORDER, not per hold. Every scan is bounded and discloses whether it was capped.\n\n**Operation id:** `dashboard_needs_attention` — the same operation is `app.dashboard.needs_attention({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dashboard_needs_attention`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dashboard"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dashboard/operation-cards": {
      "get": {
        "operationId": "dashboard_operation_cards",
        "summary": "dashboard_operation_cards",
        "description": "One card per warehouse operation for the home screen: how much work is waiting, how much of it is late and how much is blocked. `today` is the caller's local calendar day (YYYY-MM-DD) — the database has no timezone. receive = open receipts (late once a promised day lies before `today`, a promised instant lies before `dayStartMs` — the epoch ms at which `today` began for the caller — or an unpromised receipt is 3 days old) · pick = open pick batches (late after 24h) · pack = pack jobs waiting (blocked = failed jobs) · ship = labels to buy or print (blocked = open shipping exceptions) · count = open cycle counts (blocked = waiting for approval) · returns = return requests waiting for a decision. Every count comes from a bounded scan; `capped` says when one hit its budget.\n\n**Operation id:** `dashboard_operation_cards` — the same operation is `app.dashboard.operation_cards({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dashboard_operation_cards`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dashboard"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "today",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "dayStartMs",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dashboard/output": {
      "get": {
        "operationId": "dashboard_output",
        "summary": "dashboard_output",
        "description": "Today's output for the home screen: fulfillments (parcels) created today and yesterday, open fulfillment orders due before tomorrow (dueToday, which includes the late ones) and the ones already past their promise (late). The caller sends its local midnights as epoch ms (dayStartMs, previousDayStartMs, nextDayStartMs); every number is exact. While delivery dates are on (`deliveryDates`), work with a requested delivery date counts by its pack day in its warehouse's own day: dueToday = packed today or overdue, late = the pack day has passed; everything else by Shopify's fulfil-by against the caller's midnights. `packTime`: the team's pack time today in every warehouse, each on its own calendar day, with packing_time_summary's figures (parcels packed, the average within 30 minutes, the parcels over it) and `capped` when more warehouses exist than one read takes; no figure per person or per station.\n\n**Operation id:** `dashboard_output` — the same operation is `app.dashboard.output({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dashboard_output`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dashboard"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "dayStartMs",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "previousDayStartMs",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "nextDayStartMs",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dashboard/recent-events": {
      "get": {
        "operationId": "dashboard_recent_events",
        "summary": "dashboard_recent_events",
        "description": "The 20 newest change events of the shop — the dashboard feed without the counters.\n\n**Operation id:** `dashboard_recent_events` — the same operation is `app.dashboard.recent_events({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dashboard_recent_events`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dashboard"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/dashboard/stats": {
      "get": {
        "operationId": "dashboard_stats",
        "summary": "dashboard_stats",
        "description": "Dashboard counters from bounded index scans: open orders, orders held by us, fulfillment orders due within 24h, fulfillments created today, variants at or below the low-stock threshold, plus the 20 newest change events. `capped` reports which scans hit their budget. Due = the end of the pack day (the warehouse's packing day before the customer's requested delivery day, in the warehouse's time zone) for work at a warehouse with a requested delivery date while delivery dates are on, else Shopify's fulfil-by.\n\n**Operation id:** `dashboard_stats` — the same operation is `app.dashboard.stats({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dashboard_stats`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "dashboard"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/disposition/damage": {
      "post": {
        "operationId": "disposition_record_damage",
        "summary": "disposition_record_damage",
        "description": "Move damaged / exception stock from its current bin into the warehouse's hospital / QA-hold bin (HOSP-01, created on first use — not pickable, not sellable) with a reason code and a real ledger movement (WHT-016). The source bin is required; any reservation on it travels with the goods. Defaults to the `damaged` reason. Pack-job references must use disposition_record_damage_bulk with the actual pack job ID. Dispositioning a LOCAL item (VMAT-/ASM-/CSTM-) mirrors the new levels to its owning peer, and is refused with a coded `details.localRefusal` when the item is frozen history or still unplaced — an archived one may still be drained. Pass a `requestKey` per damage, kept across retries of it: the same key with the same damage answers the first booking and moves no stock twice; the same key for another damage is refused (`idempotency_key_reused`).\n\n**Operation id:** `disposition_record_damage` — the same operation is `app.disposition.record_damage({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/disposition_record_damage`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "disposition"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "description": "document id of the variant (or scan a code).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "scannedCode": {
                    "description": "Item barcode/sku (alternative to variantId).",
                    "type": "string"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "fromBinId": {
                    "description": "document id of the source bin.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "fromBinCode": {
                    "description": "Source bin code (alternative to fromBinId).",
                    "type": "string"
                  },
                  "reasonCode": {
                    "description": "Defaults to `damaged`.",
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "refType": {
                    "description": "Link back to the work that surfaced the damage (closed set).",
                    "type": "string",
                    "enum": [
                      "warehouse_transfer",
                      "physical_verification",
                      "adjustment",
                      "allocation",
                      "allocation_line",
                      "component_pick",
                      "component_pick_unstage",
                      "count_task",
                      "damage",
                      "import",
                      "local_item_supersession",
                      "local_item_twin_move",
                      "local_stock_handback",
                      "location_takeover",
                      "movement",
                      "opening",
                      "pack_job",
                      "pick_line",
                      "receipt",
                      "return_receipt",
                      "task"
                    ]
                  },
                  "refId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for mark_damaged (outside a desk lead).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "warehouseId",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/disposition/damage/bulk": {
      "post": {
        "operationId": "disposition_record_damage_bulk",
        "summary": "disposition_record_damage_bulk",
        "description": "Move a whole parcel's items (max 100) from ONE source bin into the warehouse's hospital / QA-hold bin in one transaction — the QC-fail flow at pack. One ledger movement per item; `applied`/`moved` say what moved and `skipped` names each item refused BEFORE its write with a coded reason (unknown_variant, insufficient_stock). A fault of the whole request (unknown bin, the hospital bin as source, an unknown reason, a variant listed twice) rolls the batch back whole. `requestKey` makes a retried call a verbatim replay; the same key with a different payload is a conflict (idempotency_key_reused). With refType pack_job, refId must be the real pack job ID: all remaining staged picks must match, QC must have failed, and the parcel is cancelled with an immutable disposition receipt. A new request key replays that same receipt only for the same payload. Damaged units become unreserved hospital stock for inspection; the order remains unfulfilled.\n\n**Operation id:** `disposition_record_damage_bulk` — the same operation is `app.disposition.record_damage_bulk({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/disposition_record_damage_bulk`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "disposition"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "items": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "format": "floormode-id",
                          "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                        },
                        "qty": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "variantId",
                        "qty"
                      ]
                    },
                    "description": "The parcel's items; each variant at most once."
                  },
                  "fromBinId": {
                    "description": "document id of the source bin.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "fromBinCode": {
                    "description": "Source bin code (alternative to fromBinId).",
                    "type": "string"
                  },
                  "reasonCode": {
                    "description": "Defaults to `damaged`.",
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "refType": {
                    "description": "Link back to the work that surfaced the damage (closed set).",
                    "type": "string",
                    "enum": [
                      "warehouse_transfer",
                      "physical_verification",
                      "adjustment",
                      "allocation",
                      "allocation_line",
                      "component_pick",
                      "component_pick_unstage",
                      "count_task",
                      "damage",
                      "import",
                      "local_item_supersession",
                      "local_item_twin_move",
                      "local_stock_handback",
                      "location_takeover",
                      "movement",
                      "opening",
                      "pack_job",
                      "pick_line",
                      "receipt",
                      "return_receipt",
                      "task"
                    ]
                  },
                  "refId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for mark_damaged (outside a desk lead).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "Caller-minted idempotency key (e.g. a UUID), one per logical submit.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "warehouseId",
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/disposition/damaged": {
      "get": {
        "operationId": "disposition_list_damaged",
        "summary": "disposition_list_damaged",
        "description": "The stock currently held in a warehouse's hospital / QA-hold bin (WHT-016), by variant: onHand, reserved and available. Empty when the bin does not exist yet.\n\n**Operation id:** `disposition_list_damaged` — the same operation is `app.disposition.list_damaged({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/disposition_list_damaged`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "disposition"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/domains": {
      "get": {
        "operationId": "domains_list",
        "summary": "domains_list",
        "description": "List the account's sending domains (one row per e-mail hostname), their DNS records, state and provider readiness. Own tracking domains are deferred; a dark tracking row is retired on its next check.\n\n**Operation id:** `domains_list` — the same operation is `app.domains.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/domains_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "domains"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/domains/remove": {
      "post": {
        "operationId": "domains_remove",
        "summary": "domains_remove",
        "description": "Disable a domain immediately and durably remove its provider resource and hostname reservation. Refused (domain_in_use) while a store's brand still sends from it.\n\n**Operation id:** `domains_remove` — the same operation is `app.domains.remove({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/domains_remove`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "domains"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domainId": {
                    "type": "string",
                    "description": "A merchantDomains id, e.g. \"merchantDomains_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "generation": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "domainId",
                  "generation"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/domains/request": {
      "post": {
        "operationId": "domains_request",
        "summary": "domains_request",
        "description": "Request a sending domain for the stores' From addresses (roadmap I-A). authorized: true states that Floormode may send the stores' transactional order e-mails from it (recorded with who stated it). A store's own primary domain is proven by Shopify's domain connection; any other hostname needs the _floormode TXT record before the provider creates it. kind tracking is refused (domain_kind_unavailable); myshopify.com and Floormode's own addresses are refused (domain_platform_host). Requesting a hostname the account has answers its row.\n\n**Operation id:** `domains_request` — the same operation is `app.domains.request({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/domains_request`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "domains"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tracking",
                      "email"
                    ]
                  },
                  "hostname": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "authorized": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "kind",
                  "hostname",
                  "authorized"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/domains/verify": {
      "post": {
        "operationId": "domains_verify",
        "summary": "domains_verify",
        "description": "Check a domain now (Check again): one DNS proof and one provider read; a failed or unstarted provider check is started again. Nothing re-checks on a clock: the provider's webhook, a refused send or this call arms each check.\n\n**Operation id:** `domains_verify` — the same operation is `app.domains.verify({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/domains_verify`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "domains"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domainId": {
                    "type": "string",
                    "description": "A merchantDomains id, e.g. \"merchantDomains_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "generation": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "domainId",
                  "generation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/entity-events": {
      "get": {
        "operationId": "entity_events_list",
        "summary": "entity_events_list",
        "description": "List the change timeline (entityEvents) of one entity, newest first (max 100). entityType is a closed set, e.g. \"order\", \"fulfillment_order\", \"product\", \"location\". A pick, pack or allocation fact is written once, on the order; a fulfillment order's timeline holds its own lifecycle (created, status, holds, splits). Stock writes no timeline: a bin's or an item's movements are inventory_movements (with onHandAfter), its reservations inventory_reservations. An archived order's timelines left with it: an empty one answers historyFromMs — read the order with history_order_get. `seq` is the stable key; `_id` may change once when a closed order's timeline compacts.\n\n**Operation id:** `entity_events_list` — the same operation is `app.entity.events_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/entity_events_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "entity-events"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "entityType",
            "in": "query",
            "required": true,
            "description": "Entity type, e.g. \"order\".",
            "schema": {
              "type": "string",
              "enum": [
                "warehouse_transfer",
                "privacy_request",
                "alert",
                "automation_rule",
                "billing",
                "box",
                "carrier_account",
                "checkout_option",
                "count_task",
                "dom_rule",
                "dropship_po",
                "dropship_vendor",
                "freight_quote",
                "fulfillment",
                "fulfillment_order",
                "integration",
                "location",
                "location_type",
                "lot",
                "manifest",
                "note",
                "order",
                "pack_job",
                "pick_batch",
                "pickup",
                "product",
                "receipt",
                "return",
                "return_receipt",
                "return_request",
                "reverse_delivery",
                "reverse_fulfillment_order",
                "serial_unit",
                "settings",
                "shipment",
                "shipping_rule",
                "sku_slotting",
                "slotting_rule",
                "station",
                "store",
                "sync_health",
                "task",
                "variant",
                "warehouse",
                "wave",
                "work_order",
                "worker_profile",
                "zone",
                "person",
                "role",
                "floor_device"
              ],
              "description": "Entity type, e.g. \"order\"."
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": true,
            "description": "Entity id, e.g. the numeric Shopify order id.",
            "schema": {
              "type": "string",
              "description": "Entity id, e.g. the numeric Shopify order id.",
              "format": "floormode-id"
            }
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "description": "The store a Shopify id belongs to (`store.id` of an order). Absent: every store you see.",
            "schema": {
              "description": "The store a Shopify id belongs to (`store.id` of an order). Absent: every store you see.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "operationId": "events_list",
        "summary": "events_list",
        "description": "Read new events from a feed: the next page (at most `limit` events and 1 MB) after your `after` cursor, or from an instant (`since`), oldest first. Keep the answer's `cursor` and read again after `retryAfterMs` (0 while more is waiting). Events are the Standard Webhooks bodies; deduplicate on `id`. You get only the events your own role and warehouses may read (`readable`). A `gap` names a period the feed may have missed (the log keeps 5 days). A start in the past reads only what the log kept: events from before any listener or during a lapse of this feed are not there, and no gap names them. Feed reads have their own limits (per reader and per store), not the call quota.\n\n**Operation id:** `events_list` — the same operation is `app.events.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/events_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "feed",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^feed_[0-9A-HJKMNP-TV-Z]{26}$"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/events/feeds": {
      "get": {
        "operationId": "event_feeds_list",
        "summary": "event_feeds_list",
        "description": "List the event feeds (at most 10): name, public key, events, filters, when it was made, when it expires (30 days after its last read or Renew), its last read and its Feed URL.\n\n**Operation id:** `event_feeds_list` — the same operation is `app.event.feeds_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/event_feeds_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "event_feeds_create",
        "summary": "event_feeds_create",
        "description": "Make an event feed an agent or script reads with events_list: a name, the events, optional warehouse / store filters, and where it starts (`now`, or `oldest`: the oldest event the log still keeps). Answers the feed with its public key and Feed URL. The key is an address, not a credential: a reader needs its own access, and each event is checked against the reader's role and warehouses when read.\n\n**Operation id:** `event_feeds_create` — the same operation is `app.event.feeds_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/event_feeds_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 49,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "shipment.label_purchased",
                        "pack_job.completed",
                        "order.fulfilled",
                        "shipment.delivered",
                        "shipment.exception_reported",
                        "count.variance_found",
                        "hold.applied",
                        "lot.blocked",
                        "lot.unblocked",
                        "order.address_changed",
                        "return.requested",
                        "return.received",
                        "order.created",
                        "order.allocated",
                        "order.completed",
                        "shipment.label_voided",
                        "shipment.transit_started",
                        "alert.raised",
                        "alert.resolved",
                        "automation.rule_matched",
                        "order.deadline_missed",
                        "order.warehouse_assigned",
                        "order.deallocated",
                        "order.backordered",
                        "order.backorder_resolved",
                        "order.cancelled",
                        "hold.released",
                        "wave.released",
                        "wave.closed",
                        "pick_batch.started",
                        "pick_batch.completed",
                        "pick_line.shorted",
                        "manifest.closed",
                        "receipt.completed",
                        "receipt.cancelled",
                        "count.approved",
                        "stocktake.signed_off",
                        "stock.adjusted",
                        "stock.on_hand_changed",
                        "adjustment_request.submitted",
                        "bin.blocked",
                        "bin.unblocked",
                        "lot.expired",
                        "return.approved",
                        "return.denied",
                        "return.refunded",
                        "transfer.started",
                        "transfer.completed",
                        "replenishment.completed"
                      ]
                    }
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "warehouseIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "storeIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "alertTypes": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "automation_rule",
                            "backorder",
                            "backorder_restocked",
                            "barcode_aliases_refused",
                            "checkout_options_cap_reached",
                            "count_variance",
                            "external_fulfillment_unbooked",
                            "fo_close_deferred",
                            "fulfillment_cancel_restocked",
                            "handback_overdue",
                            "integration_key_reuse",
                            "inventory_writer_drift",
                            "inventory_writer_drift_cleared",
                            "inventory_writer_gap",
                            "landed_cost_refused",
                            "local_snapshot_skipped",
                            "lot_blocked",
                            "lot_expiry_tightened",
                            "near_expiry",
                            "order_action_attention",
                            "order_edit_mirror_refresh_dead",
                            "order_refresh_dead",
                            "oversell_risk",
                            "pack_ship_skipped",
                            "packaging_short",
                            "payment_auth_window",
                            "peer_capability_revoked",
                            "peer_reachable",
                            "peer_unreachable",
                            "pick_lines_dropped",
                            "pick_release_skipped",
                            "po_push_confirmation_overflow",
                            "receipt_price_deviation",
                            "refund_failure",
                            "refund_restock_unreceived",
                            "refund_stock_unbooked",
                            "reorder_suggested",
                            "return_label_unprintable",
                            "shipment_weight_estimated",
                            "sibling_report_refused",
                            "sla_breach",
                            "source_lines_exceeded",
                            "station_supply_unrefillable",
                            "stock_release_clamped",
                            "sync_failure",
                            "token_refresh_refused",
                            "token_refresh_unresolved",
                            "transfer_source_effect_refused",
                            "wave_auto_release_refused",
                            "webhook_endpoint_off"
                          ]
                        }
                      }
                    }
                  },
                  "start": {
                    "default": "now",
                    "type": "string",
                    "enum": [
                      "now",
                      "oldest"
                    ]
                  }
                },
                "required": [
                  "name",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/events/feeds/delete": {
      "post": {
        "operationId": "event_feeds_delete",
        "summary": "event_feeds_delete",
        "description": "Delete a feed: its key stops working at once.\n\n**Operation id:** `event_feeds_delete` — the same operation is `app.event.feeds_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/event_feeds_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feed": {
                    "type": "string",
                    "pattern": "^feed_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "feed"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/events/feeds/renew": {
      "post": {
        "operationId": "event_feeds_renew",
        "summary": "event_feeds_renew",
        "description": "Renew a feed: it lives 30 more days from now (an expired feed listens again from now).\n\n**Operation id:** `event_feeds_renew` — the same operation is `app.event.feeds_renew({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/event_feeds_renew`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feed": {
                    "type": "string",
                    "pattern": "^feed_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "feed"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/events/types": {
      "get": {
        "operationId": "event_types_list",
        "summary": "event_types_list",
        "description": "The event catalogue every webhook endpoint subscribes from: each event's name (`<resource>.<past_verb>`), label, group, the sentence saying when it fires, its body version, the filter dimensions it carries (warehouse, store) and its sample `data`. The bodies' schemas are the OpenAPI document's `webhooks`. Each row names the permission a caller needs to read the event from a feed (`permission`).\n\n**Operation id:** `event_types_list` — the same operation is `app.event.types_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/event_types_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "events"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/exceptions": {
      "get": {
        "operationId": "exceptions_list",
        "summary": "exceptions_list",
        "description": "List shipping exceptions (max 100 per page) with the shipment short id, order name and tracking number. Filter by a set of statuses (open, resolved), by shipment or by one `reason` code (the carrier's slug, e.g. failed_attempt); sort newest first (default) or oldest first; pass `cursor` back for the next page. `openCount` is the shipment scope's open total on the first page (it ignores `statuses` and `reason`), null on later pages.\n\n**Operation id:** `exceptions_list` — the same operation is `app.exceptions.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/exceptions_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "exceptions"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `statuses` for each value (`?statuses=open&statuses=resolved`), or pass a JSON array (`?statuses=[\"open\",\"resolved\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "open",
              "resolved"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "resolved"
                ]
              }
            }
          },
          {
            "name": "shipmentId",
            "in": "query",
            "required": false,
            "description": "Only this shipment's exceptions.",
            "schema": {
              "description": "Only this shipment's exceptions.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "description": "One reason code, e.g. failed_attempt; absent = every reason.",
            "schema": {
              "description": "One reason code, e.g. failed_attempt; absent = every reason.",
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
            "schema": {
              "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
              "type": "string",
              "enum": [
                "at:desc",
                "at:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/exceptions/resolve": {
      "post": {
        "operationId": "exceptions_resolve",
        "summary": "exceptions_resolve",
        "description": "Resolve one shipping exception; the optional note is recorded on the entry.\n\n**Operation id:** `exceptions_resolve` — the same operation is `app.exceptions.resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/exceptions_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "exceptions"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exceptionId": {
                    "type": "string",
                    "description": "document id of the shipping exception.",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "exceptionId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/floor-devices": {
      "get": {
        "operationId": "floor_devices_list",
        "summary": "floor_devices_list",
        "description": "The account's floor devices by warehouse and name: kind, status (pending, active, revoked), who may sign in on a personal device, how it was paired, its lock settings, who is signed in now and its PIN-lock state. Revoked devices only with includeRevoked. Pairing a device stays a person's step at the device.\n\n**Operation id:** `floor_devices_list` — the same operation is `app.floor.devices_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/floor_devices_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "floor-devices"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "includeRevoked",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/forecast/reorder": {
      "get": {
        "operationId": "forecast_reorder_suggestions",
        "summary": "forecast_reorder_suggestions",
        "description": "Low-stock reorder suggestions for a warehouse: for every SKU selling from it, the velocity (units/day over the window), the reorder point (velocity × (lead + safety days)), the on-hand/available position, the suggested top-up quantity to the target coverage / slotting max, and the days of cover. Only SKUs at/below their reorder point are returned, biggest suggestion first. Bounded + cap-disclosed (`scanned`/`capped`).\n\n**Operation id:** `forecast_reorder_suggestions` — the same operation is `app.forecast.reorder_suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/forecast_reorder_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "forecast"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "required": false,
            "description": "Demand window; defaults to 30, at most 365.",
            "schema": {
              "description": "Demand window; defaults to 30, at most 365.",
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "leadTimeDays",
            "in": "query",
            "required": false,
            "description": "Supplier lead time; defaults to 14.",
            "schema": {
              "description": "Supplier lead time; defaults to 14.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "safetyStockDays",
            "in": "query",
            "required": false,
            "description": "Safety coverage; defaults to 7.",
            "schema": {
              "description": "Safety coverage; defaults to 7.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "targetCoverageDays",
            "in": "query",
            "required": false,
            "description": "Coverage a reorder tops up to; defaults to 45.",
            "schema": {
              "description": "Coverage a reorder tops up to; defaults to 45.",
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/forecast/reorder-po": {
      "post": {
        "operationId": "forecast_draft_reorder_po",
        "summary": "forecast_draft_reorder_po",
        "description": "Flag a low-stock SKU to the procurement seam (Alertified reorder event + a variant timeline entry). Advisory: a true Logistified PO-draft contract is the live-gate follow-up. The result states where the alert went: switchedOff=true means Alertified is switched off, so the alert is on this shop's alert list only and nothing was sent — switching Alertified on later does not send it.\n\n**Operation id:** `forecast_draft_reorder_po` — the same operation is `app.forecast.draft_reorder_po({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/forecast_draft_reorder_po`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "forecast"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "warehouseId",
                  "variantId",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/forecast/transfer": {
      "get": {
        "operationId": "forecast_transfer_suggestions",
        "summary": "forecast_transfer_suggestions",
        "description": "Multi-warehouse transfer suggestions: for each SKU, rebalance spare stock from warehouses above their reorder point to those below it, never pushing a source below its own reorder point. Each row carries the variant, from/to warehouse, quantity and the source's coverage after the move. Bounded + cap-disclosed. Materialize one with forecast_create_transfer_task.\n\n**Operation id:** `forecast_transfer_suggestions` — the same operation is `app.forecast.transfer_suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/forecast_transfer_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "forecast"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "windowDays",
            "in": "query",
            "required": false,
            "description": "Demand window; defaults to 30, at most 365.",
            "schema": {
              "description": "Demand window; defaults to 30, at most 365.",
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "leadTimeDays",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "safetyStockDays",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "targetCoverageDays",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/forecast/transfer-task": {
      "post": {
        "operationId": "forecast_create_transfer_task",
        "summary": "forecast_create_transfer_task",
        "description": "Materialize a transfer suggestion as a `move` task from one warehouse to another (deduped per variant → destination: one open rebalance at a time).\n\n**Operation id:** `forecast_create_transfer_task` — the same operation is `app.forecast.create_transfer_task({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/forecast_create_transfer_task`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "forecast"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromWarehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toWarehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "fromWarehouseId",
                  "toWarehouseId",
                  "variantId",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/freight/quotes": {
      "get": {
        "operationId": "freight_quotes_list",
        "summary": "freight_quotes_list",
        "description": "List freight quotes, newest first (max 100), with the order name and a derived `expired` flag (the quote's time-bound window has elapsed). Filter by status (open, booking, booked, expired, cancelled) or by the order they belong to. Each quote carries its handling units, region-aware classification (NMFC class / density or loading meters / pallet spaces / chargeable weight) and the collected carrier offers.\n\n**Operation id:** `freight_quotes_list` — the same operation is `app.freight.quotes_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/freight_quotes_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "freight"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "booking",
                "booked",
                "expired",
                "cancelled"
              ]
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "document id of the order.",
            "schema": {
              "description": "document id of the order.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/freight/quotes/cancel": {
      "post": {
        "operationId": "freight_quotes_cancel",
        "summary": "freight_quotes_cancel",
        "description": "Cancel an open (or expired) freight quote so it stops showing as bookable. Refused as a conflict for a quote that has already been booked into a shipment, and for one whose tender is still being attempted (`booking`) — wait for that attempt to settle first.\n\n**Operation id:** `freight_quotes_cancel` — the same operation is `app.freight.quotes_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/freight_quotes_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "freight"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": "string",
                    "description": "document id of the freight quote.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "quoteId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/freight/quotes/get": {
      "get": {
        "operationId": "freight_quotes_get",
        "summary": "freight_quotes_get",
        "description": "Get one freight quote with its handling units, region-aware classification, the collected offers (carrier, service, amount, transit, expiry), the booked offer/shipment (once booked) and the BOL documents. Returns null for an unknown quote.\n\n**Operation id:** `freight_quotes_get` — the same operation is `app.freight.quotes_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/freight_quotes_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "freight"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "quoteId",
            "in": "query",
            "required": true,
            "description": "document id of the freight quote.",
            "schema": {
              "type": "string",
              "description": "document id of the freight quote.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/books": {
      "get": {
        "operationId": "history_books_list",
        "summary": "history_books_list",
        "description": "The history archive's books of one year (the stock ledger and the cost of goods sold, one part per day; the lot book, per ship month): per book and month the parts, rows and bytes, from the year's manifest. Download a month as gzip CSV from GET /api/history/books/{book}/{YYYY-MM}.\n\n**Operation id:** `history_books_list` — the same operation is `app.history.books_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_books_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "The calendar year, `YYYY`.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}$",
              "description": "The calendar year, `YYYY`."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/orders/detail": {
      "get": {
        "operationId": "history_order_get",
        "summary": "history_order_get",
        "description": "Read an order that left Floormode for the history archive (closed, and past the tenant's hot window, history_status tier.days): { state: \"hot\" } while Floormode still holds it (read it with orders_get), { state: \"none\" } when the archive holds no copy, or { state: \"archived\", order } with its newest copy: the facts (numbers, lines, fulfilments, shipments, pick and pack facts as person ids, COGS) and the customer part (name, addresses, notes, tags). customerState says whether that part is kept, erased by a privacy request, or absent (none, or past its six years); people names the person ids now.\n\n**Operation id:** `history_order_get` — the same operation is `app.history.order_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_order_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Shopify's numeric order id as a string (\"450789469\").",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Shopify's numeric order id as a string (\"450789469\").",
              "format": "floormode-id"
            }
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
            "schema": {
              "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
              "type": "string"
            }
          },
          {
            "name": "life",
            "in": "query",
            "required": false,
            "description": "The newest archived copy even while the order is in Floormode again (a restored order): its earlier pick and pack history.",
            "schema": {
              "description": "The newest archived copy even while the order is in Floormode again (a restored order): its earlier pick and pack history.",
              "type": "string",
              "const": "archived"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/orders/evidence": {
      "get": {
        "operationId": "history_order_evidence",
        "summary": "history_order_evidence",
        "description": "The evidence an archived order still has in Floormode, inside its own window: the pack photos (the warehouse's photo retention), the customer's return photos (with returns.view) and the bills of lading (with shipping.labels or floor.pack). Metadata only; open the bytes with GET /api/packing/photos/{photoId}, /api/returns/evidence/{evidenceId} and /api/shipping/documents/{documentId}. Empty once Shopify deleted the order or a privacy request erased its customer.\n\n**Operation id:** `history_order_evidence` — the same operation is `app.history.order_evidence({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_order_evidence`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Shopify's numeric order id as a string (\"450789469\").",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Shopify's numeric order id as a string (\"450789469\").",
              "format": "floormode-id"
            }
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
            "schema": {
              "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Pass this as a JSON-encoded object.",
            "schema": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "packPhotos",
                    "returnPhotos",
                    "documents"
                  ]
                },
                "cursor": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "The kind's `cursor` from the previous answer."
                }
              },
              "required": [
                "kind",
                "cursor"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/orders/packing-slip": {
      "get": {
        "operationId": "history_packing_slip",
        "summary": "history_packing_slip",
        "description": "The original packing slip of an archived order's parcel, from the archive: the lines that went into the box, the pack job's code and tracking, and — while the customer part is kept — the address and the order note. { state: \"none\" } when the archive holds no such parcel. The PDF: GET /api/history/orders/{shopifyOrderId}/packing-slip.pdf?packJobId=….\n\n**Operation id:** `history_packing_slip` — the same operation is `app.history.packing_slip({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_packing_slip`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Shopify's numeric order id as a string (\"450789469\").",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Shopify's numeric order id as a string (\"450789469\").",
              "format": "floormode-id"
            }
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
            "schema": {
              "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
              "type": "string"
            }
          },
          {
            "name": "packJobId",
            "in": "query",
            "required": true,
            "description": "The parcel: a pack job of the archived order (`facts.packJobs[]._id` of history_order_get).",
            "schema": {
              "type": "string",
              "description": "The parcel: a pack job of the archived order (`facts.packJobs[]._id` of history_order_get).",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/orders/restore": {
      "post": {
        "operationId": "history_order_restore",
        "summary": "history_order_restore",
        "description": "Bring an archived order back into Floormode, e.g. for a goodwill return: Floormode reads it from Shopify again and mirrors it as a new copy. A restored closed order fires no automation rule and sends no customer notification again, and stays for 90 days. { state: \"staged\" } once its Shopify copy is on its way in (it appears within seconds), { state: \"hot\" } when Floormode holds it already. Its earlier pick and pack history stays readable with history_order_get.\n\n**Operation id:** `history_order_restore` — the same operation is `app.history.order_restore({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_order_restore`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Shopify's numeric order id as a string (\"450789469\").",
                    "format": "floormode-id"
                  },
                  "store": {
                    "description": "The order's store: `store.id` of the search hit or lot ship that named it. Absent: every live store, home store first.",
                    "type": "string"
                  }
                },
                "required": [
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/history/orders/search": {
      "get": {
        "operationId": "history_orders_search",
        "summary": "history_orders_search",
        "description": "Find orders in Shopify — including ones that left Floormode for the history archive — by order number, customer name or e-mail, or SKU (Shopify's own order search). Each hit: shopifyOrderId, name, created, closed and cancelled instants, payment and fulfilment status, total; open one with history_order_get. capped past the first 20 hits.\n\n**Operation id:** `history_orders_search` — the same operation is `app.history.orders_search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_orders_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "What Shopify's order search takes: an order number (#1001 or 1001), a customer's name or e-mail, a SKU.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "description": "What Shopify's order search takes: an order number (#1001 or 1001), a customer's name or e-mail, a SKU."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/privacy-orders": {
      "get": {
        "operationId": "history_privacy_orders",
        "summary": "history_privacy_orders",
        "description": "The archived orders of a privacy export (Art. 15), page by page, once its privacy_exportPage walk is complete: every archived copy of each order the request names, facts and customer part, as export records (table archivedOrders). An erased customer part is stated, never read. nextCursor null after the last page.\n\n**Operation id:** `history_privacy_orders` — the same operation is `app.history.privacy_orders({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_privacy_orders`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "requestId",
            "in": "query",
            "required": true,
            "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "life": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "order",
                    "life"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/history/short-tier": {
      "post": {
        "operationId": "history_setShortTier",
        "summary": "history_setShortTier",
        "description": "Choose the opt-in 21-day tier, or give it back: with enabled true, closed orders move to the history archive 21 days after they close instead of the tier the volume rule picks; receipts and counts stay one year. Archived orders stay readable (history_order_get, history_orders_search, history_order_restore). Takes effect at the next nightly pass; false returns the tier it was taken from. history_status tier.shortTier says which.\n\n**Operation id:** `history_setShortTier` — the same operation is `app.history.setShortTier({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_setShortTier`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "true takes the 21-day tier, false gives it back."
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/history/status": {
      "get": {
        "operationId": "history_status",
        "summary": "history_status",
        "description": "The history archive as it stands: its rollout (off, copy, on), the last nightly pass, the books copied through, the orders kept in Floormode per reason (open work, a document that never ended, a lot month not yet booked, restored, too large), the orders that left with a document that never ended, and the next run.\n\n**Operation id:** `history_status` — the same operation is `app.history.status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "history"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/holds": {
      "get": {
        "operationId": "holds_list",
        "summary": "holds_list",
        "description": "List our fulfillment-order hold intents (max 100). Filter by status (pending_apply, active, pending_release, released, failed) or by Shopify order id. Holds placed by other apps are mirrored on the fulfillment order, not listed here.\n\n**Operation id:** `holds_list` — the same operation is `app.holds.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending_apply",
                "active",
                "pending_release",
                "released",
                "failed"
              ]
            }
          },
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": false,
            "description": "Numeric Shopify order id as a string.",
            "schema": {
              "description": "Numeric Shopify order id as a string.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "drift",
            "in": "query",
            "required": false,
            "description": "Needs a person: released holds Shopify still lists, which Floormode stopped releasing again (released holds included whatever the status filter).",
            "schema": {
              "description": "Needs a person: released holds Shopify still lists, which Floormode stopped releasing again (released holds included whatever the status filter).",
              "type": "string",
              "const": "stopped"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "holds_apply",
        "summary": "holds_apply",
        "description": "Hold one fulfillment order (identified by shopifyFoId or its document id). Records the intent with a `#HOLD-…` handle and queues the Shopify call; the reason maps to Shopify's hold reasons (payment_pending → AWAITING_PAYMENT, fraud_risk → HIGH_RISK_OF_FRAUD, address_issue → INCORRECT_ADDRESS, awaiting_stock → INVENTORY_OUT_OF_STOCK, awaiting_production/awaiting_supplier/customer_request/other → OTHER). The two waiting reasons take an optional `linkRef` naming the purchase, transfer or work order the hold waits for, which the order screen shows instead of a bare \"on hold\". Re-applying while a hold is pending or active returns the existing handle.\n\n**Operation id:** `holds_apply` — the same operation is `app.holds.apply({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_apply`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "foDocId": {
                    "type": "string",
                    "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shopifyFoId": {
                    "description": "Numeric Shopify fulfillment order id.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "payment_pending",
                      "fraud_risk",
                      "address_issue",
                      "awaiting_stock",
                      "awaiting_production",
                      "awaiting_supplier",
                      "customer_request",
                      "other"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "linkRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "po",
                          "to",
                          "wo",
                          "bom"
                        ],
                        "description": "Purchase order, transfer order, work order, or (M15) the BOM a sales allocation is waiting to have built when no work order exists yet."
                      },
                      "ref": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "The document number, e.g. PO-1042."
                      },
                      "label": {
                        "description": "Optional human line shown with it.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ],
                    "description": "The covering document this hold waits for. Floormode owns no PO/WO documents (Logistified and Assemblified do), so this is a merchant-readable reference, not a link."
                  },
                  "source": {
                    "description": "Defaults to manual.",
                    "type": "string",
                    "enum": [
                      "manual",
                      "rule"
                    ]
                  },
                  "ruleId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "release": {
                    "description": "Release automatically: {afterMinutes: 1..129600} or {at: 'YYYY-MM-DDTHH:mm'} in the store's time zone (UTC while unknown). A past time is refused. A fulfillment order already on hold keeps its hold and gets no timer.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "afterMinutes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 129600
                          }
                        },
                        "required": [
                          "afterMinutes"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "pattern": "^(\\d{4}-\\d{2}-\\d{2})T([01]\\d|2[0-3]):([0-5]\\d)$"
                          }
                        },
                        "required": [
                          "at"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/holds/apply-for-orders": {
      "post": {
        "operationId": "holds_apply_for_orders",
        "summary": "holds_apply_for_orders",
        "description": "Hold whole orders in ONE transaction (max 500 per call): every open fulfillment order Shopify allows to be held gets our hold intent, with the same reason mapping as holds_apply. `applied` counts the newly held fulfillment orders; orders that contributed none are listed in `skipped` with a reason (unknown_order, no_holdable_fulfillment_order, already_on_hold, batch_budget_exhausted — the per-call write budget ran out before that order; resubmit it) instead of failing the batch. Pass a `requestKey` (one per logical submit, kept across retries) and a retry answers the stored result verbatim; the same key with a different payload is a conflict (idempotency_key_reused).\n\n**Operation id:** `holds_apply_for_orders` — the same operation is `app.holds.apply_for_orders({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_apply_for_orders`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    },
                    "description": "Numeric Shopify order ids as strings."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "payment_pending",
                      "fraud_risk",
                      "address_issue",
                      "awaiting_stock",
                      "awaiting_production",
                      "awaiting_supplier",
                      "customer_request",
                      "other"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "linkRef": {
                    "description": "One covering document for the whole batch, e.g. the purchase order everything in this selection waits for.",
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "po",
                          "to",
                          "wo",
                          "bom"
                        ],
                        "description": "Purchase order, transfer order, work order, or (M15) the BOM a sales allocation is waiting to have built when no work order exists yet."
                      },
                      "ref": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "The document number, e.g. PO-1042."
                      },
                      "label": {
                        "description": "Optional human line shown with it.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      }
                    },
                    "required": [
                      "kind",
                      "ref"
                    ]
                  },
                  "release": {
                    "description": "Release automatically, as on holds_apply, for every hold this call places.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "afterMinutes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 129600
                          }
                        },
                        "required": [
                          "afterMinutes"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "pattern": "^(\\d{4}-\\d{2}-\\d{2})T([01]\\d|2[0-3]):([0-5]\\d)$"
                          }
                        },
                        "required": [
                          "at"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "requestKey": {
                    "description": "Caller-minted idempotency key (e.g. a UUID), one per logical submit.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "shopifyOrderIds",
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/holds/release": {
      "post": {
        "operationId": "holds_release",
        "summary": "holds_release",
        "description": "Release one of our holds. Queues the Shopify release; the intent goes to released once Shopify confirms it (or the next fulfillment-order snapshot does). On a released hold Shopify still lists (holds_list's Needs a person), it is Try again: one more live check of Shopify's holds and, if ours is still there, its release.\n\n**Operation id:** `holds_release` — the same operation is `app.holds.release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "holdIntentId": {
                    "type": "string",
                    "description": "document id of the hold intent.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "holdIntentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/holds/release-for-orders": {
      "post": {
        "operationId": "holds_release_for_orders",
        "summary": "holds_release_for_orders",
        "description": "Release our holds on whole orders in ONE transaction (max 500 per call): every pending or active hold intent of each order is queued for release. Holds placed by other apps stay untouched. Orders without a hold of ours are listed in `skipped` (unknown_order, no_active_hold, batch_budget_exhausted — resubmit that order). `requestKey` makes a retried call a verbatim replay, exactly as on holds_apply_for_orders.\n\n**Operation id:** `holds_release_for_orders` — the same operation is `app.holds.release_for_orders({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_release_for_orders`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    },
                    "description": "Numeric Shopify order ids as strings."
                  },
                  "requestKey": {
                    "description": "Caller-minted idempotency key (e.g. a UUID), one per logical submit.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "shopifyOrderIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/holds/set-release": {
      "post": {
        "operationId": "holds_set_release",
        "summary": "holds_set_release",
        "description": "Change when one of our open holds releases itself, or pass release null to keep holding until someone releases it. A hold a rule placed can only move later; release it with holds_release instead. A past time is refused.\n\n**Operation id:** `holds_set_release` — the same operation is `app.holds.set_release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/holds_set_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "holds"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "holdIntentId": {
                    "type": "string",
                    "description": "document id of the hold intent.",
                    "format": "floormode-id"
                  },
                  "release": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "afterMinutes": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 129600
                              }
                            },
                            "required": [
                              "afterMinutes"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "at": {
                                "type": "string",
                                "pattern": "^(\\d{4}-\\d{2}-\\d{2})T([01]\\d|2[0-3]):([0-5]\\d)$"
                              }
                            },
                            "required": [
                              "at"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "holdIntentId",
                  "release"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/integrations/health": {
      "get": {
        "operationId": "integrations_health",
        "summary": "integrations_health",
        "description": "Health of every sibling integration in one read (M15 T8): per peer the connection switch, the inbound receipt ledger (applied / rejected, last message received) and the outbound queue (pending, in-flight, parked, expired, failed, done, oldest parked message, throttled rows and the next attempt time). Plus the single-writer picture: `writerGaps` lists warehouses that can receive goods but write no Shopify inventory while Logistified is connected — a location NO app writes — and `matrix` says which app owns which Shopify number given what is currently switched on. Aggregates only; no message payloads.\n\n**Operation id:** `integrations_health` — the same operation is `app.integrations.health({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/integrations_health`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "integrations"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/integrations/outbox/redrive": {
      "post": {
        "operationId": "outbox_redrive",
        "summary": "outbox_redrive",
        "description": "Manually redrive one terminal outbound message (`failed` or `expired` in the outbox): resets it to `pending` with a fresh attempt budget, cleared throttle and transport streaks and a fresh attempt lineage, records the redrive on the sync-health timeline and arms the drain in the same transaction. The delivery runs again under its own idempotency key, so a message the destination already applied settles as a replay, not a duplicate. Refuses (`conflict`) rows that are not terminal, and rows the peer refused for their stored bytes (`refusalCode` `invalid_body`, `invalid_envelope`, `segment_mismatch`, `part_hash_mismatch` or `conflict`): a redrive resends the same bytes and would fail the same way. Also refuses an Alertified alert: an alert describes a moment that has passed and stays on the shop's own alert list.\n\n**Operation id:** `outbox_redrive` — the same operation is `app.outbox.redrive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/outbox_redrive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "integrations"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outboxId": {
                    "type": "string",
                    "description": "document id of the terminal outbox row.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "outboxId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/integrations/outbox/terminal": {
      "get": {
        "operationId": "outbox_terminal_list",
        "summary": "outbox_terminal_list",
        "description": "Terminal outbound messages (`failed` or `expired` in the outbox) of ONE destination: a sibling peer, or `shopify` for the Shopify updates a merchant may send again (order refresh, stock push, order tags, fulfillment order move). Newest death first (`settledAt`), with the attempt lineage a redrive decision needs: attempts, transport failures, the last error, the claim stamp and the attempt fingerprint. A disclosed page (`rows`/`capped`/`cursor`). Each row carries the peer's `refusalCode` that ended it (null when none was coded) and `redrivable`, false when that refusal concerned the stored bytes or the message is an alert (never sent again), which `outbox_redrive` refuses; `countShortId` is a count export's count number (else null); a Shopify row names its `order` (number and Shopify id) or its `item` (variant and warehouse).\n\n**Operation id:** `outbox_terminal_list` — the same operation is `app.outbox.terminal_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/outbox_terminal_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "integrations"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "destination",
            "in": "query",
            "required": true,
            "description": "The sibling peer, or `shopify`, whose terminal rows to list.",
            "schema": {
              "type": "string",
              "enum": [
                "logistified",
                "assemblified",
                "alertified",
                "shopify"
              ],
              "description": "The sibling peer, or `shopify`, whose terminal rows to list."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per page (max 50).",
            "schema": {
              "default": 20,
              "description": "Rows per page (max 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `cursor` the previous page answered with (keyset continuation).",
            "schema": {
              "description": "The `cursor` the previous page answered with (keyset continuation).",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory": {
      "get": {
        "operationId": "inventory_by_variant",
        "summary": "inventory_by_variant",
        "description": "Stock per variant (cursor pages, max 50 rows each): onHand, bin reserved, physicalFree and nullable available plus a per-warehouse rollup across Shopify and connected-app items. Available protects unallocated channel commitments; null and availabilityReason mean channel evidence is pending or incomplete. PhysicalFree remains sellable bin stock minus physical reservations. Optional source filter and search over sku, barcode, product and variant title. Each row also carries `committed` (units owed by open, unfulfilled fulfillment orders) and `incoming` (unreceived remainder of the open receipts). Both are NULLABLE, and null means unknown, not zero: it is returned only when the underlying bounded scan hit its ceiling and this variant was not in what came back. When the scan completed, a variant with nothing owed or arriving is 0. Use inventory_atp for the per-warehouse split of the same two buckets, and inventory_by_variant_total for the number of items under the same filters. Each row carries the item's `dangerousGoods` (class and UN number); `dangerousGoods` as a filter keeps the items marked as one of the given classes.\n\n**Operation id:** `inventory_by_variant` — the same operation is `app.inventory.by_variant({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_by_variant`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Words of an item's title, SKU or barcode, each matching a word's start. Exact SKU or barcode first, then title matches, whatever the sort.",
            "schema": {
              "description": "Words of an item's title, SKU or barcode, each matching a word's start. Exact SKU or barcode first, then title matches, whatever the sort.",
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The previous page's cursor, under the same sort and filters.",
            "schema": {
              "description": "The previous page's cursor, under the same sort and filters.",
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`id:asc` (the order items were added in, the default), `item:asc` (product then variant title, A to Z) or `item:desc` (Z to A).",
            "schema": {
              "description": "`id:asc` (the order items were added in, the default), `item:asc` (product then variant title, A to Z) or `item:desc` (Z to A).",
              "type": "string",
              "enum": [
                "id:asc",
                "item:asc",
                "item:desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per page, at most 50.",
            "schema": {
              "description": "Rows per page, at most 50.",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Catalog source; omit for all warehouse items.",
            "schema": {
              "description": "Catalog source; omit for all warehouse items.",
              "type": "string",
              "enum": [
                "shopify",
                "assemblified_virtual_material",
                "assemblified_sub_assembly",
                "logistified_custom_item",
                "floormode_virtual_material"
              ]
            }
          },
          {
            "name": "customs",
            "in": "query",
            "required": false,
            "description": "Shopify items by customs information: `complete` (base HS code and origin), `missing_hs` or `missing_origin`. Omit for every item.",
            "schema": {
              "description": "Shopify items by customs information: `complete` (base HS code and origin), `missing_hs` or `missing_origin`. Omit for every item.",
              "type": "string",
              "enum": [
                "complete",
                "missing_hs",
                "missing_origin"
              ]
            }
          },
          {
            "name": "tracking",
            "in": "query",
            "required": false,
            "description": "Items by what they record: `none`, `lot` or `serial`. Omit for every item.",
            "schema": {
              "description": "Items by what they record: `none`, `lot` or `serial`. Omit for every item.",
              "type": "string",
              "enum": [
                "none",
                "lot",
                "serial"
              ]
            }
          },
          {
            "name": "scanning",
            "in": "query",
            "required": false,
            "description": "Items by how Floor Mode confirms them: `blocked` (no barcode, SKU or alias, not allowed without a scan) or `no_scan`. Omit for every item.",
            "schema": {
              "description": "Items by how Floor Mode confirms them: `blocked` (no barcode, SKU or alias, not allowed without a scan) or `no_scan`. Omit for every item.",
              "type": "string",
              "enum": [
                "blocked",
                "no_scan"
              ]
            }
          },
          {
            "name": "dangerousGoods",
            "in": "query",
            "required": false,
            "description": "Items marked as one of these dangerous-goods classes: `lithium_in_equipment`, `lithium_with_equipment`, `lithium_alone`, `limited_quantity`, `regulated`. Omit for every item. Repeat `dangerousGoods` for each value (`?dangerousGoods=lithium_in_equipment&dangerousGoods=lithium_with_equipment`), or pass a JSON array (`?dangerousGoods=[\"lithium_in_equipment\",\"lithium_with_equipment\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "lithium_in_equipment",
              "lithium_with_equipment"
            ],
            "schema": {
              "description": "Items marked as one of these dangerous-goods classes: `lithium_in_equipment`, `lithium_with_equipment`, `lithium_alone`, `limited_quantity`, `regulated`. Omit for every item.",
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "lithium_in_equipment",
                  "lithium_with_equipment",
                  "lithium_alone",
                  "limited_quantity",
                  "regulated"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/adjust": {
      "post": {
        "operationId": "inventory_adjust",
        "summary": "inventory_adjust",
        "description": "Adjust the stock of one variant in one bin. Identify the bin by binId or binCode (+warehouseId when ambiguous) and the variant by variantId, sku or barcode. Pass exactly one of delta (relative) or setTo (absolute). reasonCode is required and must be a reason inventory_adjustment_reasons lists (a retired reason of the merchant's own is refused `reason_retired`; one marked `noteRequired` needs a `note`, else \"note_required\"). APPROVAL: with a value limit set (stock_adjustment_settings_get `approvalAbove`), a person's change worth more (units × the item's average cost there) books nothing and answers `waiting` (`requestId`, `status`, `value`, `limit`, `currency`) until a second person decides it (inventory_adjustment_decide); a retry under the same `idempotencyKey` answers that request as it stands. An item without a cost is never held. LOTS: the bin projection is per lot, so a bin holding lot-tracked stock of the item needs an explicit lotId/lotNumber, and setTo needs one for an item that tracks lots (a bin has no single absolute quantity of it) — both refuse with `details.code: \"lot_required\"` rather than adjusting a lot-less row that holds nothing.\n\n**Operation id:** `inventory_adjust` — the same operation is `app.inventory.adjust({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_adjust`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binCode": {
                    "type": "string"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "sku": {
                    "type": "string"
                  },
                  "barcode": {
                    "type": "string"
                  },
                  "lotId": {
                    "type": "string",
                    "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lotNumber": {
                    "description": "An existing lot number of the item.",
                    "type": "string"
                  },
                  "delta": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "setTo": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "reasonCode": {
                    "type": "string",
                    "minLength": 1
                  },
                  "note": {
                    "type": "string"
                  },
                  "idempotencyKey": {
                    "description": "Repeating a key is a no-op.",
                    "type": "string"
                  }
                },
                "required": [
                  "reasonCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/adjustment-reasons": {
      "get": {
        "operationId": "inventory_adjustment_reasons",
        "summary": "inventory_adjustment_reasons",
        "description": "List the adjustment reasons — a fixed vocabulary, the same for every tenant, in picker order (damaged, lost, found, shrinkage, sample, internal_use, correction, expired), then the merchant's own active reasons (`system: false`, code `custom:` + their words, the words stamped on every movement booked with them). `noteRequired`: inventory_adjust refuses that reason without a note (`details.code` \"note_required\"). inventory_adjust accepts exactly these codes.\n\n**Operation id:** `inventory_adjustment_reasons` — the same operation is `app.inventory.adjustment_reasons({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_adjustment_reasons`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/adjustment-requests": {
      "get": {
        "operationId": "inventory_adjustment_requests",
        "summary": "inventory_adjustment_requests",
        "description": "List adjustments waiting for a second person (`view: waiting`, oldest first) or decided (`view: decided`: approved, rejected or cancelled, newest first), in one warehouse or every one the caller may see: the item, bin, lot, signed change, reason, note, value and currency, who asked and when, the decision with who, when and their note, and `mine` for the caller's own. `waitingCount` (`waitingCapped` past a hundred) and `anyDecided` describe the scope.\n\n**Operation id:** `inventory_adjustment_requests` — the same operation is `app.inventory.adjustment_requests({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_adjustment_requests`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "default": "waiting",
              "type": "string",
              "enum": [
                "waiting",
                "decided"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/adjustment-requests/cancel": {
      "post": {
        "operationId": "inventory_adjustment_cancel",
        "summary": "inventory_adjustment_cancel",
        "description": "Cancel your own adjustment waiting for a second person; nothing is booked. Refusals: `details.code` \"not_your_request\", \"request_decided\".\n\n**Operation id:** `inventory_adjustment_cancel` — the same operation is `app.inventory.adjustment_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_adjustment_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "A adjustmentRequests id, e.g. \"adjustmentRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "requestId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/adjustment-requests/decide": {
      "post": {
        "operationId": "inventory_adjustment_decide",
        "summary": "inventory_adjustment_decide",
        "description": "Approve or reject an adjustment waiting for a second person (`inventory.approve`). Approving books its change through the stock door under the asker's key, as the asker's movement; rejecting books nothing. The decision, who, when and the optional `note` are the recorded approval. Refusals (`details.code`): four_eyes (the asker), request_decided, already_booked (the asker's retry booked it once the limit was off: reject it), approval_needs_person, and the stock door's own when the units are gone. The same decision sent again by its decider answers the request as it stands.\n\n**Operation id:** `inventory_adjustment_decide` — the same operation is `app.inventory.adjustment_decide({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_adjustment_decide`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "A adjustmentRequests id, e.g. \"adjustmentRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "reject"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "requestId",
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/atp": {
      "get": {
        "operationId": "inventory_atp",
        "summary": "inventory_atp",
        "description": "Available-to-promise breakdown for one variant: per-warehouse onHand, reserved (bin allocation), committed (open unfulfilled order units — derived, distinct from reserved), physicalFree (sellable stock minus bin reservations), available (channel-adjusted capacity, nullable with availabilityReason) and incoming, plus tenant-wide totals. `incoming` is the unreceived remainder (expected − received) of the open receipts — receipts that are cancelled or already fully received are excluded — and `incomingSources` names the documents behind it, each carrying the `receiptId` to fetch it with (null for the purchase_order/transfer seam kinds, which have no receipt here yet). The `supplier` and `onOrder` buckets are a declared seam for supplier-held and on-order stock: they are always 0 today because purchase orders live in Logistified, not here. `localHold` is non-null only for a LOCAL item (VMAT-/ASM-/CSTM-) whose units Floormode may not promise — `local_stock_frozen` (handed back to its owner on a disconnect), `item_unplaced` (its opening quantity has never been placed) or `catalog_unconfirmed` (no catalog record has named it). `available` is 0 whenever it is set, while `onHand` stays truthful: the units are on the shelf and have to be drainable, they are simply not ours to sell.\n\n**Operation id:** `inventory_atp` — the same operation is `app.inventory.atp({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_atp`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/backlog-shortfall": {
      "get": {
        "operationId": "inventory_backlog_shortfall",
        "summary": "inventory_backlog_shortfall",
        "description": "What has to be ordered to clear the backlog: per sku, the units owed by open unfulfilled orders (demand), what is in the bins (available), what is already on its way (incoming), the resulting shortfall and a suggested order quantity (demand − available − incoming, floored at 0). Worst shortfall first, 50 rows by default. This measures orders that EXIST; forecast_reorder_suggestions is the predictive counterpart. `capped` reports which scans hit their budget.\n\n**Operation id:** `inventory_backlog_shortfall` — the same operation is `app.inventory.backlog_shortfall({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_backlog_shortfall`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows to return (default 50).",
            "schema": {
              "description": "Rows to return (default 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "includeCovered",
            "in": "query",
            "required": false,
            "description": "Also list skus whose backlog is fully covered by stock on hand. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also list skus whose backlog is fully covered by stock on hand.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/bin-lots": {
      "get": {
        "operationId": "inventory_bin_lots",
        "summary": "inventory_bin_lots",
        "description": "The lots one bin currently holds of one variant (max 50 rows, `capped` says when more exist): lotId, lotNumber, expiryDate, onHand. Live stock, not a count snapshot — what a floor count must name before it books a lot-tracked row.\n\n**Operation id:** `inventory_bin_lots` — the same operation is `app.inventory.bin_lots({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_bin_lots`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "binId",
            "in": "query",
            "required": true,
            "description": "document id of the bin.",
            "schema": {
              "type": "string",
              "description": "document id of the bin.",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/capacity-proofs/request": {
      "post": {
        "operationId": "inventory_requestCapacityProofs",
        "summary": "inventory_requestCapacityProofs",
        "description": "Ask Shopify again for the reserved stock of the items a stock page shows (up to 100 item and warehouse pairs). Only an item that already uses capacity proofs, whose proof is no longer current and that has no request outstanding is asked for; every other pair is skipped. waitingOnly keeps only items orders may be waiting for, as a receipt opened on the floor asks. Answers how many were asked for. Does not alter physical stock.\n\n**Operation id:** `inventory_requestCapacityProofs` — the same operation is `app.inventory.requestCapacityProofs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_requestCapacityProofs`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pairs": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "warehouseId": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "required": [
                        "warehouseId",
                        "variantId"
                      ]
                    }
                  },
                  "waitingOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pairs"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/channel-observation/refresh": {
      "post": {
        "operationId": "inventory_requestChannelObservation",
        "summary": "inventory_requestChannelObservation",
        "description": "Request a fresh Shopify named-state inventory observation for one mapped item and warehouse. Verifies a terminal transfer uncertainty only when no live transfer obligation remains. Runs through the durable reconciler and does not alter physical stock.\n\n**Operation id:** `inventory_requestChannelObservation` — the same operation is `app.inventory.requestChannelObservation({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_requestChannelObservation`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "warehouseId",
                  "variantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/import": {
      "post": {
        "operationId": "inventory_import_stock",
        "summary": "inventory_import_stock",
        "description": "Import counted stock into one warehouse (max 500 rows per call). Rows are {variantId|sku|barcode, binCode, qty, tracking?}: a row's item is its `variantId` when given (inventory_opening_template's rows carry it; it wins over a code, so an item with no SKU or a shared one is still booked), else its SKU, else its barcode; `tracking` (none | lot | serial) sets the item's tracking mode as variants_set_tracking does (one mode per item per sheet; a bundle is refused), and the row's stock is still booked without a lot. Mode 'set' (default) treats qty as the counted quantity, 'add' as a delta. Unknown bins, items and codes are returned in `errors` while valid rows are applied. SIDE EFFECTS: an applied row posts an `import` stock movement and, for a LOCAL item (VMAT-/ASM-/CSTM-), sends the owning peer an absolute local_inventory_snapshot mirror. A local row Floormode may not write — handed back on a disconnect, still on the unplaced worklist, or a catalog placeholder — is REPORTED in `errors` like any other bad row and never silently skipped; place its opening quantity through local_items_place_opening first.\n\n**Operation id:** `inventory_import_stock` — the same operation is `app.inventory.import_stock({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_import_stock`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "sku": {
                          "type": "string"
                        },
                        "barcode": {
                          "type": "string"
                        },
                        "binCode": {
                          "type": "string",
                          "minLength": 1
                        },
                        "qty": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "tracking": {
                          "type": "string",
                          "enum": [
                            "none",
                            "lot",
                            "serial"
                          ]
                        }
                      },
                      "required": [
                        "binCode",
                        "qty"
                      ]
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "set",
                      "add"
                    ]
                  },
                  "idempotencyKey": {
                    "description": "Caller-minted replay key, kept across retries of one submission: the same sheet under the same key answers the original result verbatim (replayed: true, original referenceId, applied, errors) and books nothing, indefinitely; the same key with a different warehouse, mode or rows is a conflict (idempotency_key_reused).",
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "warehouseId",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/move": {
      "post": {
        "operationId": "inventory_move",
        "summary": "inventory_move",
        "description": "Move stock of one variant between two bins of the same warehouse. Fails when the source has too little available stock (unless the warehouse allows negative stock). A source bin holding lot-tracked stock needs an explicit lotId/lotNumber (`details.code: \"lot_required\"`) — the lot travels with the goods.\n\n**Operation id:** `inventory_move` — the same operation is `app.inventory.move({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_move`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lotId": {
                    "type": "string",
                    "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lotNumber": {
                    "description": "An existing lot number of the item.",
                    "type": "string"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "note": {
                    "type": "string"
                  },
                  "idempotencyKey": {
                    "description": "Repeating a key is a no-op.",
                    "type": "string"
                  }
                },
                "required": [
                  "fromBinId",
                  "toBinId",
                  "variantId",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/movements": {
      "get": {
        "operationId": "inventory_movements",
        "summary": "inventory_movements",
        "description": "Read one page of the stock ledger in the chosen order (`sort`; newest first by default) (the answer is { rows, capped, cursor } — pass `cursor` back to continue). Filter by binId (both directions) or variantId; without a filter the tenant-wide ledger is returned. `kinds` (receipt, putaway, pick, pack, ship, adjust, count, return, move, release, import, opening), `reasonCodes` (any of these reason codes, e.g. [\"damaged\"]) and the window `atFromMs`/`atToMs` (milliseconds since 1970, half-open) narrow the result — all applied before the page is cut. Once older rows left for the history archive, an answer whose window reaches below them names `historyFromMs` (every row from it on is here) and `historyKinds`. Read for one bin or one item, newest first with no kind, reason or end filter, each row carries `onHandAfter`: the bin's units (an item's, with `variantId` too), or the item's units in the movement's warehouse, after it, computed from the ledger, and `onHandChange` what the movement did to it (+ in, − out, 0 a move inside); both null on any other read, the balance also on a row older than `historyFromMs`.\n\n**Operation id:** `inventory_movements` — the same operation is `app.inventory.movements({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_movements`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "binId",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "description": "Any of these movement kinds, e.g. adjust + import; absent = every kind. Repeat `kinds` for each value (`?kinds=receipt&kinds=putaway`), or pass a JSON array (`?kinds=[\"receipt\",\"putaway\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "receipt",
              "putaway"
            ],
            "schema": {
              "description": "Any of these movement kinds, e.g. adjust + import; absent = every kind.",
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "receipt",
                  "putaway",
                  "pick",
                  "pack",
                  "ship",
                  "adjust",
                  "count",
                  "return",
                  "move",
                  "release",
                  "import",
                  "opening"
                ]
              }
            }
          },
          {
            "name": "reasonCodes",
            "in": "query",
            "required": false,
            "description": "Any of these adjustment reason codes, e.g. [\"damaged\", \"lost\"]; absent = every reason. Repeat `reasonCodes` for each value (`?reasonCodes=damaged&reasonCodes=lost`), or pass a JSON array (`?reasonCodes=[\"damaged\",\"lost\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "damaged",
              "lost"
            ],
            "schema": {
              "description": "Any of these adjustment reason codes, e.g. [\"damaged\", \"lost\"]; absent = every reason.",
              "minItems": 1,
              "maxItems": 13,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              }
            }
          },
          {
            "name": "atFromMs",
            "in": "query",
            "required": false,
            "description": "Movements at or after this instant (milliseconds since 1970, UTC).",
            "schema": {
              "description": "Movements at or after this instant (milliseconds since 1970, UTC).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "atToMs",
            "in": "query",
            "required": false,
            "description": "Movements before this instant (milliseconds since 1970, UTC).",
            "schema": {
              "description": "Movements before this instant (milliseconds since 1970, UTC).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
            "schema": {
              "description": "`at:desc` (newest first, the default) or `at:asc` (oldest first).",
              "type": "string",
              "enum": [
                "at:desc",
                "at:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/open-pack": {
      "post": {
        "operationId": "inventory_open_pack",
        "summary": "inventory_open_pack",
        "description": "Open a retail pack for production (contracts 3.3.0): ONE piece of a Shopify item (`packVariantId`, counted in pieces) leaves `fromBinCode` — Shopify on hand −1 at the location, the normal push — and its content (`contentQty`, a whole number in the bulk material's base unit: a 1 kg bag is 1000 g) lands in a local material (`bulkVariantId`) on the same shelf, or the shelf `toBinCode`; never on Shopify. Both legs carry one adjustment number and the reason opened_for_production, in one transaction; the piece's average cost moves into the material's, and each item's timeline names the other (`pack_opened`). `lotNumber` / `expiryDate` are the lot printed on the bag: the piece's lot when the item has it, and the material's lot, which keeps the piece's date. Refusals: `details.code` \"open_pack_not_retail\" / \"open_pack_not_bulk\" / \"open_pack_bin_not_shelf\" / \"lot_blocked\" / \"lot_expired\" / \"lot_unknown\". `idempotencyKey` (one per opening, kept across retries) binds the whole request: a retry answers `replayed: true` and books nothing twice; other facts under it are refused \"idempotency_key_reused\".\n\n**Operation id:** `inventory_open_pack` — the same operation is `app.inventory.open_pack({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_open_pack`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packVariantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "fromBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "bulkVariantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "contentQty": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "lotNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "expiryDate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  }
                },
                "required": [
                  "packVariantId",
                  "fromBinCode",
                  "warehouseId",
                  "bulkVariantId",
                  "contentQty",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/opening-import": {
      "get": {
        "operationId": "inventory_opening_job",
        "summary": "inventory_opening_job",
        "description": "The warehouse's latest opening-stock import, from the job row: status (running/done/failed), rows imported, rows skipped (variants that already had non-opening movements in the warehouse), the continuation cursor, the error and the timestamps — or null when the warehouse never ran one. Warehouse-scoped so a reload finds its job without a jobId; this is what the onboarding card renders.\n\n**Operation id:** `inventory_opening_job` — the same operation is `app.inventory.opening_job({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_opening_job`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "inventory_opening_import",
        "summary": "inventory_opening_import",
        "description": "Start or resume opening stock for a linked warehouse that has not gone live. The Worker fetches fresh Shopify named inventory states into an immutable paged manifest (up to 800 levels per request); repeat while inventory_opening_job says sourceComplete:false. No physical stock is booked until every source page is complete. The durable openingImport run then books pages without the browser. Only explicit on_hand is imported; missing/inconsistent physical, committed or unavailable states are reported with counts and an affected-item sample. Sellable units go to UNASSIGNED-01, unavailable units to non-sellable quarantine, preserving named source states. Opening movements suppress Shopify pushes. Existing counted stock is preserved and per-warehouse/variant replay keys prevent double booking. Observe inventory_opening_job for completion; a completed source-issue report can be retried with a new fresh fetch. Passing jobId manually advances this warehouse's ready booking job; another warehouse's job is not_found. Going live is a separate fresh quantity and ownership verification, never implied by import completion.\n\n**Operation id:** `inventory_opening_import` — the same operation is `app.inventory.opening_import({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_opening_import`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "document id of the warehouse (must be linked).",
                    "format": "floormode-id"
                  },
                  "jobId": {
                    "description": "Advance this warehouse's running import by one page; omit to start.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "restartSource": {
                    "description": "Restart incomplete source pagination; refused after source completion. Booked stock is never reset.",
                    "type": "boolean"
                  },
                  "targetBinId": {
                    "description": "Put every sellable unit into this pick bin of the warehouse instead of UNASSIGNED-01 (honoured when the job is opened).",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/opening-template": {
      "get": {
        "operationId": "inventory_opening_template",
        "summary": "inventory_opening_template",
        "description": "Prefilled opening-stock sheet rows for one linked warehouse, from the Shopify inventory-levels mirror: {variantId, sku, barcode, title, shopifyOnHand} per variant with stock at the linked location (explicit on_hand only). Missing physical source quantities are reported as blockedCount and a bounded blockedItems sample; a download must refuse a partial sheet. With the Assemblified connection on, this door asks Assemblified about the page's items first: a bill it computes is left out, and an item it still has not answered for is left out and named in `unresolvedVariantIds`. Paged by cursor/nextCursor (max 200 rows). Intended for a downloadable CSV with an empty binCode column that feeds inventory_import_stock.\n\n**Operation id:** `inventory_opening_template` — the same operation is `app.inventory.opening_template({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_opening_template`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse (must be linked).",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse (must be linked).",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Keyset cursor from the previous page's `nextCursor`.",
            "schema": {
              "description": "Keyset cursor from the previous page's `nextCursor`.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "kitOwnerAbsentVariantIds",
            "in": "query",
            "required": false,
            "description": "Set by this door itself: the unanswered items whose store Assemblified never ran on, listed as plain; a value given here is ignored. Repeat `kitOwnerAbsentVariantIds` for each id (`?kitOwnerAbsentVariantIds=<id>&kitOwnerAbsentVariantIds=<id>`), or pass a JSON array (`?kitOwnerAbsentVariantIds=[\"<id>\",\"<id>\"]`).",
            "style": "form",
            "explode": true,
            "schema": {
              "description": "Set by this door itself: the unanswered items whose store Assemblified never ran on, listed as plain; a value given here is ignored.",
              "maxItems": 200,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "format": "floormode-id",
                "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/physical-verification": {
      "get": {
        "operationId": "inventory_physicalVerification",
        "summary": "inventory_physicalVerification",
        "description": "Read the latest physical stock verification, complete bin and lot scope, source evidence and recovery status for an inventory pair.\n\n**Operation id:** `inventory_physicalVerification` — the same operation is `app.inventory.physicalVerification({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_physicalVerification`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/physical-verification/begin": {
      "post": {
        "operationId": "inventory_beginPhysicalVerification",
        "summary": "inventory_beginPhysicalVerification",
        "description": "Start a complete physical inventory review. Loads current Shopify source records before the merchant verifies every bin and lot.\n\n**Operation id:** `inventory_beginPhysicalVerification` — the same operation is `app.inventory.beginPhysicalVerification({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_beginPhysicalVerification`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "restart": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "variantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/physical-verification/confirm": {
      "post": {
        "operationId": "inventory_confirmPhysicalVerification",
        "summary": "inventory_confirmPhysicalVerification",
        "description": "Verify all physical bin and lot counts. Explicit named-state preparation compares and corrects damaged or quality-control stock; only quarantine preparation may classify reviewed unmapped bins. Named-state corrections can change Shopify on-hand. A fresh source readback and full count precede the immutable on-hand correction that resumes sync without replacing checkout commitments.\n\n**Operation id:** `inventory_confirmPhysicalVerification` — the same operation is `app.inventory.confirmPhysicalVerification({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_confirmPhysicalVerification`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "verificationId": {
                    "type": "string",
                    "description": "A inventoryPhysicalVerifications id, e.g. \"inventoryPhysicalVerifications_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "counts": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "quantityId": {
                          "type": "string",
                          "description": "A binQuantities id, e.g. \"binQuantities_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "countedQuantity": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "quantityId",
                        "countedQuantity"
                      ]
                    }
                  },
                  "physicallyVerified": {
                    "type": "boolean",
                    "const": true
                  },
                  "prepareQualityControl": {
                    "type": "boolean"
                  },
                  "prepareNamedState": {
                    "type": "string",
                    "enum": [
                      "quality_control",
                      "damaged"
                    ]
                  },
                  "qualityControlBinIds": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  }
                },
                "required": [
                  "verificationId",
                  "counts",
                  "physicallyVerified"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/physical-verification/retry": {
      "post": {
        "operationId": "inventory_retryPhysicalVerification",
        "summary": "inventory_retryPhysicalVerification",
        "description": "Recover an interrupted physical verification using its exact original Shopify request and idempotency key.\n\n**Operation id:** `inventory_retryPhysicalVerification` — the same operation is `app.inventory.retryPhysicalVerification({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_retryPhysicalVerification`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "verificationId": {
                    "type": "string",
                    "description": "A inventoryPhysicalVerifications id, e.g. \"inventoryPhysicalVerifications_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "verificationId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/place": {
      "post": {
        "operationId": "inventory_place_stock",
        "summary": "inventory_place_stock",
        "description": "Moves stock OUT of the unassigned bin into real bins — never sets a count. Every row goes through the stock door; a limit, product rule, mix rule, missing lot or short source refuses the WHOLE batch as one conflict. Free units move first; reserved units of orders not being picked yet move too, their reservations with them, into a bin orders pick from. A cut batch keeps its units. The batch is bound to its idempotencyKey: a retry with other rows is a conflict.\n\n**Operation id:** `inventory_place_stock` — the same operation is `app.inventory.place_stock({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_place_stock`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "document id of the warehouse.",
                    "format": "floormode-id"
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "lotId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                              "format": "floormode-id"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "toBinId": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "qty": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "variantId",
                        "toBinId",
                        "qty"
                      ]
                    }
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "warehouseId",
                  "rows",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/place-suggestions": {
      "get": {
        "operationId": "inventory_place_suggestions",
        "summary": "inventory_place_suggestions",
        "description": "Proposed bins for one page of the unassigned bin, planned under the warehouse's putaway strategy with the room earlier rows of the page were promised. Nothing is booked; inventory_place_stock books exactly the proposals a merchant confirms. `unplacedQty` names units nothing fits; `scanComplete` false means more bins exist than were ranked.\n\n**Operation id:** `inventory_place_suggestions` — the same operation is `app.inventory.place_suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_place_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "seed",
            "in": "query",
            "required": true,
            "description": "The batch key the proposals are ranked by.",
            "schema": {
              "type": "string",
              "maxLength": 80,
              "description": "The batch key the proposals are ranked by."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/reservations": {
      "get": {
        "operationId": "inventory_reservations",
        "summary": "inventory_reservations",
        "description": "Read one page of the reservations of a bin (`binId`) or of an item in every bin (`variantId`), newest first: the allocation lines of current and past orders (max 25 rows; the answer is { rows, capped, cursor } — pass `cursor` back to continue). Each row names its order, its allocation and its state (`status`: released gave the units back, consumed shipped them, `releasedReason` says why), the units it holds (`qty`, picked ones in `pickedQty`), could not reserve (`shortQty`) and gave back (`releasedQty`), when it was reserved (`createdAt`) and when its allocation last changed (`updatedAt`).\n\n**Operation id:** `inventory_reservations` — the same operation is `app.inventory.reservations({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_reservations`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "binId",
            "in": "query",
            "required": false,
            "description": "The bin whose reservations to list.",
            "schema": {
              "description": "The bin whose reservations to list.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "The item whose reservations to list, in every bin.",
            "schema": {
              "description": "The item whose reservations to list, in every bin.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string",
              "maxLength": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/stock-exists": {
      "get": {
        "operationId": "inventory_stock_exists",
        "summary": "inventory_stock_exists",
        "description": "Whether any unit is on hand anywhere in the tenant — one bounded probe over the bin quantities, {exists}. What the opening-stock onboarding card decides from, so it never derives 'no stock yet' from the page of inventory.by_variant it happens to show.\n\n**Operation id:** `inventory_stock_exists` — the same operation is `app.inventory.stock_exists({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_stock_exists`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/stock-journey": {
      "get": {
        "operationId": "inventory_stock_journey",
        "summary": "inventory_stock_journey",
        "description": "One item's stock journey per active warehouse: Shopify's available at the warehouse's location as Shopify last stated it, by a read or a level event, and when (`shopifySays`), whether a read is owed (`shopifyReadOwed`), the sellable number Floormode writes (`weSay`), and the state since when: in step, a difference the nightly check found that Floormode did not cause, a difference in the last read, Floormode's own change still on its way, a refused update, waiting for Shopify's open orders, not managed here, or not read yet. `shopifyAdminUrl` is the item's page in Shopify's admin when the difference is the merchant's to settle.\n\n**Operation id:** `inventory_stock_journey` — the same operation is `app.inventory.stock_journey({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_stock_journey`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "Document id of the variant.",
            "schema": {
              "type": "string",
              "description": "Document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/sync-status": {
      "get": {
        "operationId": "inventory_sync_status",
        "summary": "inventory_sync_status",
        "description": "Bounded per-warehouse inventory delivery and verification status for one variant. Reports stored blocks and pending work; it does not assert current Shopify totals or attribute discrepancies to an actor.\n\n**Operation id:** `inventory_sync_status` — the same operation is `app.inventory.sync_status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_sync_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "Document id of the variant.",
            "schema": {
              "type": "string",
              "description": "Document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/total": {
      "get": {
        "operationId": "inventory_by_variant_total",
        "summary": "inventory_by_variant_total",
        "description": "The number of live items inventory_by_variant lists under the same source, customs and tracking filters (no search): {total, capped}, exact up to 10,000; capped true means more than total match. Counts items, not stock.\n\n**Operation id:** `inventory_by_variant_total` — the same operation is `app.inventory.by_variant_total({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_by_variant_total`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Catalog source; omit for all warehouse items.",
            "schema": {
              "description": "Catalog source; omit for all warehouse items.",
              "type": "string",
              "enum": [
                "shopify",
                "assemblified_virtual_material",
                "assemblified_sub_assembly",
                "logistified_custom_item",
                "floormode_virtual_material"
              ]
            }
          },
          {
            "name": "customs",
            "in": "query",
            "required": false,
            "description": "Shopify items by customs information: `complete` (base HS code and origin), `missing_hs` or `missing_origin`. Omit for every item.",
            "schema": {
              "description": "Shopify items by customs information: `complete` (base HS code and origin), `missing_hs` or `missing_origin`. Omit for every item.",
              "type": "string",
              "enum": [
                "complete",
                "missing_hs",
                "missing_origin"
              ]
            }
          },
          {
            "name": "tracking",
            "in": "query",
            "required": false,
            "description": "Items by what they record: `none`, `lot` or `serial`. Omit for every item.",
            "schema": {
              "description": "Items by what they record: `none`, `lot` or `serial`. Omit for every item.",
              "type": "string",
              "enum": [
                "none",
                "lot",
                "serial"
              ]
            }
          },
          {
            "name": "scanning",
            "in": "query",
            "required": false,
            "description": "Items by how Floor Mode confirms them: `blocked` (no barcode, SKU or alias, not allowed without a scan) or `no_scan`. Omit for every item.",
            "schema": {
              "description": "Items by how Floor Mode confirms them: `blocked` (no barcode, SKU or alias, not allowed without a scan) or `no_scan`. Omit for every item.",
              "type": "string",
              "enum": [
                "blocked",
                "no_scan"
              ]
            }
          },
          {
            "name": "dangerousGoods",
            "in": "query",
            "required": false,
            "description": "Items marked as one of these dangerous-goods classes: `lithium_in_equipment`, `lithium_with_equipment`, `lithium_alone`, `limited_quantity`, `regulated`. Omit for every item. Repeat `dangerousGoods` for each value (`?dangerousGoods=lithium_in_equipment&dangerousGoods=lithium_with_equipment`), or pass a JSON array (`?dangerousGoods=[\"lithium_in_equipment\",\"lithium_with_equipment\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "lithium_in_equipment",
              "lithium_with_equipment"
            ],
            "schema": {
              "description": "Items marked as one of these dangerous-goods classes: `lithium_in_equipment`, `lithium_with_equipment`, `lithium_alone`, `limited_quantity`, `regulated`. Omit for every item.",
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "lithium_in_equipment",
                  "lithium_with_equipment",
                  "lithium_alone",
                  "limited_quantity",
                  "regulated"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/unassigned": {
      "get": {
        "operationId": "inventory_unassigned_contents",
        "summary": "inventory_unassigned_contents",
        "description": "One page of what still lies in the warehouse's unassigned bin (UNASSIGNED-01): item, lot, on hand, free units and `movable` (the free units plus the reserved ones whose orders are not being picked yet), keyset by variant and lot. The placement table's rows.\n\n**Operation id:** `inventory_unassigned_contents` — the same operation is `app.inventory.unassigned_contents({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_unassigned_contents`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/inventory/untracked-ownership/review": {
      "post": {
        "operationId": "inventory_reviewUntrackedOwnership",
        "summary": "inventory_reviewUntrackedOwnership",
        "description": "Confirm the physically reviewed existing local quantity of a Shopify untracked item. Records local-only ownership without changing stock or publishing to Shopify; refuses changed evidence or pending obligations.\n\n**Operation id:** `inventory_reviewUntrackedOwnership` — the same operation is `app.inventory.reviewUntrackedOwnership({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_reviewUntrackedOwnership`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedFingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "confirmedOnHand": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "warehouseId",
                  "variantId",
                  "expectedFingerprint",
                  "confirmedOnHand"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/inventory/variant-bins": {
      "get": {
        "operationId": "inventory_variant_bins",
        "summary": "inventory_variant_bins",
        "description": "Per-bin stock breakdown for one variant (max 200 rows).\n\n**Operation id:** `inventory_variant_bins` — the same operation is `app.inventory.variant_bins({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/inventory_variant_bins`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "inventory"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/jobs": {
      "get": {
        "operationId": "jobs_list",
        "summary": "jobs_list",
        "description": "List merchant-recoverable background updates with safe status messages and the next scheduled run (runAtMs, epoch ms). Internal maintenance jobs and raw failure details are excluded.\n\n**Operation id:** `jobs_list` — the same operation is `app.jobs.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/jobs_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "jobs"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/jobs/retry": {
      "post": {
        "operationId": "jobs_retry",
        "summary": "jobs_retry",
        "description": "Resume one stopped merchant background update using its existing scheduled work. Running updates cannot be retried; an already queued retry returns retried:false.\n\n**Operation id:** `jobs_retry` — the same operation is `app.jobs.retry({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/jobs_retry`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "jobs"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job": {
                    "type": "string",
                    "enum": [
                      "ingestRecovery",
                      "channelObservation",
                      "inventoryMetadata",
                      "allocationReplan",
                      "componentConsumption"
                    ]
                  }
                },
                "required": [
                  "job"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/label-printer-profiles": {
      "get": {
        "operationId": "label_printer_profiles_list",
        "summary": "label_printer_profiles_list",
        "description": "List printer and medium calibration profiles in bounded cursor pages.\n\n**Operation id:** `label_printer_profiles_list` — the same operation is `app.label.printer_profiles_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_printer_profiles_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-printer-profiles"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "label_printer_profiles_save",
        "summary": "label_printer_profiles_save",
        "description": "Create or revise a printer calibration profile independently of label artwork; updates require the current revision.\n\n**Operation id:** `label_printer_profiles_save` — the same operation is `app.label.printer_profiles_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_printer_profiles_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-printer-profiles"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "printerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "mediumName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "calibration": {
                    "type": "object",
                    "properties": {
                      "offsetXmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": -20,
                        "maximum": 20
                      },
                      "offsetYmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": -20,
                        "maximum": 20
                      },
                      "scaleXpercent": {
                        "default": 100,
                        "type": "number",
                        "minimum": 90,
                        "maximum": 110
                      },
                      "scaleYpercent": {
                        "default": 100,
                        "type": "number",
                        "minimum": 90,
                        "maximum": 110
                      }
                    }
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "create"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "update"
                          },
                          "profileId": {
                            "type": "string",
                            "description": "A labelPrinterProfiles id, e.g. \"labelPrinterProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                            "format": "floormode-id"
                          },
                          "expectedRevision": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind",
                          "profileId",
                          "expectedRevision"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "printerName",
                  "mediumName",
                  "calibration",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/label-printer-profiles/delete": {
      "post": {
        "operationId": "label_printer_profiles_delete",
        "summary": "label_printer_profiles_delete",
        "description": "Soft-delete a printer profile at the expected revision.\n\n**Operation id:** `label_printer_profiles_delete` — the same operation is `app.label.printer_profiles_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_printer_profiles_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-printer-profiles"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "description": "A labelPrinterProfiles id, e.g. \"labelPrinterProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "profileId",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/label-printer-profiles/get": {
      "get": {
        "operationId": "label_printer_profiles_get",
        "summary": "label_printer_profiles_get",
        "description": "Read the current printer profile revision, or null if deleted.\n\n**Operation id:** `label_printer_profiles_get` — the same operation is `app.label.printer_profiles_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_printer_profiles_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-printer-profiles"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "profileId",
            "in": "query",
            "required": true,
            "description": "A labelPrinterProfiles id, e.g. \"labelPrinterProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A labelPrinterProfiles id, e.g. \"labelPrinterProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/label-templates": {
      "get": {
        "operationId": "label_templates_list",
        "summary": "label_templates_list",
        "description": "List tenant-shared label designs, newest first. Follow cursor for subsequent bounded pages.\n\n**Operation id:** `label_templates_list` — the same operation is `app.label.templates_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_templates_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-templates"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "label_templates_create",
        "summary": "label_templates_create",
        "description": "Save a tenant-shared reusable label design. Copies and starting slot belong to each print run and are not saved. An image element names an image the label designer stored, by its digest (`image.sha256`); the design never carries its bytes.\n\n**Operation id:** `label_templates_create` — the same operation is `app.label.templates_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_templates_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-templates"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "paper": {
                        "default": "a4",
                        "type": "string",
                        "enum": [
                          "a4",
                          "letter",
                          "thermal"
                        ]
                      },
                      "widthMm": {
                        "default": 57,
                        "type": "number",
                        "minimum": 0.1,
                        "maximum": 300
                      },
                      "heightMm": {
                        "default": 32,
                        "type": "number",
                        "minimum": 0.1,
                        "maximum": 300
                      },
                      "marginXmm": {
                        "default": 19.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginYmm": {
                        "default": 20.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginRightMm": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginBottomMm": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "thermalColumns": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      },
                      "gapXmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 20
                      },
                      "gapYmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 20
                      },
                      "barcodeType": {
                        "default": "auto",
                        "type": "string",
                        "enum": [
                          "auto",
                          "code128",
                          "ean13",
                          "ean8",
                          "upca",
                          "code39",
                          "itf",
                          "upce",
                          "gs1_128",
                          "qrcode",
                          "datamatrix",
                          "pdf417",
                          "gs1_datamatrix"
                        ]
                      },
                      "showTitle": {
                        "default": true,
                        "type": "boolean"
                      },
                      "showSubtitle": {
                        "default": true,
                        "type": "boolean"
                      },
                      "showBarcodeText": {
                        "default": true,
                        "type": "boolean"
                      },
                      "layout": {
                        "type": "object",
                        "properties": {
                          "widthMm": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 300
                          },
                          "heightMm": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 300
                          },
                          "elements": {
                            "minItems": 1,
                            "maxItems": 30,
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "image"
                                    },
                                    "fit": {
                                      "type": "string",
                                      "enum": [
                                        "contain"
                                      ]
                                    },
                                    "image": {
                                      "type": "object",
                                      "properties": {
                                        "sha256": {
                                          "type": "string",
                                          "minLength": 64,
                                          "maxLength": 64,
                                          "pattern": "^[0-9a-f]{64}$"
                                        },
                                        "mime": {
                                          "type": "string",
                                          "enum": [
                                            "image/png",
                                            "image/jpeg"
                                          ]
                                        },
                                        "width": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1024
                                        },
                                        "height": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1024
                                        },
                                        "bytes": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 65536
                                        }
                                      },
                                      "required": [
                                        "sha256",
                                        "mime",
                                        "width",
                                        "height",
                                        "bytes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "fit",
                                    "image"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "shape"
                                    },
                                    "shape": {
                                      "type": "string",
                                      "enum": [
                                        "rectangle",
                                        "ellipse",
                                        "line"
                                      ]
                                    },
                                    "strokeWidthMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 3
                                    },
                                    "stroke": {
                                      "type": "string",
                                      "pattern": "^#[0-9a-fA-F]{6}$"
                                    },
                                    "fill": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^#[0-9a-fA-F]{6}$"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "shape",
                                    "strokeWidthMm",
                                    "stroke",
                                    "fill"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "text"
                                    },
                                    "content": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "field"
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "title",
                                                "subtitle",
                                                "barcode",
                                                "sku",
                                                "productTitle",
                                                "variantTitle",
                                                "price",
                                                "lotNumber",
                                                "expiryDate",
                                                "binCode",
                                                "warehouseName",
                                                "zone"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "field"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "static"
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 1000
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "text"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "fontSizePt": {
                                      "type": "number",
                                      "minimum": 4,
                                      "maximum": 100
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "weight": {
                                      "type": "string",
                                      "enum": [
                                        "normal",
                                        "bold"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "content",
                                    "fontSizePt",
                                    "align",
                                    "weight"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "barcode"
                                    },
                                    "content": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "field"
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "title",
                                                "subtitle",
                                                "barcode",
                                                "sku",
                                                "productTitle",
                                                "variantTitle",
                                                "price",
                                                "lotNumber",
                                                "expiryDate",
                                                "binCode",
                                                "warehouseName",
                                                "zone"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "field"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "static"
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 1000
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "text"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "showValue": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "content",
                                    "showValue"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "widthMm",
                          "heightMm",
                          "elements"
                        ],
                        "additionalProperties": false
                      }
                    }
                  }
                },
                "required": [
                  "name",
                  "options"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/label-templates/delete": {
      "post": {
        "operationId": "label_templates_delete",
        "summary": "label_templates_delete",
        "description": "Soft-delete a saved label design when expectedRevision matches.\n\n**Operation id:** `label_templates_delete` — the same operation is `app.label.templates_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_templates_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-templates"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "description": "A labelTemplates id, e.g. \"labelTemplates_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "templateId",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/label-templates/get": {
      "get": {
        "operationId": "label_templates_get",
        "summary": "label_templates_get",
        "description": "Read a saved label design and its optimistic revision, or null when absent or deleted.\n\n**Operation id:** `label_templates_get` — the same operation is `app.label.templates_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_templates_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-templates"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "templateId",
            "in": "query",
            "required": true,
            "description": "A labelTemplates id, e.g. \"labelTemplates_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A labelTemplates id, e.g. \"labelTemplates_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/label-templates/update": {
      "post": {
        "operationId": "label_templates_update",
        "summary": "label_templates_update",
        "description": "Replace a saved label design when expectedRevision matches. A stale edit returns conflict and preserves the newer design.\n\n**Operation id:** `label_templates_update` — the same operation is `app.label.templates_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_templates_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "label-templates"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "description": "A labelTemplates id, e.g. \"labelTemplates_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "paper": {
                        "default": "a4",
                        "type": "string",
                        "enum": [
                          "a4",
                          "letter",
                          "thermal"
                        ]
                      },
                      "widthMm": {
                        "default": 57,
                        "type": "number",
                        "minimum": 0.1,
                        "maximum": 300
                      },
                      "heightMm": {
                        "default": 32,
                        "type": "number",
                        "minimum": 0.1,
                        "maximum": 300
                      },
                      "marginXmm": {
                        "default": 19.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginYmm": {
                        "default": 20.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginRightMm": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "marginBottomMm": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "thermalColumns": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      },
                      "gapXmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 20
                      },
                      "gapYmm": {
                        "default": 0,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 20
                      },
                      "barcodeType": {
                        "default": "auto",
                        "type": "string",
                        "enum": [
                          "auto",
                          "code128",
                          "ean13",
                          "ean8",
                          "upca",
                          "code39",
                          "itf",
                          "upce",
                          "gs1_128",
                          "qrcode",
                          "datamatrix",
                          "pdf417",
                          "gs1_datamatrix"
                        ]
                      },
                      "showTitle": {
                        "default": true,
                        "type": "boolean"
                      },
                      "showSubtitle": {
                        "default": true,
                        "type": "boolean"
                      },
                      "showBarcodeText": {
                        "default": true,
                        "type": "boolean"
                      },
                      "layout": {
                        "type": "object",
                        "properties": {
                          "widthMm": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 300
                          },
                          "heightMm": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 300
                          },
                          "elements": {
                            "minItems": 1,
                            "maxItems": 30,
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "image"
                                    },
                                    "fit": {
                                      "type": "string",
                                      "enum": [
                                        "contain"
                                      ]
                                    },
                                    "image": {
                                      "type": "object",
                                      "properties": {
                                        "sha256": {
                                          "type": "string",
                                          "minLength": 64,
                                          "maxLength": 64,
                                          "pattern": "^[0-9a-f]{64}$"
                                        },
                                        "mime": {
                                          "type": "string",
                                          "enum": [
                                            "image/png",
                                            "image/jpeg"
                                          ]
                                        },
                                        "width": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1024
                                        },
                                        "height": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 1024
                                        },
                                        "bytes": {
                                          "type": "integer",
                                          "exclusiveMinimum": 0,
                                          "maximum": 65536
                                        }
                                      },
                                      "required": [
                                        "sha256",
                                        "mime",
                                        "width",
                                        "height",
                                        "bytes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "fit",
                                    "image"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "shape"
                                    },
                                    "shape": {
                                      "type": "string",
                                      "enum": [
                                        "rectangle",
                                        "ellipse",
                                        "line"
                                      ]
                                    },
                                    "strokeWidthMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 3
                                    },
                                    "stroke": {
                                      "type": "string",
                                      "pattern": "^#[0-9a-fA-F]{6}$"
                                    },
                                    "fill": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^#[0-9a-fA-F]{6}$"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "shape",
                                    "strokeWidthMm",
                                    "stroke",
                                    "fill"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "text"
                                    },
                                    "content": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "field"
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "title",
                                                "subtitle",
                                                "barcode",
                                                "sku",
                                                "productTitle",
                                                "variantTitle",
                                                "price",
                                                "lotNumber",
                                                "expiryDate",
                                                "binCode",
                                                "warehouseName",
                                                "zone"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "field"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "static"
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 1000
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "text"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "fontSizePt": {
                                      "type": "number",
                                      "minimum": 4,
                                      "maximum": 100
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "weight": {
                                      "type": "string",
                                      "enum": [
                                        "normal",
                                        "bold"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "content",
                                    "fontSizePt",
                                    "align",
                                    "weight"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "xMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "yMm": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 300
                                    },
                                    "widthMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "heightMm": {
                                      "type": "number",
                                      "exclusiveMinimum": 0,
                                      "maximum": 300
                                    },
                                    "rotationDeg": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 359
                                    },
                                    "kind": {
                                      "type": "string",
                                      "const": "barcode"
                                    },
                                    "content": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "field"
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "title",
                                                "subtitle",
                                                "barcode",
                                                "sku",
                                                "productTitle",
                                                "variantTitle",
                                                "price",
                                                "lotNumber",
                                                "expiryDate",
                                                "binCode",
                                                "warehouseName",
                                                "zone"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "field"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "static"
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 1000
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "text"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "showValue": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "xMm",
                                    "yMm",
                                    "widthMm",
                                    "heightMm",
                                    "kind",
                                    "content",
                                    "showValue"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "widthMm",
                          "heightMm",
                          "elements"
                        ],
                        "additionalProperties": false
                      }
                    }
                  }
                },
                "required": [
                  "templateId",
                  "expectedRevision",
                  "name",
                  "options"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/day-plans": {
      "get": {
        "operationId": "day_plans_grid",
        "summary": "day_plans_grid",
        "description": "One warehouse's day plans over 7 or 14 days from `startDay` (from 14 days back to 28 ahead, in the warehouse's time zone): the people who work there (warehouse scope `all`, or a worker profile in the warehouse; with a floor task type their role allows), each with what they may do (task types, zones, home station, pick profile and lock), their plans per day (areas in order: a task type with an optional zone, station or pick profile, and on Elevate a target), the revision and who changed it last, and per area whether it lies outside what the person may do (`task`, `zone`, `locked`, or `removed` when the zone, station or profile is gone). On Elevate the day's team targets too. `shifts` is the shift plan beside it, shown and never edited here: `planned` while the warehouse has a live shift pattern, and per person and day the shift's start and end or `off` (a day off, never its reason); `capped` there when the shift plan's read was cut (some times missing; days off are always whole). New planning is refused on a day off; a plan saved before the day became off stays until it is cleared. A plan never refuses or assigns work: it orders and defaults the person's floor. No performance figures.\n\n**Operation id:** `day_plans_grid` — the same operation is `app.day.plans_grid({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plans_grid`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "startDay",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "enum": [
                7,
                14
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/labour/day-plans/copy": {
      "post": {
        "operationId": "day_plans_copy",
        "summary": "day_plans_copy",
        "description": "Copies days of a warehouse's plans onto other days, one pair per target day (at most 7, each from today to 28 days ahead): every person's plan of `from` onto `to`, only onto empty days unless `replace` (then the target day becomes the source, and an empty source day clears it). Areas travel verbatim, targets included. Answers the counts: copied, kept (a target day that already had a plan), cleared, skipped (a person no longer in the warehouse, a plan naming a place that is gone, or a target day the person is off in the shift plan).\n\n**Operation id:** `day_plans_copy` — the same operation is `app.day.plans_copy({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plans_copy`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "pairs": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "to": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        }
                      },
                      "required": [
                        "from",
                        "to"
                      ]
                    }
                  },
                  "replace": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "pairs",
                  "replace"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/day-plans/distribute": {
      "post": {
        "operationId": "day_plan_targets_distribute",
        "summary": "day_plan_targets_distribute",
        "description": "Divides a target evenly over the people planned for picking or packing that day: the day's team target (`from.kind: team`), or one person's target (`from.kind: person`, which then loses theirs; their area stays). Each share goes onto the recipient's first area of that work, replacing its target; the remainder goes one each to the first people in name order. Recipients default to everyone planned for that work that day; only people who work in the warehouse share. Needs targets on. A day other than today needs shift planning.\n\n**Operation id:** `day_plan_targets_distribute` — the same operation is `app.day.plan_targets_distribute({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plan_targets_distribute`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "taskType": {
                    "type": "string",
                    "enum": [
                      "pick",
                      "pack"
                    ]
                  },
                  "from": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "team"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "person"
                          },
                          "personId": {
                            "type": "string",
                            "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                            "format": "floormode-id"
                          }
                        },
                        "required": [
                          "kind",
                          "personId"
                        ]
                      }
                    ]
                  },
                  "toPersonIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "day",
                  "taskType",
                  "from"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/day-plans/from-profiles": {
      "post": {
        "operationId": "day_plans_from_profiles",
        "summary": "day_plans_from_profiles",
        "description": "Plans every empty day of up to 7 days from `startDay` with each person's usual area from their worker profile: their first floor task type, with the one zone their profile lists (pick, receive, count), their live pick profile (pick) or their home station (pack). Days that already have a plan are kept, days off in the shift plan stay empty. Optionally only the listed people. Answers filled and kept.\n\n**Operation id:** `day_plans_from_profiles` — the same operation is `app.day.plans_from_profiles({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plans_from_profiles`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "startDay": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 7
                  },
                  "personIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "startDay",
                  "days"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/day-plans/set": {
      "post": {
        "operationId": "day_plan_set",
        "summary": "day_plan_set",
        "description": "Sets one person's plan for one warehouse day: up to 4 areas in order (pick, pack, receive, count or move; a zone on pick, receive, count and move, a station on pack, a pick profile on pick — Enhanced, a target on pick (orders) and pack (parcels) while targets are on — Elevate). An empty list clears the day. Pass the revision you read (null when there was no plan); a stale one is refused with revision_mismatch. Refused while day plans are off (day_plans_off), for a warehouse without a time zone (time_zone_required), outside today to 28 days ahead, for a person who does not work in the warehouse or is deactivated (person_deactivated), for a place not live in the warehouse, and new planning on a day the person is off in the shift plan (day_off; an existing plan can still be cleared). Never refused for what the person may do: such an area is kept and flagged in day_plans_grid. A day other than today needs shift planning; today also assign work. `holding` names the pick batches a person moved today still holds (they stay theirs). Writes nothing when the plan is unchanged.\n\n**Operation id:** `day_plan_set` — the same operation is `app.day.plan_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plan_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "areas": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "taskType": {
                          "type": "string",
                          "enum": [
                            "pick",
                            "pack",
                            "receive",
                            "count",
                            "move"
                          ]
                        },
                        "zoneId": {
                          "type": "string",
                          "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "stationId": {
                          "type": "string",
                          "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "pickProfileId": {
                          "type": "string",
                          "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "target": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9999
                        }
                      },
                      "required": [
                        "taskType"
                      ]
                    }
                  },
                  "expectedRevision": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "personId",
                  "day",
                  "areas",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/team-targets/set": {
      "post": {
        "operationId": "team_day_target_set",
        "summary": "team_day_target_set",
        "description": "Sets or clears (null) the team target of one warehouse day for picking (orders: the fulfillment orders of completed customer batches) or packing (parcels). Team figures only, allowed whenever day plans are on, whatever the per-person targets switch; the wallboard shows the team's progress against it. Pass the revision you read (null when the day had none).\n\n**Operation id:** `team_day_target_set` — the same operation is `app.team.day_target_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/team_day_target_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "taskType": {
                    "type": "string",
                    "enum": [
                      "pick",
                      "pack"
                    ]
                  },
                  "target": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedRevision": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "day",
                  "taskType",
                  "target",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/labour/workload": {
      "get": {
        "operationId": "day_plans_workload",
        "summary": "day_plans_workload",
        "description": "The known work of a warehouse's planner days (7 or 14 from `startDay`): per day the orders known to need packing — today's open work (orders ready to pick plus parcels still to pack), a future day's open dated orders whose pack day it is (while delivery dates are on), else the parcels packed on the same weekday last week — and the receipts expected that day; plus the team's typical minutes per order picked and per parcel packed over the last 28 days (null when fewer than two people did the work). Nothing is forecast; `computedAtMs` states the answer's age. No person data.\n\n**Operation id:** `day_plans_workload` — the same operation is `app.day.plans_workload({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/day_plans_workload`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `analytics`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "labour"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "startDay",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "enum": [
                7,
                14
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lanes": {
      "get": {
        "operationId": "lanes_list",
        "summary": "lanes_list",
        "description": "A warehouse's outbound lanes (max 50) with their carrier, services, their carrier's collection times and their live collections (open ones and closed ones waiting for the driver, max 3 a lane): cut-off, parcels loaded, voided parcels to take out and the manifest's state.\n\n**Operation id:** `lanes_list` — the same operation is `app.lanes.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "laneId",
            "in": "query",
            "required": false,
            "description": "A outboundLanes id, e.g. \"outboundLanes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A outboundLanes id, e.g. \"outboundLanes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lanes/archive": {
      "post": {
        "operationId": "lanes_archive",
        "summary": "lanes_archive",
        "description": "Archive a lane. Refused (lane_not_empty) while one of its collections holds parcels.\n\n**Operation id:** `lanes_archive` — the same operation is `app.lanes.archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "laneId": {
                    "type": "string",
                    "description": "A outboundLanes id, e.g. \"outboundLanes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "laneId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/close": {
      "post": {
        "operationId": "lanes_close",
        "summary": "lanes_close",
        "description": "Close a collection: its parcels are frozen and the carrier's manifest is made when the lane says so. `includeLate` takes the lane's next collection's parcels along; `collected` hands it to the driver at once (only when no manifest is owed). Refused take_out_first while voided parcels are still in the lane, unless confirmed.\n\n**Operation id:** `lanes_close` — the same operation is `app.lanes.close({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_close`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collectionId": {
                    "type": "string",
                    "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "includeLate": {
                    "type": "boolean"
                  },
                  "takeOutConfirmed": {
                    "type": "boolean"
                  },
                  "collected": {
                    "type": "object",
                    "properties": {
                      "note": {
                        "type": "string",
                        "maxLength": 120
                      }
                    }
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "collectionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/collected": {
      "post": {
        "operationId": "lanes_mark_collected",
        "summary": "lanes_mark_collected",
        "description": "Record that the driver took a closed collection. Refused manifest_required for a carrier that takes nothing before its manifest; manifest_incomplete asks to confirm a handover without a complete manifest.\n\n**Operation id:** `lanes_mark_collected` — the same operation is `app.lanes.mark_collected({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_mark_collected`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collectionId": {
                    "type": "string",
                    "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "incompleteConfirmed": {
                    "type": "boolean"
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "collectionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/collection": {
      "get": {
        "operationId": "lanes_collection_get",
        "summary": "lanes_collection_get",
        "description": "One collection: its parcels (50 a page), the voided ones to take out and its manifests.\n\n**Operation id:** `lanes_collection_get` — the same operation is `app.lanes.collection_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_collection_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "required": true,
            "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "manifestCursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lanes/collections": {
      "get": {
        "operationId": "lanes_collections_list",
        "summary": "lanes_collections_list",
        "description": "A warehouse's collections of one status, newest first, 50 a page.\n\n**Operation id:** `lanes_collections_list` — the same operation is `app.lanes.collections_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_collections_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "collected"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lanes/load": {
      "post": {
        "operationId": "lanes_load",
        "summary": "lanes_load",
        "description": "Load one parcel into a lane: `code` is its label, packing slip or order name, `laneBinId` the lane scanned. Answers a `verdict`: loaded, already_loaded, moved (to another lane of its carrier), lane_needed (no lane given: `expected` names it), wrong_lane, already_closed, void_pending, voided, carrier_has_it, no_lane, not_found. Two parcels with one number are refused tracking_ambiguous.\n\n**Operation id:** `lanes_load` — the same operation is `app.lanes.load({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_load`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "laneBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "warehouseId",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/manifest-retry": {
      "post": {
        "operationId": "lanes_manifest_retry",
        "summary": "lanes_manifest_retry",
        "description": "Make a collection's manifest again after it failed, was answered in part (once the desk resolved it) or was not answered (the same request is asked again).\n\n**Operation id:** `lanes_manifest_retry` — the same operation is `app.lanes.manifest_retry({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_manifest_retry`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collectionId": {
                    "type": "string",
                    "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "collectionId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/save": {
      "post": {
        "operationId": "lanes_save",
        "summary": "lanes_save",
        "description": "Create a lane (its new dock location `code`) or update one (`laneId`): the carrier account, the services it takes (empty = all), whether it is the carrier's default lane and whether closing makes the carrier's manifest. Its collections follow its carrier's collection times (collection_times_save); with none, one collection is open until closed.\n\n**Operation id:** `lanes_save` — the same operation is `app.lanes.save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "laneId": {
                    "type": "string",
                    "description": "A outboundLanes id, e.g. \"outboundLanes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "carrierAccountId": {
                    "type": "string",
                    "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "services": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    }
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "manifestAtCollection": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "carrierAccountId",
                  "services",
                  "isDefault",
                  "manifestAtCollection"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/strays": {
      "get": {
        "operationId": "lanes_strays",
        "summary": "lanes_strays",
        "description": "Parcels whose label was bought but that are in no lane and the carrier has not scanned, oldest first (50 a page), with `total` counted up to 1,000 a carrier.\n\n**Operation id:** `lanes_strays` — the same operation is `app.lanes.strays({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_strays`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "carrierAccountId",
            "in": "query",
            "required": false,
            "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lanes/take-out": {
      "post": {
        "operationId": "lanes_take_out",
        "summary": "lanes_take_out",
        "description": "Record that a parcel whose label was voided while in a lane was taken out of it.\n\n**Operation id:** `lanes_take_out` — the same operation is `app.lanes.take_out({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_take_out`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "loadId": {
                    "type": "string",
                    "description": "A laneLoads id, e.g. \"laneLoads_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "loadId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lanes/unload": {
      "post": {
        "operationId": "lanes_unload",
        "summary": "lanes_unload",
        "description": "Take a loaded parcel back out of its open collection; refused lane_load_moved when it moved or its collection closed since.\n\n**Operation id:** `lanes_unload` — the same operation is `app.lanes.unload({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lanes_unload`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lanes"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "loadId": {
                    "type": "string",
                    "description": "A laneLoads id, e.g. \"laneLoads_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "collectionId": {
                    "type": "string",
                    "description": "A laneCollections id, e.g. \"laneCollections_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "This request's key: a repeat under it answers as stored and moves nothing.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "loadId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-items": {
      "get": {
        "operationId": "local_items_list",
        "summary": "local_items_list",
        "description": "The LOCAL catalog (M16 W5b-F, contracts 1.4.0): goods Floormode stocks that do not exist on Shopify — Assemblified virtual raw materials (VMAT-), Assemblified sub-assemblies (ASM-), Logistified custom items (CSTM-) and, since contracts 3.3.0, Floormode's own materials (FVMAT-, `peer: \"fulfillified\"`, created with local_items_create). Each row carries the source app, the onboarding state and the units currently held. ⚠️ These items are NOT on Shopify and are never pushed there; any surface that renders them must say so. `state` is the gate every physical flow reads: `catalog_unconfirmed` is a placeholder nothing may happen to yet, `active` is live, `archived` may be drained but not restocked, and `disconnected_frozen` is history left by a handback. RETIRED ROWS: a row that is `archived` and holds NO stock is hidden by default and returned only with `includeRetired: true` (or by asking for `state: \"archived\"` explicitly); `hiddenRetired` says how many this page dropped. A retired row that still HOLDS units is always returned, flagged `retiredWithStock`, and carries `twin` — the canonical row (same source, same published SKU, live) its stock can be swept onto with local_items_move_stock_to_twin. Archiving never detaches stock, so retired-with-stock is a work item and never hidden.\n\n**Operation id:** `local_items_list` — the same operation is `app.local.items_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "peer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "logistified",
                "assemblified",
                "alertified",
                "fulfillified"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "catalog_unconfirmed",
                "active",
                "archived",
                "disconnected_frozen"
              ]
            }
          },
          {
            "name": "includeRetired",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "local_items_create",
        "summary": "local_items_create",
        "description": "Create a material in Floormode itself (contracts 3.3.0): a good no Shopify store sells and no connected app minted — flour by the gram, ribbon by the metre, a carton. Floormode mints its id (`FVMAT-00001`) and is its catalog owner. `unit` (pcs | g | kg | ml | l | mm | cm | m) fixes the BASE unit every quantity of it counts in for its whole life (g, ml, mm or pcs: 2.5 kg is booked as 2500 g); later edits may change only the working unit within that base. `sku` defaults to the id and must be free: another live item with it is refused (`details.code: \"sku_taken\"`). `tracking` lot makes every receipt ask for a lot (with `expiryKind` / `expiryRequired` as variants_set_tracking takes them); `barcodes` are extra scan codes. The material starts at 0 and is never pushed to Shopify; stock arrives through a receipt. SIDE EFFECTS: records `local_item_created`, and queues `floormode_local_catalog_item` to every connected app that reads Floormode materials. `requestKey` (one per submit, kept across retries) answers a retry with the first answer (`replayed: true`) and never creates twice.\n\n**Operation id:** `local_items_create` — the same operation is `app.local.items_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "pcs",
                      "g",
                      "kg",
                      "ml",
                      "l",
                      "mm",
                      "cm",
                      "m"
                    ]
                  },
                  "tracking": {
                    "default": "none",
                    "type": "string",
                    "enum": [
                      "none",
                      "lot"
                    ]
                  },
                  "expiryKind": {
                    "type": "string",
                    "enum": [
                      "best_before",
                      "use_by",
                      "expiry",
                      "none"
                    ]
                  },
                  "expiryRequired": {
                    "type": "boolean"
                  },
                  "barcodes": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  }
                },
                "required": [
                  "title",
                  "unit"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-items/archive": {
      "post": {
        "operationId": "local_items_archive",
        "summary": "local_items_archive",
        "description": "Archive a Floormode material (`archived: true`) or bring it back (`false`). Archiving never detaches stock: what is on the shelf may still be picked, moved and used up, and nothing new is received. SIDE EFFECTS: records `local_item_archived` / `local_item_restored` and republishes the record (status archived / active) to the apps that read it.\n\n**Operation id:** `local_items_archive` — the same operation is `app.local.items_archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "variantId",
                  "archived"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-items/move-stock-to-twin": {
      "post": {
        "operationId": "local_items_move_stock_to_twin",
        "summary": "local_items_move_stock_to_twin",
        "description": "Move a RETIRED local item's remaining stock onto its canonical twin (M16 Run 3d) — the repair for a peer that minted a second id for a good it had already published. SIDE EFFECTS: posts TWO `move` stock movements per occupied bin (out of the retired item, into the SAME bin under the twin) under one `adjustment` reference and `referenceType` local_item_twin_move, resolves any open unplaced claim on the retired row, and mirrors BOTH items to the owning peer. REFUSALS (all coded in `details.localRefusal`): `item_not_retired` — the source row is not archived; `not_a_twin` — the two rows are not the same source with the same published SKU, or the target is not live; `twin_unplaced` — the target still owes an opening quantity, and moving units onto it would have them counted twice; `reserved_units` — the source holds reservations that belong to allocations pointing at it; `nothing_to_move` — the source is empty; `lot_expiry` — a lot number the source holds already exists on the twin with another expiry. Lotted units land under the same lot number and expiry on the twin. More than 100 occupied bin/lot rows answer `complete: false`: the rest, and any open claim, stay on the retired row — call again to continue. ⚠️ This is deliberately a MERCHANT action and never a sweep: a SKU is a label, not an identity, and folding two ledger positions together on a string match would delete inventory to tidy a screen.\n\n**Operation id:** `local_items_move_stock_to_twin` — the same operation is `app.local.items_move_stock_to_twin({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_move_stock_to_twin`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toVariantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "variantId",
                  "toVariantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-items/place-opening": {
      "post": {
        "operationId": "local_items_place_opening",
        "summary": "local_items_place_opening",
        "description": "Place a local item's opening quantity into a bin (M16 W5b-F) — the first-install flow, for goods that are not on Shopify. SIDE EFFECTS: posts an `import` stock movement into the named bin, closes the item's unplaced claim, marks the item onboarded, and sends the owning peer an absolute local_inventory_snapshot mirror. A quantity above zero REQUIRES a destination (binId, or binCode with warehouseId) — a local item's units may never be placed without a location. `qty: 0` is a legitimate answer meaning 'I looked, there are none': it closes the claim and posts no movement, which is how a zero-stock item is activated by hand. An item may be placed ONCE — a second call is refused with localRefusal `item_already_placed`, because a second `import` would leave the shop holding its opening quantity twice; change a placed item's stock with a receipt, a count or an adjustment instead. `lots` places part or all of `qty` under named lots (an existing lot keeps its date; a lot-tracked item may create one), the rest without a lot. When the item came back in lots (`suggestedLots` on local_items_unplaced), every unit beyond `suggestedUnlotted` needs its lot, else the call is refused with code `lot_required`.\n\n**Operation id:** `local_items_place_opening` — the same operation is `app.local.items_place_opening({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_place_opening`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "binId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binCode": {
                    "type": "string",
                    "minLength": 1
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lots": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "lotNumber": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "expiryDate": {
                          "type": "string",
                          "minLength": 1
                        },
                        "qty": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "lotNumber",
                        "qty"
                      ]
                    }
                  }
                },
                "required": [
                  "variantId",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-items/unplaced": {
      "get": {
        "operationId": "local_items_unplaced",
        "summary": "local_items_unplaced",
        "description": "The UNPLACED worklist (M16 W5b-F): local items whose opening quantity has never been placed into a bin. ⚠️ These are CLAIMS, not inventory — they contribute ZERO to bins, ATP, counts, supply outlook and planning, and no physical flow may act on an item while its claim is open (a pick answers the coded refusal `item_unplaced`). `sourceQuantity` is null whenever the source app stated none, which under contracts 1.4.0 is always: no peer→Floormode quantity channel exists, so the merchant counts the shelf. `suggestedLots` names the lots (number, date, quantity) an item came back in when a reconnect reopened its claim, and `suggestedUnlotted` its units that had no lot. Clear a row with local_items_place_opening.\n\n**Operation id:** `local_items_unplaced` — the same operation is `app.local.items_unplaced({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_unplaced`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/local-items/update": {
      "post": {
        "operationId": "local_items_update",
        "summary": "local_items_update",
        "description": "Rename a Floormode material, change its SKU, or change its working unit WITHIN its base (kg ↔ g, l ↔ ml, m ↔ cm ↔ mm). A unit of another base is refused (`details.code: \"base_unit_fixed\"`): its ledger counts in the old base. A SKU another live item uses is refused (`\"sku_taken\"`); an item a connected app minted is refused (`\"not_a_floormode_material\"`: edit it in that app). SIDE EFFECTS: records `local_item_updated` and republishes the record to the apps that read it. An edit that changes nothing writes nothing.\n\n**Operation id:** `local_items_update` — the same operation is `app.local.items_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_items_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-items"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "pcs",
                      "g",
                      "kg",
                      "ml",
                      "l",
                      "mm",
                      "cm",
                      "m"
                    ]
                  }
                },
                "required": [
                  "variantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-stock/disconnect": {
      "post": {
        "operationId": "local_stock_begin_disconnect",
        "summary": "local_stock_begin_disconnect",
        "description": "Begin handing a peer's local stock back (M16 W5b-F) — phase one of a two-phase disconnect. ⚠️ SIDE EFFECTS, and they are not reversible by a second call: the peer's open component pick batches are CANCELLED first (picked units go back to their bins), the peer's local stock is FROZEN (no receipts, picks, counts or adjustments), an absolute cutover snapshot is derived from the ledger and queued to the peer, and the connection stays in `disconnecting` until the peer acknowledges the exact digest. A failed or absent acknowledgement leaves it there, which is the safe state — nobody is writing twice. Only after the acknowledgement do Floormode's rows become frozen history, which is what lets a reconnect place the DIFFERENCE rather than both totals.\n\n**Operation id:** `local_stock_begin_disconnect` — the same operation is `app.local.stock_begin_disconnect({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_stock_begin_disconnect`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-stock"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "peer": {
                    "type": "string",
                    "enum": [
                      "logistified",
                      "assemblified",
                      "alertified"
                    ]
                  }
                },
                "required": [
                  "peer"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/local-stock/status": {
      "get": {
        "operationId": "local_stock_status",
        "summary": "local_stock_status",
        "description": "Local-stock ownership state per peer (M16 W5b-F): the lifecycle phase (`inactive`, `active`, `disconnecting`, `released`), how many local items are held, how many are still unconfirmed placeholders, how many are frozen history, and the in-flight disconnect handback with its digest and acknowledgement. Plus the shop-wide count of unplaced claims. Read-only; this is what the Settings → Apps & API panel shows.\n\n**Operation id:** `local_stock_status` — the same operation is `app.local.stock_status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/local_stock_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "local-stock"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/location-types": {
      "get": {
        "operationId": "location_types_list",
        "summary": "location_types_list",
        "description": "List the tenant's location types (bin, pallet, floor, staging, dock, hospital, work_area, transfer) with their storable flag, pickable/sellable defaults, capacity mode and default packing efficiency. Before the first use the standard set is returned.\n\n**Operation id:** `location_types_list` — the same operation is `app.location.types_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/location_types_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "location-types"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "location_types_upsert",
        "summary": "location_types_upsert",
        "description": "Update one location type by key (seeding the standard set on first use). Only the fields you pass change; defaultPackingEfficiency must be a fraction in (0, 1].\n\n**Operation id:** `location_types_upsert` — the same operation is `app.location.types_upsert({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/location_types_upsert`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "location-types"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "bin",
                      "pallet",
                      "floor",
                      "staging",
                      "dock",
                      "hospital",
                      "work_area",
                      "transfer"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "storable": {
                    "type": "boolean"
                  },
                  "pickableDefault": {
                    "type": "boolean"
                  },
                  "sellableDefault": {
                    "type": "boolean"
                  },
                  "capacityMode": {
                    "type": "string",
                    "enum": [
                      "units",
                      "weight",
                      "cube",
                      "pallets",
                      "footprint",
                      "none"
                    ]
                  },
                  "defaultPackingEfficiency": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations": {
      "post": {
        "operationId": "locations_create",
        "summary": "locations_create",
        "description": "Create a location node in the tree. Optionally nest it under parentId (same warehouse), set its nodeKind (zone/aisle/bay/level/leaf), locationTypeId and mix rules. depth and the materialized path are computed from the parent chain; the code is uppercased and must be unique in the warehouse. Optional canvas placement is committed atomically with the location; it does not set travel coordinates or stock.\n\n**Operation id:** `locations_create` — the same operation is `app.locations.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "canvas": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "number",
                        "minimum": 0
                      },
                      "y": {
                        "type": "number",
                        "minimum": 0
                      },
                      "w": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "h": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "x",
                      "y",
                      "w",
                      "h"
                    ]
                  },
                  "storeyId": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "parentId": {
                    "description": "document id of the parent node.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "nodeKind": {
                    "type": "string",
                    "enum": [
                      "zone",
                      "aisle",
                      "bay",
                      "level",
                      "leaf"
                    ]
                  },
                  "locationTypeId": {
                    "description": "document id of a location type.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "binType": {
                    "description": "Underlying bin type; defaults to pick.",
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "barcode": {
                    "type": "string"
                  },
                  "pickable": {
                    "type": "boolean"
                  },
                  "sellable": {
                    "type": "boolean"
                  },
                  "shopifyInventoryState": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "available",
                          "damaged",
                          "reserved",
                          "quality_control",
                          "safety_stock"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "singleSkuOnly": {
                    "type": "boolean"
                  },
                  "singleLotOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/apply-template": {
      "post": {
        "operationId": "locations_apply_template",
        "summary": "locations_apply_template",
        "description": "Instantiate an app-provided layout template (flat, shelving, pallet_racking, bulk_floor, threePL_full) into a warehouse using the grid generator. `params` may override per-axis counts (by token), the formula, the leaf location type key, the zone and mix rules, and nest the result under params.parentId. Templates are combinable — applying one to a warehouse that already has a subtree just adds nodes (existing codes are skipped). At most 2000 nodes a call: a bigger template is its pattern through locations_generate_start.\n\n**Operation id:** `locations_apply_template` — the same operation is `app.locations.apply_template({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_apply_template`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "templateKey": {
                    "type": "string",
                    "enum": [
                      "flat",
                      "shelving",
                      "pallet_racking",
                      "bulk_floor",
                      "threePL_full"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "parentId": {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      "formula": {
                        "type": "string"
                      },
                      "counts": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50000
                        }
                      },
                      "intermediateNodes": {
                        "type": "boolean"
                      },
                      "zone": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "leafLocationTypeKey": {
                        "type": "string",
                        "enum": [
                          "bin",
                          "pallet",
                          "floor",
                          "staging",
                          "dock",
                          "hospital",
                          "work_area",
                          "transfer"
                        ]
                      },
                      "binType": {
                        "type": "string",
                        "enum": [
                          "receiving",
                          "qc",
                          "quarantine",
                          "bulk",
                          "pick",
                          "packing",
                          "staging",
                          "returns",
                          "unassigned"
                        ]
                      },
                      "singleSkuOnly": {
                        "type": "boolean"
                      },
                      "singleLotOnly": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "templateKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/capacity": {
      "get": {
        "operationId": "locations_capacity",
        "summary": "locations_capacity",
        "description": "Capacity and current fill of one location (M9 T3, WHT-005). A leaf reports its own fill; an interior node reports the bounded roll-up of its subtree leaves. `fillRate` (0..1+, MAX across the units/weight/cube constraints present) and `level` (empty/low/normal/high/full/unbounded) drive fill badges and the map; both are null/unbounded when the location declares no capacity — exactly today's flat bin.\n\n**Operation id:** `locations_capacity` — the same operation is `app.locations.capacity({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_capacity`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "locationId",
            "in": "query",
            "required": true,
            "description": "document id of the location (bin) node.",
            "schema": {
              "type": "string",
              "description": "document id of the location (bin) node.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/capacity-summary": {
      "get": {
        "operationId": "locations_capacity_summary",
        "summary": "locations_capacity_summary",
        "description": "Capacity fill for every direct child of one tree level in one read — the layout editor's heatmap source. Pass parentId for a node's children or warehouseId for the roots.\n\n**Operation id:** `locations_capacity_summary` — the same operation is `app.locations.capacity_summary({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_capacity_summary`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "description": "Direct children of this node.",
            "schema": {
              "description": "Direct children of this node.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Roots of this warehouse.",
            "schema": {
              "description": "Roots of this warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/capacity/bulk": {
      "post": {
        "operationId": "locations_capacity_bulk",
        "summary": "locations_capacity_bulk",
        "description": "The capacity report of up to 200 locations in one read — the same shape `locations_capacity` answers per node, keyed by id. Unknown ids are skipped.\n\n**Operation id:** `locations_capacity_bulk` — the same operation is `app.locations.capacity_bulk({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_capacity_bulk`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "document ids of the locations."
                  }
                },
                "required": [
                  "locationIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/generate-grid": {
      "post": {
        "operationId": "locations_generate_grid",
        "summary": "locations_generate_grid",
        "description": "Bulk-generate a location subtree from a grid spec (Ongoing-style). `spec` = ordered axes (each with a token, count, optional start/style/pad/nodeKind) plus a naming formula that references every axis token once in order, e.g. \"A-{bay}-{level}-{pos}\". With intermediateNodes it also creates the interior zone/aisle/bay/level nodes; otherwise it creates flat leaves under parentId. Idempotent — existing codes are skipped (reported as `skipped`), the rest created in one bounded transaction (cap 2000 nodes; a bigger pattern is locations_generate_start's background job, up to 50,000). Interior nodes are non-pickable/non-sellable. New locations join the end of their parent's walk.\n\n**Operation id:** `locations_generate_grid` — the same operation is `app.locations.generate_grid({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_generate_grid`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "parentId": {
                    "description": "document id of the parent node the grid hangs under.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "spec": {
                    "type": "object",
                    "properties": {
                      "formula": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Leaf naming formula, e.g. \"A-{bay}-{level}-{pos}\"."
                      },
                      "axes": {
                        "minItems": 1,
                        "maxItems": 6,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "token": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Formula token this axis fills."
                            },
                            "count": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50000
                            },
                            "start": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "style": {
                              "type": "string",
                              "enum": [
                                "number",
                                "alpha"
                              ]
                            },
                            "pad": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 8
                            },
                            "nodeKind": {
                              "type": "string",
                              "enum": [
                                "zone",
                                "aisle",
                                "bay",
                                "level",
                                "leaf"
                              ]
                            }
                          },
                          "required": [
                            "token",
                            "count"
                          ]
                        }
                      },
                      "intermediateNodes": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "formula",
                      "axes"
                    ]
                  },
                  "leafLocationTypeId": {
                    "description": "document id of the leaf location type.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "leafLocationTypeKey": {
                    "type": "string",
                    "enum": [
                      "bin",
                      "pallet",
                      "floor",
                      "staging",
                      "dock",
                      "hospital",
                      "work_area",
                      "transfer"
                    ]
                  },
                  "binType": {
                    "description": "Underlying bin type for the leaves; defaults to pick.",
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "singleSkuOnly": {
                    "type": "boolean"
                  },
                  "singleLotOnly": {
                    "type": "boolean"
                  },
                  "capacity": {
                    "description": "Default capacity columns seeded onto every generated leaf (WHT-005).",
                    "type": "object",
                    "properties": {
                      "maxUnits": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxWeightG": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxLengthMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxWidthMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxHeightMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxPallets": {
                        "type": "number",
                        "minimum": 0
                      },
                      "packingEfficiency": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "spec"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/generate-start": {
      "post": {
        "operationId": "locations_generate_start",
        "summary": "locations_generate_start",
        "description": "Add a pattern too big for one locations_generate_grid call as ONE background job (B9): up to 50,000 locations, applied in transactions of up to 500 rows with the floor let in between, existing codes skipped. Bound to `requestKey`. Answers the job; follow it with sheet_imports_get and print its labels from sheet_imports_created.\n\n**Operation id:** `locations_generate_start` — the same operation is `app.locations.generate_start({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_generate_start`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "parentId": {
                    "description": "The group the pattern hangs under; absent: the warehouse's top level.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "spec": {
                    "type": "object",
                    "properties": {
                      "formula": {
                        "type": "string",
                        "minLength": 1
                      },
                      "axes": {
                        "minItems": 1,
                        "maxItems": 6,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "token": {
                              "type": "string",
                              "minLength": 1
                            },
                            "count": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50000
                            },
                            "start": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "style": {
                              "type": "string",
                              "enum": [
                                "number",
                                "alpha"
                              ]
                            },
                            "pad": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 8
                            },
                            "nodeKind": {
                              "type": "string",
                              "enum": [
                                "zone",
                                "aisle",
                                "bay",
                                "level",
                                "leaf"
                              ]
                            }
                          },
                          "required": [
                            "token",
                            "count"
                          ]
                        }
                      },
                      "intermediateNodes": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "formula",
                      "axes"
                    ]
                  },
                  "leafLocationTypeKey": {
                    "type": "string",
                    "enum": [
                      "bin",
                      "pallet",
                      "floor",
                      "staging",
                      "dock",
                      "hospital",
                      "work_area",
                      "transfer"
                    ]
                  },
                  "binType": {
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "singleSkuOnly": {
                    "type": "boolean"
                  },
                  "singleLotOnly": {
                    "type": "boolean"
                  },
                  "capacity": {
                    "type": "object",
                    "properties": {
                      "maxUnits": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxWeightG": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxLengthMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxWidthMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxHeightMm": {
                        "type": "number",
                        "minimum": 0
                      },
                      "maxPallets": {
                        "type": "number",
                        "minimum": 0
                      },
                      "packingEfficiency": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                },
                "required": [
                  "requestKey",
                  "warehouseId",
                  "spec"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/get": {
      "get": {
        "operationId": "locations_get",
        "summary": "locations_get",
        "description": "Get one location node with its parent, its direct children and the child count.\n\n**Operation id:** `locations_get` — the same operation is `app.locations.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "locationId",
            "in": "query",
            "required": true,
            "description": "document id of the location (bin) node.",
            "schema": {
              "type": "string",
              "description": "document id of the location (bin) node.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/import": {
      "post": {
        "operationId": "locations_import",
        "summary": "locations_import",
        "description": "Add up to 500 locations from a list in one call (B9). Each row names its code, optionally the group it sits `inside` (a code of the warehouse or an earlier row), its `kind` (zone, aisle, bay = a rack, level = a shelf, bin; absent: a row others sit inside is a group named by its place, the rest bins), purpose, location type, barcode and walk place. Parents are created first; the list's order (or `walk`) is the walk inside each parent, after the parent's existing locations. Existing codes are skipped, refused rows named with their reason (code_invalid, code_reserved, code_twice, inside_missing, inside_is_bin, inside_taken, label_taken). Bound to `requestKey`: the same list resent answers its first answer. A longer list: send it in calls of 500 rows in its order, parents before the rows inside them, each call its own `requestKey` — the same locations as the app's background import (`locations_import_check` checks a call's rows first).\n\n**Operation id:** `locations_import` — the same operation is `app.locations.import({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_import`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "maxLength": 200,
                          "description": "The location's code (upper case is kept)."
                        },
                        "inside": {
                          "description": "The code of the group it sits inside: a location of the warehouse or an earlier row.",
                          "type": "string",
                          "maxLength": 200
                        },
                        "kind": {
                          "description": "zone, aisle, bay (a rack), level (a shelf) or bin; absent: by its place in the list.",
                          "type": "string",
                          "enum": [
                            "zone",
                            "aisle",
                            "bay",
                            "level",
                            "bin"
                          ]
                        },
                        "purpose": {
                          "description": "The bin's purpose; absent: the run's.",
                          "type": "string",
                          "enum": [
                            "receiving",
                            "qc",
                            "quarantine",
                            "bulk",
                            "pick",
                            "packing",
                            "staging",
                            "returns",
                            "unassigned"
                          ]
                        },
                        "locationType": {
                          "description": "The bin's location type; absent: the run's.",
                          "type": "string",
                          "enum": [
                            "bin",
                            "pallet",
                            "floor",
                            "staging",
                            "dock",
                            "hospital",
                            "work_area",
                            "transfer"
                          ]
                        },
                        "barcode": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "walk": {
                          "description": "Its place in the walk inside its group (lower first); absent: the list's order.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "parentId": {
                    "description": "The group every top-level row sits inside; absent: the warehouse's top level.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "binType": {
                    "description": "The bins' purpose unless a row names its own (default \"pick\").",
                    "type": "string",
                    "enum": [
                      "receiving",
                      "qc",
                      "quarantine",
                      "bulk",
                      "pick",
                      "packing",
                      "staging",
                      "returns",
                      "unassigned"
                    ]
                  },
                  "leafLocationTypeKey": {
                    "description": "The bins' location type unless a row names its own.",
                    "type": "string",
                    "enum": [
                      "bin",
                      "pallet",
                      "floor",
                      "staging",
                      "dock",
                      "hospital",
                      "work_area",
                      "transfer"
                    ]
                  },
                  "zone": {
                    "description": "Zone code for every new location.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "requestKey",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/import-check": {
      "post": {
        "operationId": "locations_import_check",
        "summary": "locations_import_check",
        "description": "A planned list's outcome with nothing written (B9's preflight): up to 500 planned rows (the plan of locations_import's rows: parents first, numbered as in the list), each new, existing or refused with its reason.\n\n**Operation id:** `locations_import_check` — the same operation is `app.locations.import_check({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_import_check`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "parentId": {
                    "description": "The group every top-level row sits inside; absent: the warehouse's top level.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "row": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50000
                        },
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "inside": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "insideInList": {
                          "type": "boolean"
                        },
                        "kind": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "zone",
                                "aisle",
                                "bay",
                                "level",
                                "bin"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group": {
                          "type": "boolean"
                        },
                        "height": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 64
                        },
                        "purpose": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "receiving",
                                "qc",
                                "quarantine",
                                "bulk",
                                "pick",
                                "packing",
                                "staging",
                                "returns",
                                "unassigned"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "locationType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "bin",
                                "pallet",
                                "floor",
                                "staging",
                                "dock",
                                "hospital",
                                "work_area",
                                "transfer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "barcode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 200
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "row",
                        "code",
                        "inside",
                        "insideInList",
                        "kind",
                        "group",
                        "height",
                        "purpose",
                        "locationType",
                        "barcode"
                      ]
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/move": {
      "post": {
        "operationId": "locations_move",
        "summary": "locations_move",
        "description": "Reparent a location node (newParentId null makes it top-level). Recomputes depth and the materialized path for the whole moved subtree in one bounded transaction; moving a node under its own descendant is rejected (cycle guard).\n\n**Operation id:** `locations_move` — the same operation is `app.locations.move({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_move`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "newParentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "document id of the new parent, or null."
                  }
                },
                "required": [
                  "locationId",
                  "newParentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/recompute-serpentine": {
      "post": {
        "operationId": "locations_recompute_serpentine",
        "summary": "locations_recompute_serpentine",
        "description": "Recompute the composite serpentine pick walk (WHT-008) of a warehouse's pickable stock-holding leaves, or of one zone or aisle (`parentId`). Each parent's leaves are re-ordered by their structured position (zone → aisle → serpentine side → bay) so a route snakes (S-shape) instead of sorting alphabetically, by their codes alone (never their map points, B9), trading their own route keys: every other location keeps its place. Idempotent; a leaf that keeps a child is left out (`skippedLeaves`). At most 2,000 leaves a call (`serpentine_too_large`: snake one zone or aisle at a time; locations_snake_check says where it moves anything). Returns the leaf count and how many changed.\n\n**Operation id:** `locations_recompute_serpentine` — the same operation is `app.locations.recompute_serpentine({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_recompute_serpentine`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "parentId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/reorder": {
      "post": {
        "operationId": "locations_reorder",
        "summary": "locations_reorder",
        "description": "Place a location in a level and position: reparent it (newParentId null = top level) and land it before `beforeId`, or last in that level, at any layout size: the pick route follows the tree in one bounded change. Refused `route_spot_full` only where the walk is packed solid, and `route_place_fixed` for a system or flow-owned location.\n\n**Operation id:** `locations_reorder` — the same operation is `app.locations.reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "newParentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "document id of the level's container, or null."
                  },
                  "beforeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "sibling it lands before, or null for last."
                  }
                },
                "required": [
                  "locationId",
                  "newParentId",
                  "beforeId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/search": {
      "get": {
        "operationId": "locations_search",
        "summary": "locations_search",
        "description": "Search all warehouse levels by code prefix. Each result includes its full location path; cursor continues after the last result.\n\n**Operation id:** `locations_search` — the same operation is `app.locations.search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/set-geometry": {
      "post": {
        "operationId": "locations_set_geometry",
        "summary": "locations_set_geometry",
        "description": "Persist a location's 2D map geometry (M9 T4, WHT-007). `canvas` sets the rectangle drawn on the map (x/y top-left, w/h size, rotation, color); `coords` sets the logical travel coordinates x/y/z (X/Y horizontal, Z the vertical rack level, consumed by M10 routing). Every field is independently optional — null clears a column, omitting it leaves it. The map is a purely additive visual layer, so this never affects allocation or picking.\n\n**Operation id:** `locations_set_geometry` — the same operation is `app.locations.set_geometry({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_set_geometry`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "document id of the location (bin) node.",
                    "format": "floormode-id"
                  },
                  "canvas": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "y": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "w": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "h": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rotation": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "color": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "coords": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "y": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "z": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "locationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/set-geometry-bulk": {
      "post": {
        "operationId": "locations_set_geometry_bulk",
        "summary": "locations_set_geometry_bulk",
        "description": "Persist canvas geometry for up to 300 locations in one call (layout editor batch save): one transaction, one invalidation. Fails closed — an unknown location id writes nothing. Requires each location’s complete expectedCanvas snapshot; stale geometry refuses the entire batch.\n\n**Operation id:** `locations_set_geometry_bulk` — the same operation is `app.locations.set_geometry_bulk({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_set_geometry_bulk`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "minItems": 1,
                    "maxItems": 300,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "locationId": {
                          "type": "string",
                          "description": "document id of the location (bin) node.",
                          "format": "floormode-id"
                        },
                        "expectedCanvas": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "y": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "w": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "h": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "rotation": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "color": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y",
                            "w",
                            "h",
                            "rotation",
                            "color"
                          ]
                        },
                        "canvas": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "y": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "w": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "h": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "rotation": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "color": {
                              "description": "null or blank clears the override.",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        }
                      },
                      "required": [
                        "locationId",
                        "expectedCanvas",
                        "canvas"
                      ]
                    }
                  }
                },
                "required": [
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/snake-check": {
      "get": {
        "operationId": "locations_snake_check",
        "summary": "locations_snake_check",
        "description": "Whether Snake the walk (locations_recompute_serpentine) can change anything in a warehouse: true when some group holds pickable bins directly whose codes name different bays; false on an aisle → rack → shelf → bin layout (a shelf's bins share their bay); null past 2,000 bins read (not known — the run then answers how many moved).\n\n**Operation id:** `locations_snake_check` — the same operation is `app.locations.snake_check({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_snake_check`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/tree": {
      "get": {
        "operationId": "locations_tree",
        "summary": "locations_tree",
        "description": "Read a bounded slice of the hierarchical location tree. Pass pathPrefix WITH warehouseId for a whole subtree (the node at that path and its descendants; paths are unique per warehouse), parentId for the direct children of a node, or warehouseId alone for the top-level nodes. `capped` flags a truncated result. With children, the top level and its groups' first pages arrive in one read.\n\n**Operation id:** `locations_tree` — the same operation is `app.locations.tree({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_tree`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeyId",
            "in": "query",
            "required": false,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,64}$",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "description": "document id of the parent node.",
            "schema": {
              "description": "document id of the parent node.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "pathPrefix",
            "in": "query",
            "required": false,
            "description": "Materialized path of the subtree root, e.g. \"A/A-01\" (needs warehouseId).",
            "schema": {
              "description": "Materialized path of the subtree root, e.g. \"A/A-01\" (needs warehouseId).",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "children",
            "in": "query",
            "required": false,
            "description": "Also answer each group row's first page of children (up to 100 rows, at most the limit), while the page holds at most 8 groups; children is null past that. Not with pathPrefix. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also answer each group row's first page of children (up to 100 rows, at most the limit), while the page holds at most 8 groups; children is null past that. Not with pathPrefix.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/update": {
      "post": {
        "operationId": "locations_update",
        "summary": "locations_update",
        "description": "Update the type attributes of a location node: locationTypeId (null clears), the mix rules singleSkuOnly/singleLotOnly (null clears), zone, the pickable/sellable flags and the volumetric capacity columns (maxUnits, maxWeightG, maxLengthMm/WidthMm/HeightMm, maxPallets, packingEfficiency — null clears a column, packingEfficiency is a fraction in (0,1]). nodeKind is derived by the tree writer (a node with children is never a leaf) and cannot be set here. Use locations_move to reparent and bins_update for the code.\n\n**Operation id:** `locations_update` — the same operation is `app.locations.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "locationTypeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "singleSkuOnly": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dedicatedProductId": {
                    "description": "\"Only this product\": placements of other products refuse; null clears.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "singleLotOnly": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "zone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pickable": {
                    "type": "boolean"
                  },
                  "sellable": {
                    "type": "boolean"
                  },
                  "shopifyInventoryState": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "available",
                          "damaged",
                          "reserved",
                          "quality_control",
                          "safety_stock"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxUnits": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxWeightG": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxLengthMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxWidthMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxHeightMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxVolumeCm3": {
                    "description": "Explicit usable volume in cm³; wins over L×W×H, no packing factor.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxPallets": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "packingEfficiency": {
                    "anyOf": [
                      {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "locationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/walk-points": {
      "get": {
        "operationId": "locations_walk_points_get",
        "summary": "locations_walk_points_get",
        "description": "The map's walk points of a warehouse: bins per status (proposed, choose_side, unreachable, accepted, moved), the pick bins counted (to 5,000), the warehouse's walk choice (routePolicy), the background runs, and a page of racks (by status); an accepted rack whose map changed since says checkAgain (its points still route until proposed again).\n\n**Operation id:** `locations_walk_points_get` — the same operation is `app.locations.walk_points_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_walk_points_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "choose_side",
                "unreachable",
                "accepted",
                "moved",
                "retired"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/locations/walk-points/accept": {
      "post": {
        "operationId": "locations_walk_points_accept",
        "summary": "locations_walk_points_accept",
        "description": "Accept walk points: the ready racks (`all_ready`) or the listed ones get their bins' points, each rack under a fresh generation. A rack whose map changed since its proposal is answered `stale`. Up to 500 bins in the call; past it all_ready goes on in the background (`running`) and a list answers `more`.\n\n**Operation id:** `locations_walk_points_accept` — the same operation is `app.locations.walk_points_accept({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_walk_points_accept`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "all_ready"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "racks": {
                            "minItems": 1,
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                            }
                          }
                        },
                        "required": [
                          "racks"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "scope"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/walk-points/choose": {
      "post": {
        "operationId": "locations_walk_points_choose",
        "summary": "locations_walk_points_choose",
        "description": "Choose the side of two-sided racks in one call: the listed racks, an aisle's (`aisleId`), or every rack waiting. `side` a (left, or top of a wide rack), b, or alternate (a and b by walk order).\n\n**Operation id:** `locations_walk_points_choose` — the same operation is `app.locations.walk_points_choose({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_walk_points_choose`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "racks": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                    }
                  },
                  "aisleId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "a",
                      "b",
                      "alternate"
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "side"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/locations/walk-points/propose": {
      "post": {
        "operationId": "locations_walk_points_propose",
        "summary": "locations_walk_points_propose",
        "description": "Propose walk points from the drawn 2D map (B9): every rack (a drawn location with no drawn location inside it, holding pickable bins) gets its proposal — one walkable side (proposed), both (choose_side) or none (unreachable). The call proposes up to 100 racks, the rest in the background. Writes no coordinate.\n\n**Operation id:** `locations_walk_points_propose` — the same operation is `app.locations.walk_points_propose({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/locations_walk_points_propose`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "locations"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lots": {
      "get": {
        "operationId": "lots_list",
        "summary": "lots_list",
        "description": "List lots by lot number, 50 a page (the answer is { rows, capped, cursor } — pass `cursor` back to continue). `search` is the start of a lot number (any case), `variantId` one item's lots, `sort` lot:asc or lot:desc. Each row: the lot number, its date (expiryDate, an ISO day or null) and status, the item (sku, title, what the date means) and the units on hand across every bin.\n\n**Operation id:** `lots_list` — the same operation is `app.lots.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "The start of a lot number, any case (lot numbers are stored upper case).",
            "schema": {
              "description": "The start of a lot number, any case (lot numbers are stored upper case).",
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "Only this item's lots.",
            "schema": {
              "description": "Only this item's lots.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`lot:asc` (the default) or `lot:desc`: by lot number.",
            "schema": {
              "description": "`lot:asc` (the default) or `lot:desc`: by lot number.",
              "type": "string",
              "enum": [
                "lot:asc",
                "lot:desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/archived-inbound": {
      "get": {
        "operationId": "history_lot_inbound",
        "summary": "history_lot_inbound",
        "description": "A lot's receipts and returns that left Floormode for the history archive two years after their day (the lot's inbound book): newest first, up to 200 a page, each with its instant, units, warehouse and document — for a receipt its purchase order's number and supplier. beforeMs is where lots_get's received and returned rows begin; a row on both sides is the same movement.\n\n**Operation id:** `history_lot_inbound` — the same operation is `app.history.lot_inbound({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_lot_inbound`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots (reports)"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/archived-trace": {
      "get": {
        "operationId": "history_lot_ships",
        "summary": "history_lot_ships",
        "description": "A lot's shipments that left Floormode for the history archive (the lot book): newest first, up to 200 a page, each with its instant, units, warehouse, document and order (Shopify id and name; null once deleted). beforeMs is where lots_trace's own pages begin; the two never overlap.\n\n**Operation id:** `history_lot_ships` — the same operation is `app.history.lot_ships({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_lot_ships`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots (reports)"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/block": {
      "post": {
        "operationId": "lots_block",
        "summary": "lots_block",
        "description": "Block a lot: from now nothing of it is allocated, picked or sold. Its reservations are re-planned onto another lot of the item, or the order goes short; warehouses whose Shopify number Floormode sets from its stock (legacy) re-push their availability; a local item's levels are re-mirrored to its owner. A live warehouse (causal pairs) moves the lot's free units on sellable shelves from Shopify's available to quality_control at once, and every unit the re-plan frees after them; an order left short keeps its Shopify commitment, so Shopify's available goes below zero for it. Quarantine (lots_quarantine) then only clears the shelves: Shopify's numbers stay as they are. Units already on the floor are refused at pick (lot_blocked: report the line short); a parcel holding them is declined at packing_fulfill until packing_release_blocked_units puts them aside. reason: recall, quality_hold, supplier_notice or other; note up to 500 characters. Raises a lot_blocked alert and the lot.blocked event. Answers { replanned, ordersShort, pushed, pending (a background pass finishes a large lot), toQuarantine (per warehouse, units and bins still on sellable shelves) }. A blocked lot is refused as illegal_transition.\n\n**Operation id:** `lots_block` — the same operation is `app.lots.block({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_block`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lotId": {
                    "type": "string",
                    "description": "document id of the lot.",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "recall",
                      "quality_hold",
                      "supplier_notice",
                      "other"
                    ],
                    "description": "Why: recall, quality_hold, supplier_notice or other."
                  },
                  "note": {
                    "description": "Shown on the lot and in its alert.",
                    "type": "string",
                    "maxLength": 500
                  },
                  "cascade": {
                    "description": "Also block the hamper batches made from this lot that still hold stock (default false).",
                    "type": "boolean"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "lotId",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lots/block-preview": {
      "get": {
        "operationId": "lots_block_preview",
        "summary": "lots_block_preview",
        "description": "What blocking a lot would do, before lots_block: the units it holds per warehouse, how each warehouse's Shopify hears the block, and the open orders holding the lot.\n\n**Operation id:** `lots_block_preview` — the same operation is `app.lots.block_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_block_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "document id of the lot.",
            "schema": {
              "type": "string",
              "description": "document id of the lot.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/by-order": {
      "get": {
        "operationId": "lots_for_order",
        "summary": "lots_for_order",
        "description": "The lots one order shipped: per lot its number, date, item and the units, from the order's pack jobs and fulfilments. capped when the order has more documents than one read walks.\n\n**Operation id:** `lots_for_order` — the same operation is `app.lots.for_order({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_for_order`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "description": "document id of the order.",
            "schema": {
              "type": "string",
              "description": "document id of the order.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/detail": {
      "get": {
        "operationId": "lots_get",
        "summary": "lots_get",
        "description": "Read one lot: the lot and its item; counts — on hand (units, bins, warehouses), reserved, shipped to orders (units, shipment lines, distinct orders — a lower bound over the newest 5,000 lines when ordersCapped — and the last ship) and returned; where it is now (bins, stockCapped) and the receipts it came in on (received, receivedCapped). hotFromMs is where its shipment history starts in Floormode; archive is null while none can be older. Null for an unknown lot. The shipments themselves: lots_trace.\n\n**Operation id:** `lots_get` — the same operation is `app.lots.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "document id of the lot.",
            "schema": {
              "type": "string",
              "description": "document id of the lot.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/exports": {
      "get": {
        "operationId": "lots_export_get",
        "summary": "lots_export_get",
        "description": "A lot's newest affected-orders export, or null: status (queued, running, done, failed), columns, sinceMs, rowsWritten, partial (what the file lacks, in words) or failureReason, and while its file is kept fileBytes and availableUntilMs.\n\n**Operation id:** `lots_export_get` — the same operation is `app.lots.export_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_export_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "document id of the lot.",
            "schema": {
              "type": "string",
              "description": "document id of the lot.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "lots_export_start",
        "summary": "lots_export_start",
        "description": "Export a lot's affected orders as a CSV file — one row per shipment, every shipment (archived ones too) or those since sinceMs — with the columns you pick: order, shipped (UTC day), units, store, and the customer's name, email, phone, country and shipping address, read from Shopify as the file is written (an erased customer reads redacted, a field the app may not read withheld). Runs in the background; answers { exportId }. One export per lot at a time: another is refused as lot_export_running with the open exportId. Follow it with lots_export_get; the file is downloaded from GET /api/lots/exports/{exportId} for 7 days.\n\n**Operation id:** `lots_export_start` — the same operation is `app.lots.export_start({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_export_start`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lotId": {
                    "type": "string",
                    "description": "document id of the lot.",
                    "format": "floormode-id"
                  },
                  "sinceMs": {
                    "description": "Only shipments at or after this instant (milliseconds since 1970, UTC); absent or null for every shipment.",
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "columns": {
                    "minItems": 1,
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "shipped",
                        "units",
                        "store",
                        "name",
                        "email",
                        "phone",
                        "country",
                        "address"
                      ]
                    },
                    "description": "Columns to write, in any order: order, shipped, units, store, name, email, phone, country, address. Customer columns are read from Shopify, never stored."
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "lotId",
                  "columns"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lots/quarantine": {
      "post": {
        "operationId": "lots_quarantine",
        "summary": "lots_quarantine",
        "description": "Move a blocked or expired lot to quarantine in one warehouse: one floor move task per sellable bin holding free units of it, from that bin to QUAR-01 (an unstarted task of the same bin is topped up instead). Each completed move of an expired lot takes the units out of Shopify's available into quality control; a blocked lot's left it at the block. Reserved units stay with their orders. Answers { tasksCreated, tasksToppedUp, units, binsCapped }.\n\n**Operation id:** `lots_quarantine` — the same operation is `app.lots.quarantine({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_quarantine`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lotId": {
                    "type": "string",
                    "description": "document id of the lot.",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "The warehouse whose sellable bins hold the lot's units.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "lotId",
                  "warehouseId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/lots/trace": {
      "get": {
        "operationId": "lots_trace",
        "summary": "lots_trace",
        "description": "Who got a lot: its shipments to orders, newest first, 50 a page ({ rows, capped, cursor }). Each row: when it shipped, the units, the warehouse, the document that shipped it (pack_job, pick_line or allocation_line, with its id) and the order (orderId, shopifyOrderId, orderName, channelKey — null when the order was deleted). No customer data: read the order for that. A cursor from before the lot's history moved to the archive is refused as stale_cursor; start again.\n\n**Operation id:** `lots_trace` — the same operation is `app.lots.trace({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_trace`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "lotId",
            "in": "query",
            "required": true,
            "description": "document id of the lot.",
            "schema": {
              "type": "string",
              "description": "document id of the lot.",
              "format": "floormode-id"
            }
          },
          {
            "name": "atFromMs",
            "in": "query",
            "required": false,
            "description": "Shipments at or after this instant (milliseconds since 1970, UTC).",
            "schema": {
              "description": "Shipments at or after this instant (milliseconds since 1970, UTC).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`at:desc`, newest first (the only order).",
            "schema": {
              "description": "`at:desc`, newest first (the only order).",
              "type": "string",
              "enum": [
                "at:desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/lots/unblock": {
      "post": {
        "operationId": "lots_unblock",
        "summary": "lots_unblock",
        "description": "Unblock a lot: it is allocated, picked and sold again, and the orders that went short for want of it are re-planned. A live warehouse moves the lot's free units on sellable shelves back to Shopify's available. Its open quarantine tasks are cancelled; units already moved to QUAR-01 stay there until moved back. The last block's reason and note stay on the lot. Raises the lot.unblocked event. Answers like lots_block; a lot that is not blocked is refused as illegal_transition.\n\n**Operation id:** `lots_unblock` — the same operation is `app.lots.unblock({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/lots_unblock`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "lots"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lotId": {
                    "type": "string",
                    "description": "document id of the lot.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "lotId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/manifests": {
      "get": {
        "operationId": "manifests_list",
        "summary": "manifests_list",
        "description": "List end-of-day manifests, newest first (max 100), with the warehouse and carrier label and `shipmentCount`, the exact number of shipments each covers (`shipmentIds` lists at most 100 of them). Filter by status (open, closed, cancelled), warehouse or carrier account.\n\n**Operation id:** `manifests_list` — the same operation is `app.manifests.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/manifests_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "manifests"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "closing",
                "open",
                "closed",
                "cancelled"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "carrierAccountId",
            "in": "query",
            "required": false,
            "description": "document id of the carrier account.",
            "schema": {
              "description": "document id of the carrier account.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/manifests/close-out": {
      "post": {
        "operationId": "manifests_close_out",
        "summary": "manifests_close_out",
        "description": "Close out the carrier day: hand a manifesting carrier account's open labels at one warehouse to the carrier on ONE manifest (a SCAN form, an end-of-day manifest), as the desk's Close out does. Every label bought in the last 14 days and on no manifest is closed out, up to one batch (two hundred labels, or the carrier's own limit); `date` (YYYY-MM-DD, the warehouse's day) labels the manifest. `closeOutKey` is yours: send the SAME key after a lost answer or a TIMEOUT and the stored manifest answers (`replayed: true`), never a second close-out; the next batch takes a NEW key. Answers by `outcome`: `closed` (the manifest, its `document` for shipping.document_link, `remaining` labels still waiting, `heldOut` parcels left out); `refused` (the carrier refused before acting; `released` says whether the parcels are free again); `unknown` (the carrier never confirmed: the parcels stay reserved and are never sent again by themselves; `refusedParcels` names any it refused by name); `undone`; `unrecorded` (the carrier took it and Floormode could not record it: never repeat it). Every failure says what to do `next`, resolving through manifests.resolveCloseOut. Refused before any carrier call with `conflict` and `details.code`: `carrier_account_inactive`, `manifests_unsupported`, `nothing_to_close_out`, `idempotency_key_reused` (a key of another close-out: make a new one), `effect_in_flight` (an attempt is outstanding: wait, then retry the same key). Irreversible: no carrier takes a close-out back.\n\n**Operation id:** `manifests_close_out` — the same operation is `app.manifests.close_out({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/manifests_close_out`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "manifests"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "carrierAccountId": {
                    "type": "string",
                    "description": "The manifesting carrier account (carriers.list).",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "The warehouse the parcels leave from.",
                    "format": "floormode-id"
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The warehouse's local day as YYYY-MM-DD: the manifest's label, not a filter. Every open label of the account at the warehouse is closed out, up to one batch."
                  },
                  "closeOutKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "A key you make for this close-out. Send the SAME key again after a lost answer or a TIMEOUT: it answers the stored manifest, never a second close-out. The next batch takes a NEW key."
                  },
                  "collectionAtMs": {
                    "description": "End of day for one passed collection (collections_today's `collectionAtMs`): only its labels — bought before it, of the services it serves, none a lane closes itself. Omit to close out every open label of the account. Part of the key's scope.",
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "carrierAccountId",
                  "warehouseId",
                  "date",
                  "closeOutKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/manifests/resolve": {
      "post": {
        "operationId": "manifests_resolveCloseOut",
        "summary": "manifests_resolveCloseOut",
        "description": "Resolve an outstanding carrier close-out whose acceptance nobody could read: `announced` records the manifest on the operator's attestation (with the carrier's confirmation number when known), `not_announced` frees its parcels for another close-out. Refused while the attempt is still running, and `not_announced` is refused when the carrier's answer is held.\n\n**Operation id:** `manifests_resolveCloseOut` — the same operation is `app.manifests.resolveCloseOut({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/manifests_resolveCloseOut`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "manifests"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "manifestId": {
                    "type": "string",
                    "description": "A manifests id, e.g. \"manifests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "verdict": {
                    "type": "string",
                    "enum": [
                      "announced",
                      "not_announced"
                    ]
                  },
                  "confirmationNumber": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "manifestId",
                  "verdict"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/notes": {
      "get": {
        "operationId": "notes_list",
        "summary": "notes_list",
        "description": "List the newest notes of the authenticated tenant (max 100).\n\n**Operation id:** `notes_list` — the same operation is `app.notes.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notes_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notes"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "notes_create",
        "summary": "notes_create",
        "description": "Create a note for the authenticated tenant. Body must be 1-500 characters.\n\n**Operation id:** `notes_create` — the same operation is `app.notes.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notes_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notes"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The note text."
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/notifications": {
      "get": {
        "operationId": "notifications_log",
        "summary": "notifications_log",
        "description": "List WISMO customer notifications (OMS-076), newest first, as a disclosed page (`rows`/`capped`, max 100). Each row has the order, channel, milestone, status (pending, sending, sent, failed, no_provider, expired), recipient, any provider message id and the last `error` — the reason a failed send died. Filter by status; `failed`/`no_provider`/`expired` rows can be re-queued with notifications_retry.\n\n**Operation id:** `notifications_log` — the same operation is `app.notifications.log({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_log`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "sending",
                "sent",
                "failed",
                "no_provider",
                "expired"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/notifications/order-owner": {
      "get": {
        "operationId": "notifications_order_owner",
        "summary": "notifications_order_owner",
        "description": "Read the immutable shipment-email owner for an order. Null means the first fulfillment or email submission has not claimed an owner yet. Settings changes apply only to orders without a claim.\n\n**Operation id:** `notifications_order_owner` — the same operation is `app.notifications.order_owner({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_order_owner`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/notifications/order-sent": {
      "get": {
        "operationId": "notifications_order_sent",
        "summary": "notifications_order_sent",
        "description": "The milestone e-mails Floormode sent an order's customer, and when: one row per milestone and scope (the order, a shipment, a return label), newest first, for as long as the order is in Floormode. notifications_log lists the last 7 days of sends.\n\n**Operation id:** `notifications_order_sent` — the same operation is `app.notifications.order_sent({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_order_sent`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/notifications/resume-sending": {
      "post": {
        "operationId": "notifications_resumeSending",
        "summary": "notifications_resumeSending",
        "description": "Resume customer e-mails after Floormode paused them (roadmap I-A). Floormode pauses the account's customer e-mails when, over the last seven days, bounces or spam complaints pass half of the e-mail provider's account limits, at a meaningful volume. E-mails due while paused were settled skipped and are not sent late. Answers resumed: false when nothing was paused.\n\n**Operation id:** `notifications_resumeSending` — the same operation is `app.notifications.resumeSending({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_resumeSending`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/notifications/retry": {
      "post": {
        "operationId": "notifications_retry",
        "summary": "notifications_retry",
        "description": "Re-queue a terminal customer notification (status failed, no_provider or expired): the row goes back to pending, claimable now, and the sweep is armed in the same transaction. Any other status is a conflict (`notification_not_retryable`) — a sent row reached the customer, a pending one is already on its way.\n\n**Operation id:** `notifications_retry` — the same operation is `app.notifications.retry({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_retry`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notificationId": {
                    "type": "string",
                    "description": "Document id of the notification row.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "notificationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/notifications/settings": {
      "get": {
        "operationId": "notifications_settings_get",
        "summary": "notifications_settings_get",
        "description": "Get the WISMO customer-notification settings (OMS-076): the master enable + customer opt-in, which tracking milestones notify (pre_transit, in_transit, out_for_delivery, delivered, exception, failed_attempt, return_to_sender), the sender name and the branded tracking-page theming (store name, logo, accent colour, title, help text and layout).\n\n**Operation id:** `notifications_settings_get` — the same operation is `app.notifications.settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "notifications_settings_update",
        "summary": "notifications_settings_update",
        "description": "Update the WISMO notification settings (OMS-076): who sends and which milestones. Pass expectedRevision from the latest settings read (null for unstored defaults); stale writes are refused. Pass only the fields to change; milestones are merged into the current config. The e-mails' look, words and sender are customerPages_brand_save's. Milestones come in two families: the seven carrier tracking statuses (on by default except return_to_sender), and the three pre-shipment ORDER milestones — order_held (a delay notice, sent only for the awaiting_stock / awaiting_production / awaiting_supplier hold reasons, never for fraud, payment or address holds), backordered (an allocation went short) and partially_shipped (some of the order shipped, the rest is coming). All three default to OFF and are sent at most once per order.\n\n**Operation id:** `notifications_settings_update` — the same operation is `app.notifications.settings_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/notifications_settings_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "notifications"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ownershipMode": {
                    "type": "string",
                    "enum": [
                      "shopify",
                      "floormode",
                      "none",
                      "legacy"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "customerOptIn": {
                    "type": "boolean"
                  },
                  "milestones": {
                    "type": "object",
                    "properties": {
                      "pre_transit": {
                        "type": "boolean"
                      },
                      "in_transit": {
                        "type": "boolean"
                      },
                      "out_for_delivery": {
                        "type": "boolean"
                      },
                      "delivered": {
                        "type": "boolean"
                      },
                      "exception": {
                        "type": "boolean"
                      },
                      "failed_attempt": {
                        "type": "boolean"
                      },
                      "return_to_sender": {
                        "type": "boolean"
                      },
                      "order_held": {
                        "type": "boolean"
                      },
                      "backordered": {
                        "type": "boolean"
                      },
                      "partially_shipped": {
                        "type": "boolean"
                      },
                      "shipment_confirmed": {
                        "type": "boolean"
                      },
                      "return_label_ready": {
                        "type": "boolean"
                      }
                    }
                  },
                  "expectedRevision": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders": {
      "get": {
        "operationId": "orders_list",
        "summary": "orders_list",
        "description": "List mirrored Shopify orders of the authenticated tenant, newest first (50 per page). Optionally filter by fulfillment status and paginate with the returned cursor. Each row carries both identifiers — `_id` (this app's order document id) and `shopifyOrderId` — and orders_get accepts either, so the list→detail chain works with whichever one you already hold. `historyFromMs`: orders last updated before it may be in the history archive.\n\n**Operation id:** `orders_list` — the same operation is `app.orders.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Fulfillment status filter, e.g. \"unfulfilled\" or \"fulfilled\".",
            "schema": {
              "description": "Fulfillment status filter, e.g. \"unfulfilled\" or \"fulfilled\".",
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor: the `cursor` value returned by the previous page.",
            "schema": {
              "description": "Pagination cursor: the `cursor` value returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/actions/reconcile": {
      "post": {
        "operationId": "orders_action_reconcile",
        "summary": "orders_action_reconcile",
        "description": "Ask Shopify again what became of an order request (OMS-1). An unresolved request gets one read-only check (an open check is answered instead of doubled); a request Shopify confirmed whose order has not caught up gets a fresh order refresh. Works after the original queue rows were pruned. The same requestKey replays the first answer.\n\n**Operation id:** `orders_action_reconcile` — the same operation is `app.orders.action_reconcile({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_action_reconcile`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "actionId": {
                    "type": "string",
                    "description": "The order request to check, as listed in the order's appActions.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "actionId",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/actions/resolve": {
      "post": {
        "operationId": "orders_action_resolve",
        "summary": "orders_action_resolve",
        "description": "Settle an order request by hand (OMS-1). abandon: the operator attests that Shopify did NOT apply an unresolved request and the order returns to the floor; refused while Shopify last reported the job still running or while a check is open, and later Shopify evidence still overrules it on the record. accept_confirmed: accept an effect Shopify confirmed before the order shows it.\n\n**Operation id:** `orders_action_resolve` — the same operation is `app.orders.action_resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_action_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "actionId": {
                    "type": "string",
                    "description": "The order request to check, as listed in the order's appActions.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "abandon",
                      "accept_confirmed"
                    ],
                    "description": "abandon: attest that Shopify did NOT apply an unresolved request (the order returns to the floor). accept_confirmed: accept an effect Shopify confirmed before the order mirror shows it."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "actionId",
                  "requestKey",
                  "resolution"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/allocation-gaps": {
      "get": {
        "operationId": "orders_allocation_gaps",
        "summary": "orders_allocation_gaps",
        "description": "Explain why an order is short of stock: one row per missing item with its variant, sku, the number of units that could NOT be reserved, how many of those are accepted backorders, and the warehouse the reservation was attempted at. An order with nothing missing returns an empty list (not an error). `capped` reports whether the line read hit its ceiling. This is the detail behind the work queue's `shortSkuCount`.\n\n**Operation id:** `orders_allocation_gaps` — the same operation is `app.orders.allocation_gaps({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_allocation_gaps`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Numeric Shopify order id as a string.",
            "schema": {
              "type": "string",
              "description": "Numeric Shopify order id as a string.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/cancel": {
      "post": {
        "operationId": "orders_cancel",
        "summary": "orders_cancel",
        "description": "Cancel an order in Shopify (OMS-1 G-05). Admitted only while nothing conflicting is in flight on the order; a refusal names its reason in details.code (for example cancel_pending, fulfillment_in_flight, capture_in_flight, open_return or dropship_open). The order's floor work and reserved stock are released at once and a merge group it is in is cancelled; Shopify's answer settles the request, and a refusal brings the work back. The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `orders_cancel` — the same operation is `app.orders.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "declined",
                      "fraud",
                      "inventory",
                      "other",
                      "staff"
                    ],
                    "description": "Why the order is cancelled: Shopify's OrderCancelReason, lower-cased."
                  },
                  "restock": {
                    "type": "boolean",
                    "description": "Put the order's unfulfilled units back into Shopify stock."
                  },
                  "refund": {
                    "type": "boolean",
                    "description": "Refund captured money to the original payment methods. An authorized payment that was never captured is voided either way."
                  },
                  "notifyCustomer": {
                    "type": "boolean",
                    "description": "Send Shopify's cancellation email to the customer."
                  },
                  "staffNote": {
                    "description": "Internal note on the Shopify order; the customer never sees it.",
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "requestKey",
                  "reason",
                  "restock",
                  "refund",
                  "notifyCustomer"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/capture-payment": {
      "post": {
        "operationId": "orders_capture_payment",
        "summary": "orders_capture_payment",
        "description": "Capture the outstanding authorized payment of an order (OMS-074) via Shopify `orderCapture`. Only an authorized or partially-paid order can be captured; a paid order is already captured. Shopify Payments authorizations expire after ~7 days. The capture-on-fulfill warehouse toggle queues the same capture automatically at ship time.\n\n**Operation id:** `orders_capture_payment` — the same operation is `app.orders.capture_payment({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_capture_payment`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/customer-page": {
      "post": {
        "operationId": "customerPages_open",
        "summary": "customerPages_open",
        "description": "The order's page in its store (roadmap I-B2), as the shopper's link opens it: the store's primary domain, the store page's path and a bearer of the order's page in the fragment (#c=…), valid for 7 days from this call. Until then anyone holding the URL sees the order's delivery status, items, city and country, never an address, a name or a price; after it, the URL opens the page's order lookup. url is null with reason carrier when the store links customers to the carrier's tracking page instead, and no_host while the store's primary domain is not recorded yet.\n\n**Operation id:** `customerPages_open` — the same operation is `app.customerPages.open({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/customerPages_open`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders (customers)"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Shopify's numeric order id as a string, of a store of this account.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/customer-page/revoke": {
      "post": {
        "operationId": "customerPages_revoke",
        "summary": "customerPages_revoke",
        "description": "Revoke the order's customer page link (roadmap I-B2): the page gets a new capability, and every link already sent (e-mails, Shopify's tracking link, a printed packing slip) shows 'no longer valid' with the lookup form. Irreversible. Answers revoked: false when the order has no page yet. customerPages_open answers the new link.\n\n**Operation id:** `customerPages_revoke` — the same operation is `app.customerPages.revoke({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/customerPages_revoke`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders (customers)"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Shopify's numeric order id as a string, of a store of this account.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/abandon-precommit": {
      "post": {
        "operationId": "order_edit_abandon_precommit",
        "summary": "order_edit_abandon_precommit",
        "description": "Abandon only a stopped original preparation attempt with no commit claim or commit proof, preserving its fingerprint and delivery evidence. Never retries Shopify or unlocks an uncertain commit.\n\n**Operation id:** `order_edit_abandon_precommit` — the same operation is `app.order.edit_abandon_precommit({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_abandon_precommit`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "A orderEditSessions id, e.g. \"orderEditSessions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedUpdatedAt": {
                    "type": "number"
                  },
                  "expectedStepKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "expectedFingerprint": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "sessionId",
                  "expectedUpdatedAt",
                  "expectedStepKey",
                  "expectedFingerprint"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/add-variant": {
      "post": {
        "operationId": "order_edit_add_variant",
        "summary": "order_edit_add_variant",
        "description": "Stage adding a variant to an open order edit session (maps to Shopify orderEditAddVariant). Name the session, or the order: its open session, begun by this change when it has none. Returns the session and the updated local price preview. Pass a `requestKey` per add, kept across retries of it: a lost answer re-sent answers the first add and stages no units twice; the same key for another add is refused (`idempotency_key_reused`).\n\n**Operation id:** `order_edit_add_variant` — the same operation is `app.order.edit_add_variant({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_add_variant`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "description": "document id of the order edit session.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "shopifyOrderId": {
                    "description": "Numeric Shopify order id as a string, instead of sessionId.",
                    "type": "string",
                    "minLength": 1,
                    "format": "floormode-id"
                  },
                  "shopifyVariantId": {
                    "description": "Numeric Shopify variant id as a string.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "quantity"
                ],
                "oneOf": [
                  {
                    "required": [
                      "sessionId"
                    ]
                  },
                  {
                    "required": [
                      "shopifyOrderId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/begin": {
      "post": {
        "operationId": "order_edit_begin",
        "summary": "order_edit_begin",
        "description": "Open an order edit session (OMS-074) for staging line changes. Returns the existing open session for the order if one is already open. Optional: a staging call that names the order begins the session with its first change. Changes are staged locally and applied to Shopify (orderEditBegin → add/set → orderEditCommit) only on commit.\n\n**Operation id:** `order_edit_begin` — the same operation is `app.order.edit_begin({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_begin`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/cancel": {
      "post": {
        "operationId": "order_edit_cancel",
        "summary": "order_edit_cancel",
        "description": "Discard an open order edit session without touching Shopify.\n\n**Operation id:** `order_edit_cancel` — the same operation is `app.order.edit_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "document id of the order edit session.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "sessionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/commit": {
      "post": {
        "operationId": "order_edit_commit",
        "summary": "order_edit_commit",
        "description": "Commit a staged order edit: queues one Shopify order-edit flow (orderEditBegin → add-variant / set-quantity → orderEditCommit). The session goes to committing and the outbox outcome settles it. Fails if there are no staged changes. A split-item replacement requires the current review token from order_edit_get; this acknowledges a possible Shopify refusal.\n\n**Operation id:** `order_edit_commit` — the same operation is `app.order.edit_commit({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_commit`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "document id of the order edit session.",
                    "format": "floormode-id"
                  },
                  "note": {
                    "description": "Staff note recorded on the Shopify order edit.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "reviewedSplitToken": {
                    "description": "Current splitReplacementReview.token acknowledged after reviewing the provider risk and fulfillment state.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "sessionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/get": {
      "get": {
        "operationId": "order_edit_get",
        "summary": "order_edit_get",
        "description": "Get one order edit session with its staged changes and the local price preview (added subtotal, quantity delta, net delta), plus a current split-replacement risk review when applicable.\n\n**Operation id:** `order_edit_get` — the same operation is `app.order.edit_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "sessionId",
            "in": "query",
            "required": true,
            "description": "document id of the order edit session.",
            "schema": {
              "type": "string",
              "description": "document id of the order edit session.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/edit/list": {
      "get": {
        "operationId": "order_edit_list",
        "summary": "order_edit_list",
        "description": "List order edit sessions. With shopifyOrderId, the sessions of that order; otherwise the open sessions across the tenant (max 20).\n\n**Operation id:** `order_edit_list` — the same operation is `app.order.edit_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": false,
            "description": "Numeric Shopify order id as a string.",
            "schema": {
              "description": "Numeric Shopify order id as a string.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/edit/recovery": {
      "get": {
        "operationId": "order_edit_recovery",
        "summary": "order_edit_recovery",
        "description": "Inspect original durable step and delivery evidence for an uncertain Shopify order edit. A commit claim is never inferred from current order shape.\n\n**Operation id:** `order_edit_recovery` — the same operation is `app.order.edit_recovery({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_recovery`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "sessionId",
            "in": "query",
            "required": true,
            "description": "A orderEditSessions id, e.g. \"orderEditSessions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orderEditSessions id, e.g. \"orderEditSessions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/edit/set-added-quantity": {
      "post": {
        "operationId": "order_edit_set_added_quantity",
        "summary": "order_edit_set_added_quantity",
        "description": "Set a staged added variant quantity; zero removes the staged addition.\n\n**Operation id:** `order_edit_set_added_quantity` — the same operation is `app.order.edit_set_added_quantity({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_set_added_quantity`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "A orderEditSessions id, e.g. \"orderEditSessions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shopifyVariantId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "sessionId",
                  "shopifyVariantId",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/set-line-discount": {
      "post": {
        "operationId": "order_edit_set_line_discount",
        "summary": "order_edit_set_line_discount",
        "description": "Stage a manual discount on an unfulfilled line. Null removes the editable manual line discount. Shopify confirms financial totals; no inventory, payment or refund is performed locally. Name the session, or the order: its open session, begun by this change when it has none.\n\n**Operation id:** `order_edit_set_line_discount` — the same operation is `app.order.edit_set_line_discount({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_set_line_discount`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "description": "document id of the order edit session.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "shopifyOrderId": {
                    "description": "Numeric Shopify order id as a string, instead of sessionId.",
                    "type": "string",
                    "minLength": 1,
                    "format": "floormode-id"
                  },
                  "shopifyLineItemId": {
                    "type": "string",
                    "minLength": 1,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "percentage"
                              },
                              "value": {
                                "type": "number",
                                "exclusiveMinimum": 0,
                                "maximum": 100
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "fixed"
                              },
                              "value": {
                                "type": "string",
                                "pattern": "^\\d{1,9}(\\.\\d{1,2})?$"
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "shopifyLineItemId",
                  "discount"
                ],
                "oneOf": [
                  {
                    "required": [
                      "sessionId"
                    ]
                  },
                  {
                    "required": [
                      "shopifyOrderId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/edit/set-quantity": {
      "post": {
        "operationId": "order_edit_set_quantity",
        "summary": "order_edit_set_quantity",
        "description": "Stage changing an existing order line's quantity on an open edit session (maps to Shopify orderEditSetQuantity). Setting it back to the original quantity drops the staged change. Name the session, or the order: its open session, begun by this change when it has none. Returns the session and the updated local price preview.\n\n**Operation id:** `order_edit_set_quantity` — the same operation is `app.order.edit_set_quantity({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_edit_set_quantity`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "description": "document id of the order edit session.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "shopifyOrderId": {
                    "description": "Numeric Shopify order id as a string, instead of sessionId.",
                    "type": "string",
                    "minLength": 1,
                    "format": "floormode-id"
                  },
                  "shopifyLineItemId": {
                    "type": "string",
                    "description": "Numeric Shopify order line item id as a string.",
                    "format": "floormode-id"
                  },
                  "newQuantity": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "restock": {
                    "description": "Required for reductions: whether Shopify should restock removed units.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "shopifyLineItemId",
                  "newQuantity"
                ],
                "oneOf": [
                  {
                    "required": [
                      "sessionId"
                    ]
                  },
                  {
                    "required": [
                      "shopifyOrderId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/get": {
      "get": {
        "operationId": "orders_get",
        "summary": "orders_get",
        "description": "Get one mirrored Shopify order in full: the order itself, its line items, its fulfillment orders, its fulfillments, its ALLOCATIONS and its open HOLD INTENTS. Each allocation carries its state, its reserved lines with bin code and quantity, whatever could not be reserved (shortQty) and any backordered units — including the KIT-EXPANSION lines, where a BOM parent is expanded into component lines carrying componentKind (physical or virtual/VMAT), componentPerParent and the parent units those components cover, so a kit order shows what is actually being picked rather than only the parent sku. Hold intents name their reason and the document that caused them. `actions` is the merged list of Shopify actions the fulfillment orders currently permit. Accepts EITHER identifier in `shopifyOrderId`: Shopify's numeric order id, or this app's own order document id as returned by orders_list._id. An unknown id returns null, not an error. Child collections are capped, so a very large order is truncated rather than unbounded. `hasShortfall` says whether any non-released allocation still owes units it could not reserve — read over every allocation line, so it holds even when the lines shown were cut. `linePricing` gives each listed line's unit price, its discount as an amount and its line total, null while Shopify's discounted total for the line is unknown. `dueAt` / `dueKind` (pack_day or fulfill_by) and `fulfillmentOrderDues` (one per listed fulfillment order) follow the one due rule: due = the end of the pack day (the warehouse's packing day before the customer's requested delivery day, in the warehouse's time zone) for work at a warehouse with a requested delivery date while delivery dates are on, else Shopify's fulfil-by; `deliveryDate` adds the pack day and its warehouse. `fulfillmentOrderCheckoutOptions` (one per listed fulfillment order) says what the customer chose at checkout and what it ships with: the option, its `resolution` (mapped, mapped_unavailable when the mapped service was not offered for the newest shipment, rules, unreviewed, ambiguous, pending, non_shipping), the mapped carrier service and the option's revision for checkout_options_set_target.\n\n**Operation id:** `orders_get` — the same operation is `app.orders.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Numeric Shopify order id as a string (\"450789469\"), OR this app's order document id from orders_list._id (\"orders_01ARZ…\"). The prefix distinguishes them.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Numeric Shopify order id as a string (\"450789469\"), OR this app's order document id from orders_list._id (\"orders_01ARZ…\"). The prefix distinguishes them.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/journey": {
      "get": {
        "operationId": "orders_journey",
        "summary": "orders_journey",
        "description": "One order's journey, oldest first, computed from the order's own records: Shopify created and changed it, where Shopify routed it, the reservations, holds and steps Floormode declined, picking, packing and labels, every update queued for Shopify, a carrier or a connected app (state, attempts, the destination's own words for its last refusal and when it is tried next), Shopify's fulfillments and the carrier's tracking. Answers why an order is not in Shopify yet. Each source is bounded and `capped` names the ones cut. Deliveries Shopify sent that changed nothing are not kept and do not appear. `standing` says where the order stands now: a headline kind (the worst blocker, else the least advanced fulfillment order still owing work; `not_clear` when a source is capped or facts conflict), each fulfillment order's, the cited lines (`cause.cites`, keys of `entries`), the next step and the updates still needing someone; kinds and parameters only, never sentences.\n\n**Operation id:** `orders_journey` — the same operation is `app.orders.journey({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_journey`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Numeric Shopify order id as a string, or this app's order document id.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Numeric Shopify order id as a string, or this app's order document id.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/merges": {
      "get": {
        "operationId": "order_merges_list",
        "summary": "order_merges_list",
        "description": "Order merge groups, a disclosed page at a time (`rows`/`capped`/`cursor`, max 100), newest first (`created:desc`, the default) or oldest first, with each group's member order ids. Filters are server predicates: `statuses` (any of open, fulfilled, cancelled) and `shopifyOrderId` (only groups that order belongs to). A group closes as `fulfilled` by itself once no member order has an open fulfillment order left (a cancelled member counts as done), and as `cancelled` when every member was cancelled. Breaking since 2026-10-07: the former single-valued `status` is refused; pass `statuses: [\"open\"]`.\n\n**Operation id:** `order_merges_list` — the same operation is `app.order.merges_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of open, fulfilled, cancelled; absent = every status. Repeat `statuses` for each value (`?statuses=open&statuses=cancelled`), or pass a JSON array (`?statuses=[\"open\",\"cancelled\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "open",
              "cancelled"
            ],
            "schema": {
              "description": "Any of open, fulfilled, cancelled; absent = every status.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "cancelled",
                  "fulfilled"
                ]
              }
            }
          },
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": false,
            "description": "Only groups this Shopify order is a member of.",
            "schema": {
              "description": "Only groups this Shopify order is a member of.",
              "type": "string",
              "minLength": 1,
              "format": "floormode-id"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Groups per page (max 100).",
            "schema": {
              "description": "Groups per page (max 100).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "order_merges_create",
        "summary": "order_merges_create",
        "description": "Create a cross-order merge group (OMS-073) from two or more open orders shipping to the same address, so the warehouse picks and packs them together. This is INTERNAL grouping only — Shopify has no merge primitive, so each order is still fulfilled through its own fulfillment orders; the group only drives the combined pick/pack view.\n\n**Operation id:** `order_merges_create` — the same operation is `app.order.merges_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderIds": {
                    "minItems": 2,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    },
                    "description": "Numeric Shopify order ids — at least two distinct, at most 20."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "shopifyOrderIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/merges/add-order": {
      "post": {
        "operationId": "order_merges_add_order",
        "summary": "order_merges_add_order",
        "description": "Add one more matching open order to an open merge group.\n\n**Operation id:** `order_merges_add_order` — the same operation is `app.order.merges_add_order({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_add_order`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "description": "document id of the merge group.",
                    "format": "floormode-id"
                  },
                  "shopifyOrderId": {
                    "type": "string",
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "groupId",
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/merges/cancel": {
      "post": {
        "operationId": "order_merges_cancel",
        "summary": "order_merges_cancel",
        "description": "Cancel an open merge group; cancelling a cancelled one is a no-op, and a `fulfilled` group is terminal and refused (`illegal_transition`). Its member orders are untouched.\n\n**Operation id:** `order_merges_cancel` — the same operation is `app.order.merges_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "description": "document id of the merge group.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "groupId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/merges/get": {
      "get": {
        "operationId": "order_merges_get",
        "summary": "order_merges_get",
        "description": "Get one merge group with its member orders.\n\n**Operation id:** `order_merges_get` — the same operation is `app.order.merges_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "description": "document id of the merge group.",
            "schema": {
              "type": "string",
              "description": "document id of the merge group.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/merges/remove-order": {
      "post": {
        "operationId": "order_merges_remove_order",
        "summary": "order_merges_remove_order",
        "description": "Remove one order from a merge group. The group is cancelled if fewer than two orders remain.\n\n**Operation id:** `order_merges_remove_order` — the same operation is `app.order.merges_remove_order({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_remove_order`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "description": "document id of the merge group.",
                    "format": "floormode-id"
                  },
                  "shopifyOrderId": {
                    "type": "string",
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "groupId",
                  "shopifyOrderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/merges/view": {
      "get": {
        "operationId": "order_merges_view",
        "summary": "order_merges_view",
        "description": "Current order contents of a merge group: positive current line quantities rolled up by SKU with a per-order breakdown. Removed quantities are excluded; these are not remaining pick quantities.\n\n**Operation id:** `order_merges_view` — the same operation is `app.order.merges_view({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/order_merges_view`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "description": "document id of the merge group.",
            "schema": {
              "type": "string",
              "description": "document id of the merge group.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/pick-early": {
      "post": {
        "operationId": "orders_set_pick_early",
        "summary": "orders_set_pick_early",
        "description": "Let one order through to picking before its pack day (early: true), or make it wait for its pack day again (delivery dates D2). Where a warehouse's picking waits for the pack day (settings.pickOnPackDay), an order with a requested delivery day is not ready to pick before it; a released order is. The release stands through later syncs and a changed delivery day. A cancelled or fulfilled order is refused (work_closed); asking for what the order already says is a no-op.\n\n**Operation id:** `orders_set_pick_early` — the same operation is `app.orders.set_pick_early({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_set_pick_early`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "early": {
                    "type": "boolean",
                    "description": "true lets it through before its pack day; false makes it wait again."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "early"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/queue": {
      "get": {
        "operationId": "orders_work_queue",
        "summary": "orders_work_queue",
        "description": "Order work queue, up to 50 a page (`limit`), newest first; `sort: \"created:asc\"` lists the oldest first, and a `cursor` belongs to the sort it came under. Each row is an order with its open and held fulfillment-order counts, its allocation state, why it is blocked (an open hold with its reason, note and covering document, or a stock shortfall, `shortSkuCount` distinct skus), its destination and its delivery methods. `status`: Shopify fulfillment statuses (\"unfulfilled\", \"partial\", \"fulfilled\", \"restocked\") or the aliases \"open\" (not fulfilled and not cancelled, what the orders screen shows) and \"cancelled\". A cancelled order keeps its status, so \"unfulfilled\" and \"partial\" include cancelled ones; without `status` every order is listed. `search` matches the order name, customer name, email and PO; `b2b: false` is consumer orders; `poNumber` is exact (A–Z any case); `variantId` keeps the orders with a line of that variant; `createdAfterMs` is at or after; `destinationCountry` filters by ISO code (rows carry the country's name). `dueAt` is the earliest due of the order's open work: work at a warehouse with a requested delivery day, while delivery dates are on, is due at the end of its pack day (the warehouse's packing day before that delivery day, in the warehouse's time zone, `dueKind: pack_day`), any other work at Shopify's fulfil-by. `packDay` is the order's earliest pack day, even when other work is due first; the `packDay` filter narrows open orders by it.\n\n**Operation id:** `orders_work_queue` — the same operation is `app.orders.work_queue({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_work_queue`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Fulfillment statuses, e.g. [\"unfulfilled\", \"partial\"]. \"open\": not fulfilled, not cancelled (the orders screen's default); none lists every order. \"unfulfilled\" includes cancelled orders. Repeat `status` for each value (`?status=unfulfilled&status=partial`), or pass a JSON array (`?status=[\"unfulfilled\",\"partial\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "unfulfilled",
              "partial"
            ],
            "schema": {
              "description": "Fulfillment statuses, e.g. [\"unfulfilled\", \"partial\"]. \"open\": not fulfilled, not cancelled (the orders screen's default); none lists every order. \"unfulfilled\" includes cancelled orders.",
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          {
            "name": "holdState",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "held",
                "unheld"
              ]
            }
          },
          {
            "name": "allocationState",
            "in": "query",
            "required": false,
            "description": "Stock reserved for the whole order: none, allocated (fully reserved), short (stock missing) or released.",
            "schema": {
              "description": "Stock reserved for the whole order: none, allocated (fully reserved), short (stock missing) or released.",
              "type": "string",
              "enum": [
                "none",
                "allocated",
                "short",
                "released"
              ]
            }
          },
          {
            "name": "holdReasons",
            "in": "query",
            "required": false,
            "description": "Only orders carrying one of OUR open holds with any of these reasons, e.g. [\"fraud_risk\", \"address_issue\"]; absent = any order. Repeat `holdReasons` for each value (`?holdReasons=fraud_risk&holdReasons=address_issue`), or pass a JSON array (`?holdReasons=[\"fraud_risk\",\"address_issue\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "fraud_risk",
              "address_issue"
            ],
            "schema": {
              "description": "Only orders carrying one of OUR open holds with any of these reasons, e.g. [\"fraud_risk\", \"address_issue\"]; absent = any order.",
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "payment_pending",
                  "fraud_risk",
                  "address_issue",
                  "awaiting_stock",
                  "awaiting_production",
                  "awaiting_supplier",
                  "customer_request",
                  "other"
                ]
              }
            }
          },
          {
            "name": "riskLevel",
            "in": "query",
            "required": false,
            "description": "Risk level, e.g. \"HIGH\" (case-insensitive).",
            "schema": {
              "description": "Risk level, e.g. \"HIGH\" (case-insensitive).",
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Exact order tag, compared like an automation rule: case-, space- and accent-composition-insensitive (RÜCKSENDUNG finds Rücksendung).",
            "schema": {
              "description": "Exact order tag, compared like an automation rule: case-, space- and accent-composition-insensitive (RÜCKSENDUNG finds Rücksendung).",
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Substring of order name, customer name, email or the buyer's PO number.",
            "schema": {
              "description": "Substring of order name, customer name, email or the buyer's PO number.",
              "type": "string"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "document id of a variant: only orders with a line of it.",
            "schema": {
              "description": "document id of a variant: only orders with a line of it.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "updatedBeforeMs",
            "in": "query",
            "required": false,
            "description": "Orders Shopify last changed before this instant (milliseconds since 1970, UTC). An order whose change time could not be read never matches.",
            "schema": {
              "description": "Orders Shopify last changed before this instant (milliseconds since 1970, UTC). An order whose change time could not be read never matches.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "createdAfterMs",
            "in": "query",
            "required": false,
            "description": "Orders placed at or after this instant (milliseconds since 1970, UTC).",
            "schema": {
              "description": "Orders placed at or after this instant (milliseconds since 1970, UTC).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "destinationCountry",
            "in": "query",
            "required": false,
            "description": "Ship-to country as a two-letter ISO code, e.g. DE.",
            "schema": {
              "description": "Ship-to country as a two-letter ISO code, e.g. DE.",
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          },
          {
            "name": "deliveryMethod",
            "in": "query",
            "required": false,
            "description": "Any of these delivery methods, e.g. [\"pickup\", \"local_delivery\"]: orders the customer collects or the merchant delivers. Every method when absent. Repeat `deliveryMethod` for each value (`?deliveryMethod=pickup&deliveryMethod=local_delivery`), or pass a JSON array (`?deliveryMethod=[\"pickup\",\"local_delivery\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "pickup",
              "local_delivery"
            ],
            "schema": {
              "description": "Any of these delivery methods, e.g. [\"pickup\", \"local_delivery\"]: orders the customer collects or the merchant delivers. Every method when absent.",
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "shipping",
                  "pickup",
                  "local_delivery",
                  "other"
                ]
              }
            }
          },
          {
            "name": "packDay",
            "in": "query",
            "required": false,
            "description": "Open orders by pack day in each warehouse's own today: overdue, today, next, later, no_date or unreadable. Refused as delivery_dates_off while off. Repeat `packDay` for each value (`?packDay=overdue&packDay=today`), or pass a JSON array (`?packDay=[\"overdue\",\"today\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "overdue",
              "today"
            ],
            "schema": {
              "description": "Open orders by pack day in each warehouse's own today: overdue, today, next, later, no_date or unreadable. Refused as delivery_dates_off while off.",
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "overdue",
                  "today",
                  "next",
                  "later",
                  "no_date",
                  "unreadable"
                ]
              }
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "shippingOption",
            "in": "query",
            "required": false,
            "description": "Orders with a fulfillment order under this checkout option, an id from checkout_options_list. With open statuses only: open fulfillment orders only.",
            "schema": {
              "description": "Orders with a fulfillment order under this checkout option, an id from checkout_options_list. With open statuses only: open fulfillment orders only.",
              "type": "string"
            }
          },
          {
            "name": "noProduct",
            "in": "query",
            "required": false,
            "description": "true: only orders waiting on an item with no product in Shopify (a deleted variant or a custom item). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "true: only orders waiting on an item with no product in Shopify (a deleted variant or a custom item).",
              "type": "boolean"
            }
          },
          {
            "name": "b2b",
            "in": "query",
            "required": false,
            "description": "true: only B2B orders, bought by a Shopify B2B company location; false: only consumer orders. Every order when absent. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "true: only B2B orders, bought by a Shopify B2B company location; false: only consumer orders. Every order when absent.",
              "type": "boolean"
            }
          },
          {
            "name": "poNumber",
            "in": "query",
            "required": false,
            "description": "The buyer's purchase-order number: only orders carrying exactly it, ignoring the case of A–Z (one PO may name several orders).",
            "schema": {
              "description": "The buyer's purchase-order number: only orders carrying exactly it, ignoring the case of A–Z (one PO may name several orders).",
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "failedUpdate",
            "in": "query",
            "required": false,
            "description": "true: only orders with an update to Shopify that did not go through and is retried from the order. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "true: only orders with an update to Shopify that did not go through and is retried from the order.",
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`cursor` returned by the previous page.",
            "schema": {
              "description": "`cursor` returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per page, 1 to 50; the default is 50.",
            "schema": {
              "description": "Rows per page, 1 to 50; the default is 50.",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/refund": {
      "post": {
        "operationId": "orders_refund",
        "summary": "orders_refund",
        "description": "Refund an order in Shopify (OMS-1 G-02): chosen items, optionally putting unshipped units back into stock, shipping, or an amount on its own. Admitted only while no other refund, cancellation, capture, item edit or open return request is in flight; a refusal names its reason in details.code (for example refund_in_flight, open_return or nothing_captured). Items are checked against what each line can still refund; while earlier returns of the order are still being confirmed with Shopify the answer is ok false with reason order_checking, nothing is queued and the same key may be sent again. Before any money moves Floormode reads Shopify's own refund suggestion: when Shopify would refund more than the confirmed maximum, when the order was paid in another currency than the shop's, or when the order's payments cannot cover the amount exactly, Shopify is asked nothing and the request settles as not applied. A refund that restocks pauses NEW floor work on the order until Shopify's answer is mirrored. The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `orders_refund` — the same operation is `app.orders.refund({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_refund`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "lines": {
                    "default": [],
                    "description": "The items to refund; empty for a refund of shipping or of an amount only.",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "shopifyLineItemId": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Numeric Shopify line item id, as listed in the order's lineItems.",
                          "format": "floormode-id"
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "description": "Units of the line to refund."
                        },
                        "restock": {
                          "type": "boolean",
                          "description": "Put these units back into Shopify stock. Unshipped units only: Shopify removes them from the order, and new floor work on the order waits for the answer."
                        }
                      },
                      "required": [
                        "shopifyLineItemId",
                        "quantity",
                        "restock"
                      ]
                    }
                  },
                  "shippingAmount": {
                    "description": "Shipping to refund, in the order's currency (for example 4.95). Shopify refuses more than it can still refund.",
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "amount": {
                    "description": "An amount to refund on its own, without items or shipping, in the order's currency. It goes back to the order's payments in Shopify's order and must be covered exactly.",
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "note": {
                    "description": "Why the order is refunded; kept on the refund.",
                    "type": "string",
                    "maxLength": 500
                  },
                  "notifyCustomer": {
                    "type": "boolean",
                    "description": "Send Shopify's refund email to the customer."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "requestKey",
                  "notifyCustomer"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/refund-quote": {
      "get": {
        "operationId": "orders_refund_quote",
        "summary": "orders_refund_quote",
        "description": "What an order can refund right now (OMS-1 G-02), per line: the units still refundable, restockable and returnable, and what the customer paid for the whole line in micros of the order's currency. Read from the mirror only, as the hint for the refund form: the exact amount is Shopify's own suggestion, read again before any refund is issued, and a refund above the quoted maximum is refused. complete is false while earlier returns are still being confirmed. An unknown order returns null.\n\n**Operation id:** `orders_refund_quote` — the same operation is `app.orders.refund_quote({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_refund_quote`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shopifyOrderId",
            "in": "query",
            "required": true,
            "description": "Numeric Shopify order id as a string.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Numeric Shopify order id as a string.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/split": {
      "post": {
        "operationId": "orders_split",
        "summary": "orders_split",
        "description": "Split a fulfillment order's stock shortages into a new fulfillment order (OMS-073) so the covered units can ship now while the missing units wait for restock. Queues the Shopify `fulfillmentOrderSplit`; requires the fulfillment order to still support SPLIT and to have both covered and short remaining units, with no picked goods. Oversell need not be enabled. Identify it by shopifyFoId or its document id.\n\n**Operation id:** `orders_split` — the same operation is `app.orders.split({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_split`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "foDocId": {
                    "type": "string",
                    "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shopifyFoId": {
                    "description": "Numeric Shopify fulfillment order id.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/orders/tags": {
      "get": {
        "operationId": "orders_recent_tags",
        "summary": "orders_recent_tags",
        "description": "The tags and priorities on recent orders, for writing pick profile and automation conditions: a sample of the newest 1,000 orders of the last 90 days, grouped case-insensitively with the most frequent spelling and the number of orders carrying each, in `value` (`truncated` = the sample was full, so older orders may carry other tags and every count is a floor), plus the tags live automation rules add and, with warehouseId, the tags and priorities that warehouse's live pick profiles use. A tag added by a rule appears on orders a moment after the rule runs.\n\n**Operation id:** `orders_recent_tags` — the same operation is `app.orders.recent_tags({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_recent_tags`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Also offer the tags this warehouse's live pick profiles use.",
            "schema": {
              "description": "Also offer the tags this warehouse's live pick profiles use.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/orders/update": {
      "post": {
        "operationId": "orders_update",
        "summary": "orders_update",
        "description": "Change an order's note, tags, contact email or shipping address in Shopify (OMS-1 G-03/G-04). Send only what changes, with expectedUpdatedAt as orders_get returned it: an order that changed since is refused with revision_mismatch, and Shopify's own copy is checked again before any field is written, so a newer change there is never overwritten. An address change is refused while a label is being bought or was bought, or a freight tender runs; once admitted, new labels and tenders for the order wait for it, and rates or freight offers fetched for the old address must be fetched again. On an unfulfilled order Shopify recalculates taxes for the new address; a paid order may then owe or be owed the difference, settled in Shopify (Floormode mirrors the new totals). A refusal names its reason in details.code. The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `orders_update` — the same operation is `app.orders.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/orders_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "orders"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "expectedUpdatedAt": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The order's shopifyUpdatedAt exactly as the caller read it from orders_get. An order that changed since is refused with revision_mismatch, and Shopify's own copy is checked again before any field is written."
                  },
                  "note": {
                    "description": "The order note. Null or an empty string clears it; absent leaves it unchanged.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "description": "Tag changes. A tag cannot be added and removed in one request.",
                    "type": "object",
                    "properties": {
                      "add": {
                        "maxItems": 250,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40,
                          "description": "One order tag (at most 40 characters)."
                        },
                        "description": "Tags to add; the order's other tags stay."
                      },
                      "remove": {
                        "maxItems": 250,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40,
                          "description": "One order tag (at most 40 characters)."
                        },
                        "description": "Tags to remove; the order's other tags stay."
                      }
                    },
                    "required": [
                      "add",
                      "remove"
                    ]
                  },
                  "email": {
                    "description": "The order's contact email; a malformed address is refused with invalid_input. Refused with details_withheld while Shopify withholds this order's customer details from the app.",
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "shippingAddress": {
                    "description": "The whole new shipping address. Refused while a label is being bought or was bought (label_in_flight) or a freight tender runs (freight_booking); once admitted, rates and freight offers fetched for the old address stop counting.",
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Recipient first name."
                      },
                      "lastName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Recipient last name."
                      },
                      "company": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Company, if any."
                      },
                      "address1": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "Street and house number."
                      },
                      "address2": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Apartment, suite, floor."
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "City."
                      },
                      "provinceCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "ISO 3166-2 subdivision code without the country prefix (for example BY or CA), where the country has provinces."
                      },
                      "countryCode": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "description": "ISO 3166-1 alpha-2 country code, for example DE."
                      },
                      "zip": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 20
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Postal code."
                      },
                      "phone": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "A phone number the carrier may call."
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "company",
                      "address1",
                      "address2",
                      "city",
                      "provinceCode",
                      "countryCode",
                      "zip",
                      "phone"
                    ]
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "requestKey",
                  "expectedUpdatedAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pack-instructions/get": {
      "get": {
        "operationId": "pack_instructions_get",
        "summary": "pack_instructions_get",
        "description": "Get the pack instructions of one product: the product's own note and each variant's own note (variantId set), from Floormode (source floormode) or a Shopify metafield (source metafield; Floormode's wins at each level). A packer sees the product's note, then the variant's, and confirms when either asks. Also answers the product's Shopify image a note may show and how many live variants share the product's note. With variantId, only the product's own notes and that variant's, whole; without, one page of every note (notesCapped says when there are more). Null for an unknown product.\n\n**Operation id:** `pack_instructions_get` — the same operation is `app.pack.instructions_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_instructions_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pack-instructions"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "productId",
            "in": "query",
            "required": true,
            "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/pack-instructions/import": {
      "post": {
        "operationId": "pack_instructions_import",
        "summary": "pack_instructions_import",
        "description": "Import pack instructions in bulk, at most 500 rows per call: each row names a live item by its SKU, with its instruction (empty removes it) and optionally confirm. A product with one live variant gets the product's note, a product with several gets that variant's own. A row whose SKU names no item, or several, is reported in errors and the other rows are written. A row keeps the note's image, and its confirm when the row gives none. The requestKey binds the sheet: the same rows under the same key answer the first result again (replayed: true) and write nothing; other rows under it are refused.\n\n**Operation id:** `pack_instructions_import` — the same operation is `app.pack.instructions_import({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_instructions_import`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pack-instructions"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "minLength": 1
                        },
                        "instruction": {
                          "type": "string",
                          "maxLength": 280
                        },
                        "confirm": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "sku",
                        "instruction"
                      ]
                    }
                  }
                },
                "required": [
                  "requestKey",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pack-instructions/save": {
      "post": {
        "operationId": "pack_instructions_save",
        "summary": "pack_instructions_save",
        "description": "Write the Floormode pack instruction of a product (variantId null) or of one of its variants: plain text of at most 280 characters (empty removes the note), an optional image that is one of the product's Shopify images (https://cdn.shopify.com/…), and confirm (the packer must confirm it before the parcel can be fulfilled). Send the note's revision from pack_instructions_get, 0 for a new note; a note changed since is refused with revision_mismatch. Answers the stored note, or null once removed.\n\n**Operation id:** `pack_instructions_save` — the same operation is `app.pack.instructions_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_instructions_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pack-instructions"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 280
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "confirm": {
                    "type": "boolean"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "productId",
                  "variantId",
                  "text",
                  "imageUrl",
                  "confirm",
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/ack-instruction": {
      "post": {
        "operationId": "packing_ack_instruction",
        "summary": "packing_ack_instruction",
        "description": "Confirm a line's pack instruction at the pack station: the packer read the note of an item whose instruction asks to be confirmed (packing_get items[].instruction.confirm). Once per line, whatever its quantity: a second confirm writes nothing and answers replayed: true. Refused for an item that is not in the parcel or has nothing to confirm, and once the parcel is packed. With orderNote: true and noteDigest instead of variantId, confirms the note an automation rule gave the order (packing_get orderDirectives.note: confirm, digest), once per parcel: each parcel of a split order confirms it. A digest other than the note's current one is refused (conflict, details.code revision_mismatch). Name exactly one of variantId and orderNote. While a confirm is missing, the instructions step is open and packing_fulfill answers instructions_required.\n\n**Operation id:** `packing_ack_instruction` — the same operation is `app.packing.ack_instruction({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_ack_instruction`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "orderNote": {
                    "type": "boolean",
                    "const": true
                  },
                  "noteDigest": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/confirm-item": {
      "post": {
        "operationId": "packing_confirm_item",
        "summary": "packing_confirm_item",
        "description": "Confirms `qty` units of one parcel item by eye (method tap), for an item no scan finds (no barcode, SKU or alias) or one allowed to be confirmed without a scan (variants_set_confirm_mode no_scan). Counted exactly like scans of it, at most what is still open (over_scan otherwise); an item a scan finds and not allowed without a scan is refused as \"has_code\" with the code to scan. Where the warehouse confirms by scan only, an item without the exception needs a lead's grant (`approvalId`), else it is refused as \"scan_required\". Answers like packing_scan_item.\n\n**Operation id:** `packing_confirm_item` — the same operation is `app.packing.confirm_item({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_confirm_item`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "method": {
                    "type": "string",
                    "const": "tap",
                    "description": "A confirm by eye: the floor's tap."
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId",
                  "variantId",
                  "qty",
                  "method"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/details": {
      "get": {
        "operationId": "pack_records_list",
        "summary": "pack_records_list",
        "description": "Recorded packing details, oldest first, current values only unless `includeSuperseded`: one parcel's (packJobId), one order's (orderId), or every parcel's recorded in a window [fromMs, toMs) — the long export of every value. Every scope pages on `cursor` (oldest first, by record time): a cut page answers where the next one starts. Each row carries its parcel's short id, its field's key and where it shows today, the name, type and unit it was recorded under, the line, the value (a number, a yes/no, or words), how it was given, when, and when a correction replaced it.\n\n**Operation id:** `pack_records_list` — the same operation is `app.pack.records_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_records_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "packJobId",
            "in": "query",
            "required": false,
            "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "fromMs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "toMs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "includeSuperseded",
            "in": "query",
            "required": false,
            "description": "Add the values a later correction replaced (default: current values only). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Add the values a later correction replaced (default: current values only).",
              "type": "boolean"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Where the next page starts: the cursor a cut page answered (every scope).",
            "schema": {
              "description": "Where the next page starts: the cursor a cut page answered (every scope).",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "pack_records_set",
        "summary": "pack_records_set",
        "description": "Record packing details on a parcel that is still at the pack station. Each value names its active field (and, for a field recorded per line, the line's variant as lineKey) and is checked against it: a number for a number field, true or false for a yes/no, one of a choice's options by key or name, words matching the pattern for a text or a seal. A value is never edited: a new one supersedes the one on record, an unchanged one writes nothing, null clears it. Refused once the parcel is packed (parcel_packed). `source` is how a packer gave it (manual or scan); absent = api. Answers only the records the call changed (a cleared value's ended record carries supersededAtMs) and `missing`, the required values the parcel still lacks.\n\n**Operation id:** `pack_records_set` — the same operation is `app.pack.records_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_records_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "values": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldId": {
                          "type": "string",
                          "description": "A packFields id, e.g. \"packFields_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "lineKey": {
                          "description": "The line's variant id, for a field recorded per line.",
                          "type": "string"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 500
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "description": "How the packer gave it; absent = api.",
                          "type": "string",
                          "enum": [
                            "manual",
                            "scan"
                          ]
                        }
                      },
                      "required": [
                        "fieldId",
                        "value"
                      ]
                    }
                  },
                  "stationId": {
                    "description": "The pack station the values were recorded at.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId",
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/fields": {
      "get": {
        "operationId": "pack_fields_list",
        "summary": "pack_fields_list",
        "description": "The packing details a merchant asks packers to record on parcels (roadmap A1e): the active fields in list order — key (custom.<slug>), name, help line, type (text, number, choice, boolean, seal), unit, options, pattern, scope (once per parcel, or once per line), required, where the value shows besides export and the API (order, shipment, packing_slip), status, version and revision. `includeArchived` adds the newest 50 archived fields after them.\n\n**Operation id:** `pack_fields_list` — the same operation is `app.pack.fields_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_fields_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "description": "Add the newest 50 archived fields after the active ones. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Add the newest 50 archived fields after the active ones.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "pack_fields_save",
        "summary": "pack_fields_save",
        "description": "Create a packing detail field (no fieldId: added at the end of the list) or change one (fieldId with the revision the edit started from; a field saved since answers revision_mismatch). The key is set once, derived from the name unless given, and never renamed (a key another field holds is a key_taken conflict). Changing the type, the unit, the options, the pattern or the scope raises the field's version: values recorded before keep the name, type and unit they were recorded under, and stop counting for the pack step. A choice takes 2 to 50 options; a pattern must compile. At most 20 active fields (too_many_fields).\n\n**Operation id:** `pack_fields_save` — the same operation is `app.pack.fields_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_fields_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldId": {
                    "description": "The field to change; absent creates a field at the end of the list.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "description": "The revision the edit started from (required with fieldId).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "key": {
                    "description": "custom.<slug>, set once on create and never renamed; absent = derived from the label.",
                    "type": "string",
                    "maxLength": 47
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "help": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 140
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "choice",
                      "boolean",
                      "seal"
                    ]
                  },
                  "unit": {
                    "description": "A number field's unit (g, cm, pieces …).",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 8
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "description": "A choice field's options, in order, by their labels.",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    }
                  },
                  "pattern": {
                    "description": "A regular expression a text or seal value must match.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "parcel",
                      "line"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "showOn": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "shipment",
                        "packing_slip"
                      ]
                    },
                    "description": "Where the value shows besides export and the API, which see every field."
                  }
                },
                "required": [
                  "label",
                  "type",
                  "scope",
                  "required",
                  "showOn"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/fields/archive": {
      "post": {
        "operationId": "pack_fields_archive",
        "summary": "pack_fields_archive",
        "description": "Archive a packing detail field: it leaves the pack step and the other fields close the gap; every value recorded under it stays readable, and it can be restored.\n\n**Operation id:** `pack_fields_archive` — the same operation is `app.pack.fields_archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_fields_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldId": {
                    "type": "string",
                    "description": "A packFields id, e.g. \"packFields_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "fieldId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/fields/reorder": {
      "post": {
        "operationId": "pack_fields_reorder",
        "summary": "pack_fields_reorder",
        "description": "Put the active packing detail fields in a new order. `fieldIds` names every active field exactly once; a list from a stale screen is refused as a conflict.\n\n**Operation id:** `pack_fields_reorder` — the same operation is `app.pack.fields_reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_fields_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldIds": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A packFields id, e.g. \"packFields_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "Every active field exactly once, in the new order."
                  }
                },
                "required": [
                  "fieldIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/fields/restore": {
      "post": {
        "operationId": "pack_fields_restore",
        "summary": "pack_fields_restore",
        "description": "Restore an archived packing detail field to the end of the list, if fewer than 20 are active (too_many_fields).\n\n**Operation id:** `pack_fields_restore` — the same operation is `app.pack.fields_restore({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_fields_restore`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldId": {
                    "type": "string",
                    "description": "A packFields id, e.g. \"packFields_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "fieldId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/fulfill": {
      "post": {
        "operationId": "packing_fulfill",
        "summary": "packing_fulfill",
        "description": "Queue the Shopify fulfillment of a verified pack job (status fulfill_queued). The tenant object only records the intent: the Worker executes `fulfillmentCreate` with the selected picked fulfillment-order quantities (omitted selection means all picked remainder) and tracking. Partial selections require the current packing_get fulfillmentOptions revision; queued retries preserve the frozen parcel. The stock leaves the staging bin only once Shopify confirms — Shopify stays the truth for shipped. Answers an outcome: `{ ok: true, value }` once queued, or `{ ok: false, reason, detail }` when a step of the warehouse's pack checklist is unmet (judged only for a verified parcel with no standing attempt): `<step>_required` — `qc_required` (the check holds no pass, or a recorded fail), `label_required` (the label step is required and neither a label of this parcel nor a tracking number exists), `weigh_required` (the weight is required and none is recorded), and `photo_required`, `details_required`, `instructions_required` as those steps arrive; packing_get's `steps` and `unmetSteps` say so beforehand. A pickup or local-delivery parcel (packing_get `deliveryMethod`) takes no label and gets no fulfillment of ours, and must hold everything its fulfillment order still owes: pickup queues Shopify's `fulfillmentOrderLineItemsPreparedForPickup` (status fulfill_queued, then prepared once Shopify confirms; Shopify sends the customer its ready-for-pickup notice), local delivery becomes prepared at once with no Shopify call (`outboxId: null`; Shopify has no such call). A prepared parcel ships when Shopify reports the handover fulfillment (picked up / delivered).\n\n**Operation id:** `packing_fulfill` — the same operation is `app.packing.fulfill({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_fulfill`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "trackingNumber": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trackingCompany": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notifyCustomer": {
                    "type": "boolean"
                  },
                  "lineItems": {
                    "minItems": 1,
                    "maxItems": 250,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "foLineId": {
                          "type": "string",
                          "minLength": 1,
                          "format": "floormode-id",
                          "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "foLineId",
                        "quantity"
                      ]
                    }
                  },
                  "expectedFulfillmentRevision": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "stationId": {
                    "description": "The pack station the parcel was finished at; ignored unless a pack station here.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/jobs": {
      "get": {
        "operationId": "packing_list_jobs",
        "summary": "packing_list_jobs",
        "description": "List pack jobs, in the chosen order (`sort`; newest first by default), one page, with expected and scanned unit counts. Filter by status (pending, verifying, verified, fulfill_queued, fulfilled, failed, cancelled), warehouse or order (orderId). A pack job carries no bin and no station, so zoneId and stationId both narrow to their WAREHOUSE — the finest granularity this surface has. Each row's `shippingOption` is the customer's checkout option and what it ships with, without the shipment fallback (never mapped_unavailable here). `view: \"card\"` answers only what a parcel card shows (number, status, batch, order name, store, expected and scanned units) and names `view: \"card\"` on the answer: the floor home's read.\n\n**Operation id:** `packing_list_jobs` — the same operation is `app.packing.list_jobs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_list_jobs`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `statuses` for each value (`?statuses=pending&statuses=verifying`), or pass a JSON array (`?statuses=[\"pending\",\"verifying\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "pending",
              "verifying"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pending",
                  "verifying",
                  "verified",
                  "fulfill_queued",
                  "prepared",
                  "fulfilled",
                  "failed",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Only this order's pack jobs (its shipment picker).",
            "schema": {
              "description": "Only this order's pack jobs (its shipment picker).",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Narrows to the zone's warehouse.",
            "schema": {
              "description": "Narrows to the zone's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first: the next job to pack).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first: the next job to pack).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Parcels per page (max 100, the default).",
            "schema": {
              "description": "Parcels per page (max 100, the default).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "description": "`card`: each parcel's number, status, batch, order, store, expected and scanned units only, answered with `view: \"card\"`; absent = the whole row.",
            "schema": {
              "description": "`card`: each parcel's number, status, batch, order, store, expected and scanned units only, answered with `view: \"card\"`; absent = the whole row.",
              "type": "string",
              "enum": [
                "card"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/packing/jobs/get": {
      "get": {
        "operationId": "packing_get",
        "summary": "packing_get",
        "description": "Get one pack job: the parcel's item checklist (expected vs. scanned per variant), the shipping address, whether it is fully verified, the warehouse's pack checklist evaluated for it (`steps`: each step's mode, state — done, open, not_needed, skipped, waiting_lead — and facts as numbers and closed words), the steps still unmet (`unmetSteps`), what the weight is measured against (`weigh`: the parcel's expected weight and the tolerance), the label to pick up from (`dispatch`) and how it reaches the customer (`deliveryMethod`: a pickup or local_delivery parcel takes no label). While delivery dates are on, `requestedDeliveryDay` and the day this warehouse packs it (`packDay`). `shippingOption`: the customer's checkout option and what it ships with (as orders_get's fulfillmentOrderCheckoutOptions).\n\n**Operation id:** `packing_get` — the same operation is `app.packing.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "packJobId",
            "in": "query",
            "required": true,
            "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "desk",
            "in": "query",
            "required": false,
            "description": "Also answer confirmSummary, which a pack station never shows. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also answer confirmSummary, which a pack station never shows.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/packing/pack-as-one": {
      "post": {
        "operationId": "packing_pack_as_one",
        "summary": "packing_pack_as_one",
        "description": "Pack the rest in one parcel: the order's remaining parcels of its plan (packing_get parcelPlan, set by the items' parcel rules and keep-apart groups) join this one, for this order only; the item settings stay. Only while the parcel is pending or verifying, no fulfilment attempt stands and no label was bought for it: else refused (parcel_checked, label_bought, plan_changed; plan_changed when expectedPlanRev is not the plan's revision). What depended on the narrower parcel is reset in the same transaction: the weight's expectation and verdict (the measured weight is judged again), the QC verdict and an unbought label draft; the scans stay, so verify asks only for the units the parcel gained. A parcel with no plan answers unchanged. Bound to requestKey: a retry answers the first result.\n\n**Operation id:** `packing_pack_as_one` — the same operation is `app.packing.pack_as_one({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_pack_as_one`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedPlanRev": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The plan revision packing_get answered (parcelPlan.rev); another is refused."
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "One per press, kept across retries: a retry answers the first result."
                  }
                },
                "required": [
                  "packJobId",
                  "expectedPlanRev",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/photos": {
      "get": {
        "operationId": "pack_photos_list",
        "summary": "pack_photos_list",
        "description": "The photos on record of one parcel (packJobId) or of every parcel of one order (orderId), newest first: when each was taken, at which pack station, its size, and its status — stored (the parcel's current photo), expired (the warehouse's retention deleted it) or redacted (an erasure or the order's deletion deleted it). Metadata only: the image itself is served to a signed-in person by the app, never through this API.\n\n**Operation id:** `pack_photos_list` — the same operation is `app.pack.photos_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pack_photos_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "packJobId",
            "in": "query",
            "required": false,
            "description": "One parcel (a pack job). Give this or orderId.",
            "schema": {
              "description": "One parcel (a pack job). Give this or orderId.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "Every parcel of one order. Give this or packJobId.",
            "schema": {
              "description": "Every parcel of one order. Give this or packJobId.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/packing/qc": {
      "post": {
        "operationId": "packing_record_qc",
        "summary": "packing_record_qc",
        "description": "Record the QC verdict at the pack checkpoint (WHT-016). Only meaningful when the warehouse's packChecklist checks parcels (qc.mode required), but always accepted so a packer can note an inspection. A pass clears the gate on packing_fulfill; a fail (needs a reason) blocks fulfillment and is the cue to disposition the complete parcel (disposition_record_damage_bulk with its pack job ID). Callable on a verified — not yet fulfilled — job.\n\n**Operation id:** `packing_record_qc` — the same operation is `app.packing.record_qc({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_record_qc`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "result": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "fail"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "packJobId",
                  "result"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/record-insert": {
      "post": {
        "operationId": "packing_record_insert",
        "summary": "packing_record_insert",
        "description": "Record one of the parcel's inserts (an automation rule's add_insert, packing_get orderDirectives.inserts.lines): state added (it went in), skipped (it did not) or none_left (none here at all: the line reads ran_out, not required, and the material's one run-out alert at the warehouse is raised at once). The latest record wins; a record equal to it answers replayed: true and writes nothing. Send the line's digest as shown: a changed line is refused (conflict, details.code insert_changed). Refused for another parcel's once-per-order insert (insert_elsewhere), a gone item (insert_gone), a switched-off rule (insert_withdrawn), a line not in this parcel (insert_not_here), once the parcel is packed or a label or fulfilment attempt stands (parcel_packed), and after its first fulfil settled its inserts (insert_settled). added follows the warehouse's confirm policy like an item: a tap where the warehouse confirms by scan answers {ok: false, reason: \"scan_required\", qty} until a lead's approvalId covers it. requestKey (one per press, kept across its retries) replays a lost answer. While an insert the packer confirms is to add, the inserts step is open and packing_fulfill answers inserts_required.\n\n**Operation id:** `packing_record_insert` — the same operation is `app.packing.record_insert({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_record_insert`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "added",
                      "skipped",
                      "none_left"
                    ]
                  },
                  "digest": {
                    "type": "string",
                    "minLength": 1
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "packJobId",
                  "variantId",
                  "state",
                  "digest"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/record-serial": {
      "post": {
        "operationId": "packing_record_serial",
        "summary": "packing_record_serial",
        "description": "Record one serial number of a serial-tracked item in an open parcel (packing_get items[].tracking.mode serial): what the serials step of the parcel's checklist asks for, one serial per unit. A GS1 code's serial (AI 21) is taken out of it, and its GTIN must name the item. Serials are matched case-insensitively. A first capture creates the unit as packed; a unit in stock or returned is packed again. Recording the same serial again answers replayed: true. Refused as a conflict (details.code) when the item is not a serial item of the parcel (not_a_serial_item), every unit already has its serial (serial_count_exceeded), the parcel holds 1000 serials (serial_parcel_full), the unit is packed in another parcel (serial_packed_elsewhere), already shipped (serial_shipped, with the order's name) or scrapped (serial_scrapped), and once the parcel is packed. An item that records its serials at receiving packs only units in stock (serial_not_in_stock); one in stock in another warehouse is taken with a warning and its warehouse corrected. Where the warehouse confirms by scanning, a serial typed on the floor needs a lead's grant (approvalId, action serial_typed). While a serial is missing, packing_fulfill answers serials_required. Shipped with Shopify's confirmation of the fulfilment; returned to where it was when the parcel is cancelled.\n\n**Operation id:** `packing_record_serial` — the same operation is `app.packing.record_serial({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_record_serial`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "serial": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "scan",
                      "typed"
                    ],
                    "description": "\"scan\": read by a scanner or camera; \"typed\": typed by hand."
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant (serial_typed) for a typed serial where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId",
                  "variantId",
                  "serial",
                  "method"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/release-blocked-units": {
      "post": {
        "operationId": "packing_release_blocked_units",
        "summary": "packing_release_blocked_units",
        "description": "Put a parcel's units of blocked lots aside (packing_fulfill declines it as lot_blocked while it holds any): each staged slice is released with a return-to-shelf task that carries the units back to a shelf, Shopify's commitment for the order untouched, and the order is re-planned onto another lot or short. The parcel then fulfils with the rest. Answers { releasedUnits, lots }.\n\n**Operation id:** `packing_release_blocked_units` — the same operation is `app.packing.release_blocked_units({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_release_blocked_units`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "document id of the pack job.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "packJobId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/remove-serial": {
      "post": {
        "operationId": "packing_remove_serial",
        "summary": "packing_remove_serial",
        "description": "Take a recorded serial number off an open parcel (packing_get job.serials): the unit goes back to what it was before it was recorded here (in stock, returned), or is deleted when this parcel's capture created it. Refused once the parcel is packed.\n\n**Operation id:** `packing_remove_serial` — the same operation is `app.packing.remove_serial({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_remove_serial`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "serialUnitId": {
                    "type": "string",
                    "description": "A serialUnits id, e.g. \"serialUnits_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId",
                  "serialUnitId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/scan-item": {
      "post": {
        "operationId": "packing_scan_item",
        "summary": "packing_scan_item",
        "description": "Scan one item at the pack station. The code is resolved through the scan router server-side and checked against the expected set; failures come back as {ok: false, reason: \"unknown_code\"|\"not_expected\"|\"over_scan\"|\"ambiguous_code\"|\"has_code\"|\"scan_required\", verdict, code, scanCode} without changing anything — `verdict` is the floor's one scan vocabulary (unknown | wrong_target | refused | ambiguous). Send either `code` or `variantId`: an item with no usable code (none of its barcode, alias barcodes or SKU resolves to it in this parcel: it has none, or a bin or another item answers to each first) is named by its variant and counted exactly like a scan of it (the refusal's `code` is then null). An item with a usable code is never named: `variantId` for it is refused as \"has_code\", with the `scanCode` to scan or type instead. A code that is one of the parcel's inserts (packing_get orderDirectives.inserts) records it as added and answers {ok: false, reason: \"insert\", insert}; with insertsDigest, a scan of an insert whose lines changed since is refused as \"insert_changed\".\n\n**Operation id:** `packing_scan_item` — the same operation is `app.packing.scan_item({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_scan_item`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "code": {
                    "description": "Item barcode or sku.",
                    "type": "string",
                    "minLength": 1
                  },
                  "variantId": {
                    "description": "The item named instead of scanned (one with no usable code).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "insertsDigest": {
                    "description": "packing_get orderDirectives.inserts.digest, as the bench showed it.",
                    "type": "string"
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/set-package": {
      "post": {
        "operationId": "packing_set_package",
        "summary": "packing_set_package",
        "description": "Record the box and the weighed parcel weight of a pack job, with where the weight came from (weightSource scale, manual, api; absent = api over REST/MCP). The answer carries what this parcel should weigh (its own units at the catalog's unit weights, plus the box's empty weight; null when one unit has no weight) and the verdict (within/outside/unknown at 15 %), both computed by Floormode, never taken from the caller. Re-sending the same weight without a source, or with the manual or api source it already has, keeps its provenance; another source is a new measurement. Where the warehouse's plan asks a lead about an outside weight (packChecklist.weigh.offPolicy lead), an outside weight is saved and the weigh step waits for a lead (packing_get steps: waiting_lead; packing_fulfill answers weigh_required) until a caller holding floor.approve sends it, approvalId carries a lead's grant for exactly that weight, or a later weight is within. Clearing the weight does not clear the wait.\n\n**Operation id:** `packing_set_package` — the same operation is `app.packing.set_package({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_set_package`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "boxId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A boxes id, e.g. \"boxes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "weightGrams": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "weightSource": {
                    "description": "Where the weight came from; absent = manual in the app, api over REST/MCP.",
                    "type": "string",
                    "enum": [
                      "scale",
                      "manual",
                      "api"
                    ]
                  },
                  "scaleDriver": {
                    "description": "The scale's driver, with scale.",
                    "type": "string",
                    "enum": [
                      "browser_hid",
                      "printnode"
                    ]
                  },
                  "deviceLabel": {
                    "description": "The scale's name, with scale.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "readAtMs": {
                    "description": "When the scale read it (epoch ms), with scale.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "stationId": {
                    "description": "The pack station the weight was read at; ignored unless a pack station here.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "approvalId": {
                    "description": "A lead's pack_weight_off grant for exactly this weight (floor_approval_grant), where the warehouse's plan asks a lead about a weight outside the tolerance.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/shipment-discrepancies": {
      "get": {
        "operationId": "packing_shipment_discrepancies",
        "summary": "packing_shipment_discrepancies",
        "description": "List provider-confirmed parcels whose original physical shipment remains unverified for a warehouse/item pair, including exact staging sources and disposition evidence.\n\n**Operation id:** `packing_shipment_discrepancies` — the same operation is `app.packing.shipment_discrepancies({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_shipment_discrepancies`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/packing/shipment-discrepancies/dispose": {
      "post": {
        "operationId": "packing_dispose_shipment_discrepancy",
        "summary": "packing_dispose_shipment_discrepancy",
        "description": "Explicitly account for every provider-confirmed unit at its original staging source: absent or physically present at a verified destination. Records local count/move corrections without inventing SHIP or changing Shopify. Writer warehouses require whole-pair physical verification before stock synchronization resumes. Read-only warehouses complete local correction without a Shopify stock write. Both retain the order replan barrier until a correlated complete Shopify order refresh has applied.\n\n**Operation id:** `packing_dispose_shipment_discrepancy` — the same operation is `app.packing.dispose_shipment_discrepancy({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_dispose_shipment_discrepancy`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "discrepancyId": {
                    "type": "string",
                    "description": "A shipmentPhysicalDiscrepancies id, e.g. \"shipmentPhysicalDiscrepancies_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedUpdatedAtMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "physicallyVerified": {
                    "type": "boolean",
                    "const": true
                  },
                  "reviewRemainingPickedGoods": {
                    "type": "boolean"
                  },
                  "parts": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sourceBinId": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "absentQuantity": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "presentQuantity": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "destinationBinId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                              "format": "floormode-id"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "sourceBinId",
                        "absentQuantity",
                        "presentQuantity",
                        "destinationBinId"
                      ]
                    }
                  }
                },
                "required": [
                  "discrepancyId",
                  "expectedUpdatedAtMs",
                  "physicallyVerified",
                  "parts"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/shipment-discrepancies/review-other-goods": {
      "post": {
        "operationId": "packing_review_other_picked_goods",
        "summary": "packing_review_other_picked_goods",
        "description": "Prepare a physical review of a parcel's other picked goods that no review holds yet, for a parcel with an open shipment discrepancy. An exact retained parcel plan upgrades provider ownership; it changes no physical stock.\n\n**Operation id:** `packing_review_other_picked_goods` — the same operation is `app.packing.review_other_picked_goods({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_review_other_picked_goods`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/packing/time-summary": {
      "get": {
        "operationId": "packing_time_summary",
        "summary": "packing_time_summary",
        "description": "The team's pack time today, in one warehouse or every one, each warehouse on its own calendar day (its time zone, else UTC): parcels completed, the average from a parcel's first step record (a scan, a confirm, a package or a check) to the press that completed it, and the parcels that took longer than 30 minutes, which are counted but left out of the average; `capped` when more warehouses exist than one read takes, `deps` the warehouses read. The same count of parcels packed as dashboard_output and analytics_fulfillment_times. Earlier days are analytics_fulfillment_times'. Team totals only: no figure per person or per station.\n\n**Operation id:** `packing_time_summary` — the same operation is `app.packing.time_summary({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_time_summary`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "One warehouse; absent or null = every warehouse.",
            "schema": {
              "description": "One warehouse; absent or null = every warehouse.",
              "anyOf": [
                {
                  "type": "string",
                  "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                  "format": "floormode-id"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/packing/verify": {
      "post": {
        "operationId": "packing_verify",
        "summary": "packing_verify",
        "description": "Mark a pack job verified. Rejected while any expected item is not fully scanned.\n\n**Operation id:** `packing_verify` — the same operation is `app.packing.verify({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_verify`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "packing"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packJobId": {
                    "type": "string",
                    "description": "A packJobs id, e.g. \"packJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "packJobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people": {
      "get": {
        "operationId": "people_list",
        "summary": "people_list",
        "description": "List the team by name (max 100 per page, keyset cursor): one row per person, whatever they sign in with (Shopify Admin, a P&H account, a floor PIN or badge). Active people by default; status: deactivated lists the deactivated ones. attention: needs_role lists the P&H accounts WorkOS gave no Floormode role, removed the people removed from the P&H organisation. search matches part of a name, case-insensitive. The person id is what every assignee and actor field holds.\n\n**Operation id:** `people_list` — the same operation is `app.people.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deactivated"
              ]
            }
          },
          {
            "name": "attention",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "needs_role",
                "removed"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "people_add",
        "summary": "people_add",
        "description": "Add a person who signs in on the floor with a PIN or badge (no email, no account). The built-in Floor role by default; any other role needs team.roles. warehouseScope listed needs warehouses (each with its task types). The caller can only give what they hold.\n\n**Operation id:** `people_add` — the same operation is `app.people.add({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_add`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "warehouseScope": {
                    "type": "string",
                    "enum": [
                      "all",
                      "listed"
                    ]
                  },
                  "warehouses": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "warehouseId": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "canDo": {
                          "maxItems": 7,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "receive",
                              "putaway",
                              "pick",
                              "pack",
                              "count",
                              "replenish",
                              "move"
                            ]
                          }
                        }
                      },
                      "required": [
                        "warehouseId",
                        "canDo"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "warehouseScope"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/deactivate": {
      "post": {
        "operationId": "people_deactivate",
        "summary": "people_deactivate",
        "description": "Deactivate a person: every door refuses them on their next request, their floor sessions end and their PIN and badge stop working. Never oneself, never the last Admin. removeFromPlatform also removes them from the P&H organisation.\n\n**Operation id:** `people_deactivate` — the same operation is `app.people.deactivate({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_deactivate`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "removeFromPlatform": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "personId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/erase": {
      "post": {
        "operationId": "people_erase",
        "summary": "people_erase",
        "description": "Erase a deactivated person, irreversibly: their name and email disappear everywhere, their PIN, badge and invitation logins, warehouses, preferences and private views are deleted. Their Shopify and P&H login ids stay as security data and their time records until their retention ends, under a pseudonymous id.\n\n**Operation id:** `people_erase` — the same operation is `app.people.erase({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_erase`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/get": {
      "get": {
        "operationId": "people_get",
        "summary": "people_get",
        "description": "One person: name, status, where their role stands, the Floormode role or the roles their P&H account holds, whether they own the store, their warehouses and task types, their logins (kind, provider name, invitation state — never a PIN, badge or invitation link) and what the caller may do (manage, changeRole).\n\n**Operation id:** `people_get` — the same operation is `app.people.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "personId",
            "in": "query",
            "required": true,
            "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/people/invite": {
      "post": {
        "operationId": "people_invite",
        "summary": "people_invite",
        "description": "Invite someone to sign in with a P&H account, with a role and warehouses. An email that already belongs to a person attaches the invitation to them (attached: true). Needs the caller's own P&H account; a role other than Floor needs team.roles. WorkOS sends the invitation email; people_get shows its state.\n\n**Operation id:** `people_invite` — the same operation is `app.people.invite({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_invite`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "warehouseScope": {
                    "type": "string",
                    "enum": [
                      "all",
                      "listed"
                    ]
                  },
                  "warehouses": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "warehouseId": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "canDo": {
                          "maxItems": 7,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "receive",
                              "putaway",
                              "pick",
                              "pack",
                              "count",
                              "replenish",
                              "move"
                            ]
                          }
                        }
                      },
                      "required": [
                        "warehouseId",
                        "canDo"
                      ]
                    }
                  }
                },
                "required": [
                  "email",
                  "roleId",
                  "warehouseScope"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/invite/resend": {
      "post": {
        "operationId": "people_invite_resend",
        "summary": "people_invite_resend",
        "description": "Send a person's P&H invitation again (a stuck, failed or expired one). WorkOS adopts an invitation it already holds for the email instead of sending a second one.\n\n**Operation id:** `people_invite_resend` — the same operation is `app.people.invite_resend({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_invite_resend`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/invite/revoke": {
      "post": {
        "operationId": "people_invite_revoke",
        "summary": "people_invite_revoke",
        "description": "Withdraw a person's open P&H invitation. The person and their other logins stay.\n\n**Operation id:** `people_invite_revoke` — the same operation is `app.people.invite_revoke({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_invite_revoke`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/me": {
      "get": {
        "operationId": "people_me",
        "summary": "people_me",
        "description": "Who the caller is: selfId (the id their own tasks, views and preferences carry), their person (null before their first change is recorded), the roles their access comes from, the permissions they hold right now, the session kind (desk, floor device, kiosk) with the floor device's warehouse and task types, and their warehouse scope. An agent never holds more than the person who connected it.\n\n**Operation id:** `people_me` — the same operation is `app.people.me({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_me`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/people/merge": {
      "post": {
        "operationId": "people_merge",
        "summary": "people_merge",
        "description": "Merge two people into one, irreversibly (linking a Shopify person with a P&H person is a merge). The survivor keeps its id and name; logins, warehouses, preferences, saved views and open work move to it. roleSource keep keeps roleId (written to WorkOS for a P&H person), platform uses the role the P&H membership holds. Needs team.people and team.roles and covering both people's access; never leaves the team without an Admin.\n\n**Operation id:** `people_merge` — the same operation is `app.people.merge({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_merge`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "survivorId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "mergedId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "roleSource": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "platform"
                    ]
                  },
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "survivorId",
                  "mergedId",
                  "roleSource"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/notice/acknowledge": {
      "post": {
        "operationId": "people_notice_acknowledge",
        "summary": "people_notice_acknowledge",
        "description": "Acknowledge the co-determination and data-protection notice as an Admin: the banner goes away for everyone.\n\n**Operation id:** `people_notice_acknowledge` — the same operation is `app.people.notice_acknowledge({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_notice_acknowledge`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/notice/record": {
      "post": {
        "operationId": "people_notice_record",
        "summary": "people_notice_record",
        "description": "Acknowledge the co-determination and data-protection notice when switching on a people or labour feature for the first time (the first floor device, the time clock, the first shift pattern, the Today board, per-person output, day plans). The first call is kept; unless the caller is an Admin, every Admin then sees a banner until one acknowledges.\n\n**Operation id:** `people_notice_record` — the same operation is `app.people.notice_record({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_notice_record`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "floor_device",
                      "time_clock",
                      "shift_pattern",
                      "today_board",
                      "output",
                      "day_plans"
                    ]
                  }
                },
                "required": [
                  "trigger"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/platform-refresh": {
      "post": {
        "operationId": "people_requestPlatformRefresh",
        "summary": "people_requestPlatformRefresh",
        "description": "Ask Floormode to re-read the roles and memberships of the P&H account: at once while the built-in roles were never written there, else at most once per five minutes.\n\n**Operation id:** `people_requestPlatformRefresh` — the same operation is `app.people.requestPlatformRefresh({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_requestPlatformRefresh`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/reactivate": {
      "post": {
        "operationId": "people_reactivate",
        "summary": "people_reactivate",
        "description": "Reactivate a deactivated person, within the caller's own access.\n\n**Operation id:** `people_reactivate` — the same operation is `app.people.reactivate({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_reactivate`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/role": {
      "post": {
        "operationId": "people_set_role",
        "summary": "people_set_role",
        "description": "Give a person a role. Needs team.roles and the caller's own P&H account; the role and the person's current access must be within the caller's; never the caller's own role and never the last Admin's. For a person signing in with a P&H account the role is written to WorkOS (pending: true) and they keep only what both roles allow until it confirms.\n\n**Operation id:** `people_set_role` — the same operation is `app.people.set_role({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_set_role`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId",
                  "expectedRevision",
                  "roleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/settings": {
      "get": {
        "operationId": "people_settings_get",
        "summary": "people_settings_get",
        "description": "The team defaults: the default staff role (null = derived: Admin when every store is a development store, else Manager), PIN length, badge mode, the floor idle lock, the labour limits, the per-person output window and rankings, the time record retention, day plans, targets and `dayPlanRetentionDays` (a month, a quarter or a year): plans and team targets stay at least that long past their day and up to 28 days more, since they age from when they were written (at most 28 days ahead), and the notice acknowledgements.\n\n**Operation id:** `people_settings_get` — the same operation is `app.people.settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/people/settings/default-role": {
      "post": {
        "operationId": "people_settings_update_default_role",
        "summary": "people_settings_update_default_role",
        "description": "Change the role Shopify staff without one get (team.roles and the caller's own P&H account; a role within the caller's own). null restores the derived default.\n\n**Operation id:** `people_settings_update_default_role` — the same operation is `app.people.settings_update_default_role({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_settings_update_default_role`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "defaultStaffRoleId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "expectedRevision",
                  "defaultStaffRoleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/settings/labour": {
      "post": {
        "operationId": "people_settings_update_labour",
        "summary": "people_settings_update_labour",
        "description": "Change the labour limits: the presence timeout and shift ceiling (labour.shifts), the per-person output window (labour.productivity; above 14 days also team.roles), rankings (labour.productivity and team.roles), the time record retention (labour.timesheets and team.roles), day plans and `dayPlanRetentionDays` (labour.shifts: plans and team targets stay at least that long past their day and up to 28 days more, aged from when they were written), and targets on the day plan (labour.productivity; switching them on also needs team.roles, the Elevate plan, day plans on, an output window above 0 and `confirmNotice: true`, the stronger notice confirmed in the same write — refused with plan_required, output_disabled, day_plans_off or notice_required). Per-person counts are kept only while targets are on, only for people planned for picking or packing that day, and leave after 2 days.\n\n**Operation id:** `people_settings_update_labour` — the same operation is `app.people.settings_update_labour({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_settings_update_labour`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "presenceTimeoutMs": {
                    "type": "integer",
                    "minimum": 60000,
                    "maximum": 86400000
                  },
                  "maxShiftMs": {
                    "type": "integer",
                    "minimum": 3600000,
                    "maximum": 86400000
                  },
                  "personOutputWindowDays": {
                    "type": "number",
                    "enum": [
                      0,
                      7,
                      14,
                      30,
                      90
                    ]
                  },
                  "rankingsEnabled": {
                    "type": "boolean"
                  },
                  "timeRecordRetentionMonths": {
                    "type": "integer",
                    "minimum": 3,
                    "maximum": 24
                  },
                  "dayPlansEnabled": {
                    "type": "boolean"
                  },
                  "dayPlanRetentionDays": {
                    "type": "number",
                    "enum": [
                      30,
                      90,
                      365
                    ]
                  },
                  "targetsEnabled": {
                    "type": "boolean"
                  },
                  "confirmNotice": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/settings/team": {
      "post": {
        "operationId": "people_settings_update_team",
        "summary": "people_settings_update_team",
        "description": "Change the PIN length and badge mode (team.people) and the floor idle lock default (team.devices).\n\n**Operation id:** `people_settings_update_team` — the same operation is `app.people.settings_update_team({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_settings_update_team`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "pinLength": {
                    "type": "integer",
                    "minimum": 4,
                    "maximum": 8
                  },
                  "badgeMode": {
                    "type": "string",
                    "enum": [
                      "badge_only",
                      "badge_and_pin"
                    ]
                  },
                  "idleLockDefaultMs": {
                    "type": "integer",
                    "minimum": 120000,
                    "maximum": 3600000
                  }
                },
                "required": [
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/unlink": {
      "post": {
        "operationId": "people_unlink",
        "summary": "people_unlink",
        "description": "Move one Shopify or P&H login off a person onto a new, deactivated person named after it. Never the caller's own login.\n\n**Operation id:** `people_unlink` — the same operation is `app.people.unlink({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_unlink`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "loginId": {
                    "type": "string",
                    "description": "A teamLogins id, e.g. \"teamLogins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "personId",
                  "loginId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/people/update": {
      "post": {
        "operationId": "people_update",
        "summary": "people_update",
        "description": "Edit a person: name, contact email, warehouseScope and the warehouses with their task types. Never the caller's own warehouses; only warehouses and task types the caller holds. expectedRevision is the revision people_get returned.\n\n**Operation id:** `people_update` — the same operation is `app.people.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/people_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "people"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personId": {
                    "type": "string",
                    "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "warehouseScope": {
                    "type": "string",
                    "enum": [
                      "all",
                      "listed"
                    ]
                  },
                  "warehouses": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "warehouseId": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "canDo": {
                          "maxItems": 7,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "receive",
                              "putaway",
                              "pick",
                              "pack",
                              "count",
                              "replenish",
                              "move"
                            ]
                          }
                        }
                      },
                      "required": [
                        "warehouseId",
                        "canDo"
                      ]
                    }
                  }
                },
                "required": [
                  "personId",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches": {
      "get": {
        "operationId": "picking_list_batches",
        "summary": "picking_list_batches",
        "description": "List pick batches, in the chosen order (`sort`; newest first by default), one page, with line and unit progress. Filter by `statuses` (open, picking, picked, cancelled), warehouse, `sources` or the pick profile a batch was cut for (`profileId`, before the page window). `sources` (any of these) is the one that matters for finding SIBLING work: `assemblified_wo` returns the component batches cut for an Assemblified work order (their `sourceRef` carries the work order, and `production_pipeline` joins them to its head and its finished-goods receipt), `logistified_mo` those of a Logistified manufacturing order (its key is `logistified_mo:<id>`), [\"assemblified_wo\", \"logistified_mo\"] both, `shopify_fo` returns customer-order picks. It is applied BEFORE the page window, so it is how a component batch stays reachable in a shop that mostly picks Shopify orders — filtering after the cap could not find one at all. zoneId keeps batches with at least one live line in that zone (a batch interleaves several orders, so it has no zone of its own); stationId narrows to the station's warehouse. Both are applied to the page window. Every row carries `claim` (mine | unclaimed | other) relative to the caller; `assignment: \"mine\"` keeps only the batches the caller may walk (theirs or nobody's) — the Floor Mode home's view. `openCount` is the batches on the floor (open or picking) of the list's warehouse and, when `sources` is named, of those sources only; it is null on an `assignment: \"mine\"` list. Each row counts the fulfillment orders it picks for (`orderCount`); their ids and the cart's totes are on `picking_get_batch`.\n\n**Operation id:** `picking_list_batches` — the same operation is `app.picking.list_batches({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_list_batches`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `statuses` for each value (`?statuses=open&statuses=picking`), or pass a JSON array (`?statuses=[\"open\",\"picking\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "open",
              "picking"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "picking",
                  "picked",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Any of these, e.g. [\"assemblified_wo\", \"logistified_mo\"] (production picks): shopify_fo (customer orders), assemblified_wo (Assemblified work orders), logistified_mo (Logistified manufacturing orders); absent = all. Repeat `sources` for each value (`?sources=assemblified_wo&sources=logistified_mo`), or pass a JSON array (`?sources=[\"assemblified_wo\",\"logistified_mo\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "assemblified_wo",
              "logistified_mo"
            ],
            "schema": {
              "description": "Any of these, e.g. [\"assemblified_wo\", \"logistified_mo\"] (production picks): shopify_fo (customer orders), assemblified_wo (Assemblified work orders), logistified_mo (Logistified manufacturing orders); absent = all.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "shopify_fo",
                  "assemblified_wo",
                  "logistified_mo"
                ]
              }
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Batches with live lines in this zone.",
            "schema": {
              "description": "Batches with live lines in this zone.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "description": "Only the batches cut by (or for) this pick profile.",
            "schema": {
              "description": "Only the batches cut by (or for) this pick profile.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "assignment",
            "in": "query",
            "required": false,
            "description": "mine = the caller's or unclaimed batches; all = every batch.",
            "schema": {
              "description": "mine = the caller's or unclaimed batches; all = every batch.",
              "type": "string",
              "enum": [
                "mine",
                "all"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "picking_create_batch",
        "summary": "picking_create_batch",
        "description": "Create a pick batch (max 20 fulfillment orders). Pass foDocIds for an explicit selection or leave it out to take the queue, oldest ready order first. `profileId` cuts for a live pick profile (the Elevate plan, `plan_required` below it): the queue path takes only its orders, an explicit selection returns the orders it does not take in `skipped`, its method and order count are the defaults, and the batch records the profile. A batch takes at most `max` orders (default: the profile's order count, else 20); an explicit selection with more ready orders is refused as a conflict (`selection_too_large`), never cut short. Before the queue path reads its orders it re-plans up to ten of the warehouse's stale reservations (an expired lot, a bin no longer allocatable), so a batch never takes stock allocation would refuse today. Breaking since 2026-10-12: `filter` is removed and the input is strict — a call still sending `filter: \"singles\"` is refused as invalid_input; create a pick profile from the Singles template (units = 1) and pass its profileId. The lines of all fulfillment orders are interleaved and sorted by bin pick sequence, and the allocations move to `picking` — from then on the batch owns their reservations. Fulfillment orders that are not pickable are returned in `skipped` instead of failing the call, and eligible ones that did not fit the batch's pick-line budget come back in `deferred` — untouched, still queued, cut a second batch for them. Orders the plan allowance refuses to release come back in `admissionBlocked` — deferred, still queued, recorded on the order (`order_admission_blocked`) — and `requiredPlan` names the plan to confirm. When the allowance refuses EVERY candidate the call still answers: `pickBatchId` and `shortId` are null, nothing is batched, and the refusal records on the orders are kept — a plan refusal is an answer, not an error (A2-0053). `method: \"cluster\"` numbers a cart slot per order (WMS-045) so one walk fills several parcels — and it is the one argument here behind a PLAN GATE: cluster picking requires the Enhanced tier and is refused as `forbidden` (`plan_required`) below it, while the default `method: \"batch\"` is available on every plan. The gate is conditional on that value, which is why this operation carries no catalog-level minPlan.\n\n**Operation id:** `picking_create_batch` — the same operation is `app.picking.create_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_create_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "foDocIds": {
                    "description": "An explicit selection; absent = the oldest ready orders of the queue.",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "profileId": {
                    "description": "Only the orders this live pick profile takes, oldest first; a selection skips the rest. Its method and order count are the defaults (Elevate).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "max": {
                    "description": "Orders per batch: defaults to the profile's order count, else 20. A selection with more ready orders is refused (selection_too_large), never cut short.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "pickerId": {
                    "description": "The person (people_list) who picks it; omitted or null puts it in the pool.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "method": {
                    "description": "cluster assigns each order a cart slot and REQUIRES the Enhanced plan (403 `plan_required` below it); the default single/batch is available on every plan.",
                    "type": "string",
                    "enum": [
                      "batch",
                      "cluster"
                    ]
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "warehouseId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/cancel": {
      "post": {
        "operationId": "picking_cancel_batch",
        "summary": "picking_cancel_batch",
        "description": "Cancel an UNTOUCHED order pick batch (fulfillment.assign): nothing picked, nothing staged. Its pending lines are cancelled, its orders go back to the pick queue with the reservations they held, and the batch closes as cancelled. A batch with picked or staged units is refused (batch_started) — cancel or finish its orders instead. A component batch is cancelled through picking_cancel_component_batch. Cancelling a cancelled batch answers it again.\n\n**Operation id:** `picking_cancel_batch` — the same operation is `app.picking.cancel_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_cancel_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 400
                  }
                },
                "required": [
                  "pickBatchId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/cancel-component": {
      "post": {
        "operationId": "picking_cancel_component_batch",
        "summary": "picking_cancel_component_batch",
        "description": "Cancel an Assemblified component pick batch from the floor (contracts 1.2.0). An UNTOUCHED batch (open, nothing staged) is cancelled outright; a batch with picks in it is FLAGGED instead — it keeps its status and gains an unresolved cancel request, because units are sitting in the work-order staging bin and somebody has to walk them back (picking_resolve_cancelled_component_batch). Reports wo_pick_status: cancelled to Assemblified only when that peer has been observed on contracts 1.2 — below it the value would be rejected outright, so nothing is sent. Cancelling an already-cancelled batch is a no-op.\n\n**Operation id:** `picking_cancel_component_batch` — the same operation is `app.picking.cancel_component_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_cancel_component_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 400
                  }
                },
                "required": [
                  "pickBatchId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/complete": {
      "post": {
        "operationId": "picking_complete_batch",
        "summary": "picking_complete_batch",
        "description": "Close a pick batch once no line is pending any more and create the pack job of every fulfillment order that has picked goods. `shortLines` counts the lines that were picked short.\n\n**Operation id:** `picking_complete_batch` — the same operation is `app.picking.complete_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_complete_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "pickBatchId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/complete-component": {
      "post": {
        "operationId": "picking_complete_component_batch",
        "summary": "picking_complete_component_batch",
        "description": "Close an Assemblified component pick batch once every pickable line is resolved and report wo_pick_status (staged/short) back to the work order (INT-020). Virtual and unmapped lines never block completion. `switchedOff` is true while the Assemblified connection is switched off: nothing is sent, now or later.\n\n**Operation id:** `picking_complete_component_batch` — the same operation is `app.picking.complete_component_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_complete_component_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "pickBatchId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/confirm-as-listed": {
      "post": {
        "operationId": "picking_confirm_as_listed",
        "summary": "picking_confirm_as_listed",
        "description": "Books a pick batch walked from its printed list (roadmap C2c) where the warehouse's paperPickRecord policy is on (else conflict paper_record_off). The call books the shorts and the first lines in one transaction and answers them; a longer list's rest (`booking`: its lines and units) books in the background, a few lines a transaction, so the floor's scans run between them, and the batch completes once it is booked (conflict paper_record_booking while a list of the batch is still booking). Every line still to pick books its open quantity minus the `shorts` the caller lists (at most the line's open quantity, else invalid_input): the units move into the staging bin with their reservation exactly as a floor pick's, each line's control event records confirm paper, and a short takes the floor's short path, which may re-allocate the missing units to other bins: those `replacementLines` keep the batch open. A line whose bin a person blocked, archived or took off sale since the list was cut is judged over the whole list before anything books: it books nothing (its short neither), stays to pick, and is named in `refusedLines`. With nothing left the batch completes and its pack jobs are created; its pick time is never measured (paper). The booking is the batch's picker's: `pickedBy` must be that picker, or, for a batch nobody holds, a person it is assigned to first (needs fulfillment.assign); the batch's timeline records who walked it and who booked it. Component batches are refused. Bound to `requestKey`: a retry answers the first result and books nothing twice; a crash between parts resumes. Irreversible.\n\n**Operation id:** `picking_confirm_as_listed` — the same operation is `app.picking.confirm_as_listed({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_confirm_as_listed`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shorts": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "pickLineId": {
                          "type": "string",
                          "description": "A pickLines id, e.g. \"pickLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "qty": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "pickLineId",
                        "qty"
                      ]
                    },
                    "description": "The units the list says were missing, per pending line; [] for none."
                  },
                  "pickedBy": {
                    "description": "The person who walked the list (a team member id); omitted: the batch's picker.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "One per submit, kept across retries."
                  }
                },
                "required": [
                  "pickBatchId",
                  "shorts",
                  "requestKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/get": {
      "get": {
        "operationId": "picking_get_batch",
        "summary": "picking_get_batch",
        "description": "Get one pick batch with its lines in walk order (bin pick sequence) and the code of the packing staging bin the picks go to.\n\n**Operation id:** `picking_get_batch` — the same operation is `app.picking.get_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_get_batch`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "pickBatchId",
            "in": "query",
            "required": true,
            "description": "document id of the pick batch.",
            "schema": {
              "type": "string",
              "description": "document id of the pick batch.",
              "format": "floormode-id"
            }
          },
          {
            "name": "desk",
            "in": "query",
            "required": false,
            "description": "Also answer confirmSummary and pickerName, which a floor screen never shows. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also answer confirmSummary and pickerName, which a floor screen never shows.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/batches/hand-over": {
      "post": {
        "operationId": "picking_hand_over",
        "summary": "picking_hand_over",
        "description": "Hand over your own started pick list (WMS BN-02), its progress kept: `pool` puts it back for the next picker, whose first booking takes it; `person` gives it to a picker of the warehouse (`personId`, from work_assignable_people); `packing` sends the orders picked whole on to packing and leaves the rest as a new list in the pool. No stock or reservation moves. `reason` is optional and goes on the list's timeline. A warehouse that gates handover_started (off by default) takes a lead's approvalId.\n\n**Operation id:** `picking_hand_over` — the same operation is `app.picking.hand_over({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_hand_over`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "pool",
                      "person",
                      "packing"
                    ]
                  },
                  "personId": {
                    "description": "`person` only: who takes the list on.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "break",
                      "shift_end",
                      "device",
                      "blocked_aisle"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for handover_started, where the warehouse gates it.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "One per handover, kept across retries: a lost answer is answered again.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "pickBatchId",
                  "mode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/batches/resolve-cancelled-component": {
      "post": {
        "operationId": "picking_resolve_cancelled_component_batch",
        "summary": "picking_resolve_cancelled_component_batch",
        "description": "Return ALL the goods a cancelled work order left at the workbench to stock and close its batch (contracts 1.2.0; since 3.3.0 the desk's Return all of the confirmed floor return). Every lot a line still owes goes back to the bin most of it was picked from, as picking_return_cancelled_components books it; a lot with no recorded source bin stays owed (`strandedUnits`). Fails when the batch carries no cancel request or was already resolved.\n\n**Operation id:** `picking_resolve_cancelled_component_batch` — the same operation is `app.picking.resolve_cancelled_component_batch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_resolve_cancelled_component_batch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "pickBatchId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/carts": {
      "get": {
        "operationId": "carts_list",
        "summary": "carts_list",
        "description": "A warehouse's live carts and totes with a code (WMS BN-22), in code order: code, kind (`cart`: one order per slot, its slots labelled `{code}-01` …; `tote`: one container for a batch pick), slots, batch size (the orders a list cut onto it takes), revision, and the list it carries now or carried last with its status. `cartIds` names carts instead (a label sheet). At most 100 per warehouse.\n\n**Operation id:** `carts_list` — the same operation is `app.carts.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carts_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cartIds",
            "in": "query",
            "required": false,
            "description": "A carts id, e.g. \"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `cartIds` for each value (`?cartIds=carts_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?cartIds=[\"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "carts_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "minItems": 1,
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A carts id, e.g. \"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "carts_save",
        "summary": "carts_save",
        "description": "Create a cart or tote (no `cartId`), or edit one at the `expectedRevision` it was read at (revision_mismatch otherwise). A code is 3 to 16 letters, digits and hyphens, stored in capitals; it and every slot code must be free in the warehouse: no other cart, cart slot, bin, item, pick list or packing slip answers to it (cart_code_taken). A cart's batch size is at most its slots; a tote has one container and takes up to 20 orders. Code, kind and slots change only while the cart is free (cart_in_use); the batch size any time. A cart needs the Enhanced plan (cluster picking); a tote every plan.\n\n**Operation id:** `carts_save` — the same operation is `app.carts.save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carts_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "cartId": {
                    "type": "string",
                    "description": "A carts id, e.g. \"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "cart",
                      "tote"
                    ]
                  },
                  "slotCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "batchSize": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  }
                },
                "required": [
                  "warehouseId",
                  "code",
                  "kind",
                  "slotCount",
                  "batchSize"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/carts/archive": {
      "post": {
        "operationId": "carts_archive",
        "summary": "carts_archive",
        "description": "Archive a free cart or tote: its code is free again, the pick lists cut onto it keep naming it. Refused while it carries a list being picked or goods waiting at packing (cart_in_use). Available on every plan.\n\n**Operation id:** `carts_archive` — the same operation is `app.carts.archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carts_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cartId": {
                    "type": "string",
                    "description": "A carts id, e.g. \"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "cartId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/carts/release": {
      "post": {
        "operationId": "carts_release",
        "summary": "carts_release",
        "description": "Mark a cart or tote empty: it carries nothing from now on, so the next scan starts a new list on it. For a picked list whose held goods were taken off the cart; refused while its list is still being picked (cart_in_use).\n\n**Operation id:** `carts_release` — the same operation is `app.carts.release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/carts_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cartId": {
                    "type": "string",
                    "description": "A carts id, e.g. \"carts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "cartId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/component-returns": {
      "get": {
        "operationId": "picking_component_returns",
        "summary": "picking_component_returns",
        "description": "Floor › Returns to shelf (contracts 3.3.0): the cancelled work orders of a warehouse whose components are still at the workbench. Per batch the work order, the reason, the units still owed and those already returned or scrapped; per line and lot the item, its working unit, the lot and best-before, the base-unit quantity owed and the source bin the return is pre-filled with. Up to 25 batches, oldest first; `capped` when more owe. With `pickBatchId` instead of `warehouseId`, that one batch (none once nothing is owed).\n\n**Operation id:** `picking_component_returns` — the same operation is `app.picking.component_returns({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_component_returns`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "pickBatchId",
            "in": "query",
            "required": false,
            "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "picking_return_cancelled_components",
        "summary": "picking_return_cancelled_components",
        "description": "One floor action of the confirmed return of a cancelled work order (contracts 3.3.0): `qty` base units of one line and lot leave the workbench for a shelf (`disposition` shelf: the scanned `binCode`, or the source bin; the bin's capacity and mix rules apply), the hospital bin HOSP-01 (scrap) or QUAR-01 (quarantine); scrap and quarantine need a `reason`. SIDE EFFECTS: one stock movement out of WO-STAGE-01, the batch's return counters and timeline, and `wo_pick_status` cancelled with `returns` to a wo-sync-v1 Assemblified; the last unit resolves the cancel and closes the batch. Refusals: `return_more_than_owed`, `return_bin_unknown`, `return_bin_not_shelf`, `return_not_owed`. `idempotencyKey` (one per action, kept across retries) answers a retry `replayed: true` and moves nothing twice.\n\n**Operation id:** `picking_return_cancelled_components` — the same operation is `app.picking.return_cancelled_components({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_return_cancelled_components`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "pickLineId": {
                    "type": "string",
                    "description": "A pickLines id, e.g. \"pickLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lotId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "qty": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "disposition": {
                    "type": "string",
                    "enum": [
                      "shelf",
                      "scrap",
                      "quarantine"
                    ]
                  },
                  "binCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  }
                },
                "required": [
                  "pickBatchId",
                  "pickLineId",
                  "lotId",
                  "qty",
                  "disposition",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/component-stage-bin": {
      "get": {
        "operationId": "picking_component_stage_bin",
        "summary": "picking_component_stage_bin",
        "description": "Code of the work-order staging bin component picks go to for a warehouse (INT-020), or null if none has been created yet.\n\n**Operation id:** `picking_component_stage_bin` — the same operation is `app.picking.component_stage_bin({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_component_stage_bin`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/destination-station": {
      "post": {
        "operationId": "picking_set_destination_station",
        "summary": "picking_set_destination_station",
        "description": "Set an open pick batch's packing or production destination station. Compare-and-set prevents stale edits; stock and completed picks are unchanged.\n\n**Operation id:** `picking_set_destination_station` — the same operation is `app.picking.set_destination_station({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_set_destination_station`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickBatchId": {
                    "type": "string",
                    "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "stationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedStationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "pickBatchId",
                  "stationId",
                  "expectedStationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/profiles": {
      "get": {
        "operationId": "pick_profiles_list",
        "summary": "pick_profiles_list",
        "description": "A warehouse's pick profiles — which ready orders a picker takes and how they are batched — in tile order: name, rule, method, orders per batch, revision, and each live profile's exact `readyCount` (the orders ready for it now, the same count picking_queue with its profileId answers; null while a tag condition waits for order tags to be prepared after an update). `includeArchived` adds the newest 50 archived profiles after the live ones. Below the Elevate plan the rows still answer, with `gated: true` and no counts.\n\n**Operation id:** `pick_profiles_list` — the same operation is `app.pick.profiles_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "description": "Also list archived profiles (the newest 50), after the live ones. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also list archived profiles (the newest 50), after the live ones.",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "pick_profiles_create",
        "summary": "pick_profiles_create",
        "description": "Create a pick profile at the end of the warehouse's tiles: a name unique among its live profiles (a name_taken conflict), a rule (conditions over tag, lines and units to pick, destination country, delivery method, priority and SKU; values are normalised — countries to ISO codes, counts to whole numbers), a method and the orders per batch (single takes one). At most 12 live profiles per warehouse (a too_many_profiles conflict). A cluster profile requires the Enhanced plan; profiles require Elevate.\n\n**Operation id:** `pick_profiles_create` — the same operation is `app.pick.profiles_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `pick_profiles`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "1–60 characters; unique among the warehouse's live profiles."
                  },
                  "rule": {
                    "type": "object",
                    "properties": {
                      "v": {
                        "type": "number",
                        "const": 1
                      },
                      "matchAll": {
                        "type": "boolean",
                        "description": "true: every condition must hold; false: any one."
                      },
                      "conditions": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "enum": [
                                "tag",
                                "lineCount",
                                "units",
                                "destinationCountry",
                                "deliveryMethod",
                                "priority",
                                "sku"
                              ]
                            },
                            "op": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "contains",
                                "gt",
                                "lt",
                                "in"
                              ]
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            }
                          },
                          "required": [
                            "field",
                            "op",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "description": "At most 10. Fields and their operators: tag (in, neq = has none of, eq, contains), lineCount and units (eq, lt, gt: the lines and units to pick), destinationCountry (eq, neq, in; ISO codes or names), deliveryMethod (eq, in), priority (eq, in) and sku (eq, in, contains). A list value is comma-separated, at most 50 values."
                      }
                    },
                    "required": [
                      "v",
                      "matchAll",
                      "conditions"
                    ],
                    "additionalProperties": false
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "single",
                      "batch",
                      "cluster"
                    ],
                    "description": "single (one order a batch), batch, or cluster (a cart slot per order)."
                  },
                  "maxOrders": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Orders per batch, 1–20; a single profile takes 1."
                  }
                },
                "required": [
                  "warehouseId",
                  "name",
                  "rule",
                  "method",
                  "maxOrders"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/profiles/archive": {
      "post": {
        "operationId": "pick_profiles_archive",
        "summary": "pick_profiles_archive",
        "description": "Archive a pick profile: its tile leaves the floor, its name is free again and the other tiles close the gap. Batches and picker defaults keep naming it; it can be restored. Available on every plan, so a downgraded shop can retire a profile.\n\n**Operation id:** `pick_profiles_archive` — the same operation is `app.pick.profiles_archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "profileId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/profiles/preview": {
      "post": {
        "operationId": "pick_profiles_preview",
        "summary": "pick_profiles_preview",
        "description": "What an unsaved pick profile rule would take now: the exact count of ready orders it matches in the warehouse and the oldest three of them. Reads only; requires the Elevate plan.\n\n**Operation id:** `pick_profiles_preview` — the same operation is `app.pick.profiles_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** `elevate` (feature `pick_profiles`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "rule": {
                    "type": "object",
                    "properties": {
                      "v": {
                        "type": "number",
                        "const": 1
                      },
                      "matchAll": {
                        "type": "boolean",
                        "description": "true: every condition must hold; false: any one."
                      },
                      "conditions": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "enum": [
                                "tag",
                                "lineCount",
                                "units",
                                "destinationCountry",
                                "deliveryMethod",
                                "priority",
                                "sku"
                              ]
                            },
                            "op": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "contains",
                                "gt",
                                "lt",
                                "in"
                              ]
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            }
                          },
                          "required": [
                            "field",
                            "op",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "description": "At most 10. Fields and their operators: tag (in, neq = has none of, eq, contains), lineCount and units (eq, lt, gt: the lines and units to pick), destinationCountry (eq, neq, in; ISO codes or names), deliveryMethod (eq, in), priority (eq, in) and sku (eq, in, contains). A list value is comma-separated, at most 50 values."
                      }
                    },
                    "required": [
                      "v",
                      "matchAll",
                      "conditions"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "warehouseId",
                  "rule"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/profiles/reorder": {
      "post": {
        "operationId": "pick_profiles_reorder",
        "summary": "pick_profiles_reorder",
        "description": "Put a warehouse's live pick profiles in a new tile order. `profileIds` names every live profile exactly once; a list from a stale screen is refused as a conflict.\n\n**Operation id:** `pick_profiles_reorder` — the same operation is `app.pick.profiles_reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `pick_profiles`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "profileIds": {
                    "minItems": 1,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "Every live profile of the warehouse, in the new order."
                  }
                },
                "required": [
                  "warehouseId",
                  "profileIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/profiles/restore": {
      "post": {
        "operationId": "pick_profiles_restore",
        "summary": "pick_profiles_restore",
        "description": "Restore an archived pick profile to the end of the tiles, if no live profile took its name (a name_taken conflict) and the warehouse has room (too_many_profiles).\n\n**Operation id:** `pick_profiles_restore` — the same operation is `app.pick.profiles_restore({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_restore`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `pick_profiles`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "profileId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/profiles/update": {
      "post": {
        "operationId": "pick_profiles_update",
        "summary": "pick_profiles_update",
        "description": "Replace a live pick profile's name, rule and recipe. Pass the revision the edit started from; a profile saved since answers revision_mismatch and changes nothing. Batches already cut keep their orders.\n\n**Operation id:** `pick_profiles_update` — the same operation is `app.pick.profiles_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pick_profiles_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `pick_profiles`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "The revision the edit started from; a newer one answers revision_mismatch."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "1–60 characters; unique among the warehouse's live profiles."
                  },
                  "rule": {
                    "type": "object",
                    "properties": {
                      "v": {
                        "type": "number",
                        "const": 1
                      },
                      "matchAll": {
                        "type": "boolean",
                        "description": "true: every condition must hold; false: any one."
                      },
                      "conditions": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "enum": [
                                "tag",
                                "lineCount",
                                "units",
                                "destinationCountry",
                                "deliveryMethod",
                                "priority",
                                "sku"
                              ]
                            },
                            "op": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "contains",
                                "gt",
                                "lt",
                                "in"
                              ]
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            }
                          },
                          "required": [
                            "field",
                            "op",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "description": "At most 10. Fields and their operators: tag (in, neq = has none of, eq, contains), lineCount and units (eq, lt, gt: the lines and units to pick), destinationCountry (eq, neq, in; ISO codes or names), deliveryMethod (eq, in), priority (eq, in) and sku (eq, in, contains). A list value is comma-separated, at most 50 values."
                      }
                    },
                    "required": [
                      "v",
                      "matchAll",
                      "conditions"
                    ],
                    "additionalProperties": false
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "single",
                      "batch",
                      "cluster"
                    ],
                    "description": "single (one order a batch), batch, or cluster (a cart slot per order)."
                  },
                  "maxOrders": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Orders per batch, 1–20; a single profile takes 1."
                  }
                },
                "required": [
                  "profileId",
                  "expectedRevision",
                  "name",
                  "rule",
                  "method",
                  "maxOrders"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/queue": {
      "get": {
        "operationId": "picking_queue",
        "summary": "picking_queue",
        "description": "Fulfillment orders ready to be picked: fully allocated (nothing short), not held, not already in a pick batch, a disclosed page at a time (`rows`/`capped`/`cursor`, max 100) oldest allocation first (`allocated:asc`, the default) or newest first. Each row carries the units, the number of bins to visit, whether it is a single (one line, one unit), when it became ready (`createdAt`) and its open pick task when the labour layer raised one. Filters are server predicates: `singles`, `assignment` (`mine` = the caller's open pick task, `unassigned` = nobody's), `lateOnly` (ready for more than a day), `zoneId` (an allocated line in that zone), `stationId` (the station's warehouse), `profileId` (the orders a live pick profile takes; the Elevate plan, `plan_required` below it; a profile's empty page carries no `emptyReasons`, which count the warehouse: ask picking_queue_exclusions({ warehouseId })). An order whose reservation went stale (an expired lot, a bin no longer allocatable) is not ready until a cut re-plans it (see picking_queue_exclusions). How many are ready is picking_queue_counts (`readyCount`, the scope's exact total). Breaking since 2026-10-06: the former single-valued filter argument is refused; pass `singles: true`. Each row's `dueAt` / `dueKind` / `packDay`: due = the end of the pack day (the warehouse's packing day before the customer's requested delivery day, in the warehouse's time zone) for work at a warehouse with a requested delivery date while delivery dates are on, else Shopify's fulfil-by (`fulfillBy` stays Shopify's raw promise).\n\n**Operation id:** `picking_queue` — the same operation is `app.picking.queue({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_queue`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Only this warehouse's queue; absent = every warehouse.",
            "schema": {
              "description": "Only this warehouse's queue; absent = every warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Only orders with a line in this zone.",
            "schema": {
              "description": "Only orders with a line in this zone.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "singles",
            "in": "query",
            "required": false,
            "description": "Only single-item orders (one line, one unit). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only single-item orders (one line, one unit).",
              "type": "boolean"
            }
          },
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "description": "Only the orders this live pick profile takes; requires the Elevate plan (`plan_required` below it).",
            "schema": {
              "description": "Only the orders this live pick profile takes; requires the Elevate plan (`plan_required` below it).",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "assignment",
            "in": "query",
            "required": false,
            "description": "`mine` = orders whose open pick task is the caller's; `unassigned` = nobody's.",
            "schema": {
              "description": "`mine` = orders whose open pick task is the caller's; `unassigned` = nobody's.",
              "type": "string",
              "enum": [
                "mine",
                "unassigned"
              ]
            }
          },
          {
            "name": "lateOnly",
            "in": "query",
            "required": false,
            "description": "Only orders ready for longer than a day (the home card's late threshold). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only orders ready for longer than a day (the home card's late threshold).",
              "type": "boolean"
            }
          },
          {
            "name": "shipsToday",
            "in": "query",
            "required": false,
            "description": "Only orders for today's or a missed collection (where times are set). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only orders for today's or a missed collection (where times are set).",
              "type": "boolean"
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`allocated:asc` (oldest first), `allocated:desc`, or `shipBy:asc` (the soonest collection first: the default in a warehouse with collection times, once stamped).",
            "schema": {
              "description": "`allocated:asc` (oldest first), `allocated:desc`, or `shipBy:asc` (the soonest collection first: the default in a warehouse with collection times, once stamped).",
              "type": "string",
              "enum": [
                "shipBy:asc",
                "allocated:asc",
                "allocated:desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Orders per page (max 100).",
            "schema": {
              "description": "Orders per page (max 100).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/queue/counts": {
      "get": {
        "operationId": "picking_queue_counts",
        "summary": "picking_queue_counts",
        "description": "How many orders the pick queue holds: `readyCount`, the scope's exact total of orders ready to be picked (the Home card's own count), less `planHeld`, the ready orders no batch takes until Shopify confirms a plan (`planHeldCapped`: a floor, shown 1,000+). Scoped like picking_queue by `warehouseId` (omit it for every warehouse), `zoneId`, `stationId` and `profileId` (a live pick profile's orders; the Elevate plan, `plan_required` below it); the page's other filters (stores, singles, assignment, lateness) narrow its rows, never this count.\n\n**Operation id:** `picking_queue_counts` — the same operation is `app.picking.queue_counts({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_queue_counts`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Only this warehouse's ready orders; absent = every warehouse.",
            "schema": {
              "description": "Only this warehouse's ready orders; absent = every warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Only orders with a line in this zone.",
            "schema": {
              "description": "Only orders with a line in this zone.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "description": "Only the orders this live pick profile takes; requires the Elevate plan (`plan_required` below it).",
            "schema": {
              "description": "Only the orders this live pick profile takes; requires the Elevate plan (`plan_required` below it).",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/queue/exclusions": {
      "get": {
        "operationId": "picking_queue_exclusions",
        "summary": "picking_queue_exclusions",
        "description": "Why orders are NOT in the pick queue: exact counts of allocations that are short of stock, stale (reserved on a lot that has expired or in a bin that is no longer allocatable — flagged by a short, archived, unsellable or frozen by a count; the next batch cut re-plans up to ten of them, or a count clears the bin), held (a Shopify hold or an open hold intent) and already owned by a pick batch, plus open fulfillment orders assigned to a Shopify location no warehouse is linked to (`unmapped`, tenant-wide). Omit warehouseId for every warehouse.\n\n**Operation id:** `picking_queue_exclusions` — the same operation is `app.picking.queue_exclusions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_queue_exclusions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/picking/record-component-pick": {
      "post": {
        "operationId": "picking_record_component_pick",
        "summary": "picking_record_component_pick",
        "description": "Record one component pick for an Assemblified work-order batch (INT-020). Moves the goods into the work-order staging bin and suppresses the Shopify push (Assemblified adjusts the component inventory itself). `scannedBin`/`scannedVariant` are validated server-side; `short: true` records the shortfall in place without cross-bin re-allocation. A bin a person blocked refuses a booking of units as {ok: false, refused: \"source_not_pickable\", recovery}: `short` on a line with a bin hint (`recovery: short`), another bin scanned on one without. Display-only VMAT lines are rejected. A required idempotencyKey identifies one pick attempt; reuse it after a lost response. Reusing a recorded key for a different line or quantity is refused.\n\n**Operation id:** `picking_record_component_pick` — the same operation is `app.picking.record_component_pick({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_record_component_pick`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickLineId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "scannedBin": {
                    "type": "string"
                  },
                  "scannedVariant": {
                    "type": "string"
                  },
                  "short": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "confirm": {
                    "description": "How each step was confirmed (scan, camera, typed, tap; desk for a desk planner). Omitted: desk for a caller holding fulfillment.plan outside a floor session, else scan when the step's code is sent and tap when not. paper is refused.",
                    "type": "object",
                    "properties": {
                      "bin": {
                        "type": "string",
                        "enum": [
                          "scan",
                          "camera",
                          "typed",
                          "photo",
                          "tap",
                          "paper",
                          "desk"
                        ]
                      },
                      "item": {
                        "type": "string",
                        "enum": [
                          "scan",
                          "camera",
                          "typed",
                          "photo",
                          "tap",
                          "paper",
                          "desk"
                        ]
                      }
                    }
                  },
                  "approvalIds": {
                    "description": "A lead's single-use grants (floor approvals), one per gated action of the call: short_line for a short, confirm_without_scan for a tap where the warehouse confirms by scan only. A tapped short carries both.",
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  }
                },
                "required": [
                  "pickLineId",
                  "idempotencyKey",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/record-pick": {
      "post": {
        "operationId": "picking_record_pick",
        "summary": "picking_record_pick",
        "description": "Record one pick. `scannedBin`/`scannedVariant` are validated against the line (a tapped step names it by construction; `confirm` says how each step was confirmed, and where the warehouse confirms by scan only a tapped step is refused as {ok: false, refused: \"scan_required\", step} unless a lead approved it) server-side — a wrong scan returns {ok: false, mismatch: \"bin\"|\"item\", verdict: \"unknown\"|\"wrong_target\"|\"ambiguous\"} and changes nothing (unknown = nothing answers to the code; wrong_target = a real bin/item, not this line's). A successful pick moves the goods into the packing staging bin AND carries their reservation along. `short: true` reports the bin as exhausted: the missing quantity is re-allocated from other pickable bins (returned in `reallocated`) and whatever no bin can cover becomes `shortQty`, which also flags the source bin as a problem. A bin a person blocked, archived or (a store bin) took off sale since the line was allocated refuses a booking of units as {ok: false, refused: \"source_not_pickable\", binCode, reason, cause, recovery}; `reroute: true` with `qty: 0` then moves the line's outstanding units to other bins (or short), flagging and counting nothing. A line naming a LOCAL item (a sub-assembly inside a kit) is refused with a coded `details.localRefusal` — `local_stock_frozen`, `item_unplaced`, `catalog_unconfirmed` — and never a zero-quantity success, which would be indistinguishable from a genuine short pick.\n\n**Operation id:** `picking_record_pick` — the same operation is `app.picking.record_pick({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_record_pick`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickLineId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "scannedBin": {
                    "description": "Bin code or barcode the picker scanned.",
                    "type": "string"
                  },
                  "scannedVariant": {
                    "description": "Item barcode or sku the picker scanned.",
                    "type": "string"
                  },
                  "short": {
                    "type": "boolean"
                  },
                  "reroute": {
                    "description": "After `source_not_pickable`: take the line from another bin. Sent with qty 0 and no `short`; the outstanding units are re-allocated, the picked ones kept.",
                    "type": "boolean"
                  },
                  "note": {
                    "description": "Reason recorded on the bin problem flag (at most 200 characters).",
                    "type": "string",
                    "maxLength": 200
                  },
                  "idempotencyKey": {
                    "description": "Caller-minted key per attempt. A replay answers the line's current state with `replayed: true` instead of booking the units again.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "scannedSlot": {
                    "description": "On a list cut onto a cart (WMS BN-22): the slot label the picker scanned (`CART-01-03`), validated against the line's order's slot; a wrong one is {ok: false, mismatch: \"slot\"}.",
                    "type": "string"
                  },
                  "confirm": {
                    "description": "How each step was confirmed (scan, camera, typed, tap; desk for a desk planner), a cart list's slot too. Omitted: desk for a caller holding fulfillment.plan outside a floor session, else scan when the step's code is sent and tap when not. paper is refused.",
                    "type": "object",
                    "properties": {
                      "bin": {
                        "type": "string",
                        "enum": [
                          "scan",
                          "camera",
                          "typed",
                          "photo",
                          "tap",
                          "paper",
                          "desk"
                        ]
                      },
                      "item": {
                        "type": "string",
                        "enum": [
                          "scan",
                          "camera",
                          "typed",
                          "photo",
                          "tap",
                          "paper",
                          "desk"
                        ]
                      },
                      "slot": {
                        "type": "string",
                        "enum": [
                          "scan",
                          "camera",
                          "typed",
                          "photo",
                          "tap",
                          "paper",
                          "desk"
                        ]
                      }
                    }
                  },
                  "approvalIds": {
                    "description": "A lead's single-use grants (floor approvals), one per gated action of the call: short_line for a short, confirm_without_scan for a tap where the warehouse confirms by scan only. A tapped short carries both.",
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  }
                },
                "required": [
                  "pickLineId",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/picking/route-preview": {
      "get": {
        "operationId": "picking_route_preview",
        "summary": "picking_route_preview",
        "description": "Preview the first 24 remaining physical stops in their existing pick order. Completed picks are untouched; partial or unresolved routes disclose their bounds.\n\n**Operation id:** `picking_route_preview` — the same operation is `app.picking.route_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/picking_route_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "picking"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "batchId",
            "in": "query",
            "required": true,
            "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A pickBatches id, e.g. \"pickBatches_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "profile",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "walk",
                "cart"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/pickup-plans": {
      "get": {
        "operationId": "pickup_plans_list",
        "summary": "pickup_plans_list",
        "description": "One warehouse's pickup plans: a row per connected parcel carrier that books pickups or offers a regular one, with the modes it can take and its stored plan (null: When I ask, the Shopify location's contact).\n\n**Operation id:** `pickup_plans_list` — the same operation is `app.pickup.plans_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickup_plans_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickup-plans"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "The warehouse (warehouses.list).",
            "schema": {
              "type": "string",
              "description": "The warehouse (warehouses.list).",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "pickup_plans_set",
        "summary": "pickup_plans_set",
        "description": "Set one warehouse × carrier connection's pickup plan: When I ask, Regular pickup or Book at close-out (a carrier that closes out and books by API, today USPS: a close-out then books or joins the day's pickup), with its window, contact, where the parcels wait and the fee answer (a priced carrier's `maxFee`, a contract carrier's `contractCovers`). Refused: `pickups_unsupported`, `pickup_plan_needs_close_out`, `pickup_plan_fee_required`, `pickup_plan_regular_unsupported`, `pickup_awaiting_certification`.\n\n**Operation id:** `pickup_plans_set` — the same operation is `app.pickup.plans_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickup_plans_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickup-plans"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "carrierAccountId": {
                    "type": "string",
                    "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "on_request",
                      "regular",
                      "at_close_out"
                    ],
                    "description": "`on_request` (When I ask; with nothing else set the plan is removed), `regular` (the carrier comes on its standing pickup; nothing is booked), `at_close_out` (a close-out books or joins the day's pickup: needs readyBy, closeBy and the fee answer)."
                  },
                  "day": {
                    "description": "Which day a close-out's pickup is for; default: the carrier's next pickup day where same-day bookings close early (USPS), else the same day.",
                    "type": "string",
                    "enum": [
                      "same_day",
                      "next_pickup_day"
                    ]
                  },
                  "readyBy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Ready from, warehouse-local HH:mm."
                  },
                  "closeBy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Collect by, warehouse-local HH:mm."
                  },
                  "contactName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Pickup contact; null: the Shopify location's name."
                  },
                  "contactPhone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Pickup contact phone; null: the Shopify location's."
                  },
                  "contactEmail": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 0
                          },
                          {
                            "type": "string",
                            "maxLength": 254,
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Pickup contact e-mail (USPS needs one)."
                  },
                  "instructions": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Where the parcels wait, for the driver."
                  },
                  "maxFee": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 10000
                          },
                          "currency": {
                            "type": "string",
                            "minLength": 3,
                            "maxLength": 3
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The most a priced carrier may charge an automatic booking. Booked only if UPS's quote is within your Max fee. UPS bills its own charge; a higher charge is flagged, never cancelled for you."
                  },
                  "contractCovers": {
                    "type": "boolean",
                    "description": "Your contract covers these pickups: a contract carrier books at close-out only then."
                  }
                },
                "required": [
                  "warehouseId",
                  "carrierAccountId",
                  "mode",
                  "readyBy",
                  "closeBy",
                  "contactName",
                  "contactPhone",
                  "contactEmail",
                  "instructions",
                  "maxFee",
                  "contractCovers"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pickups": {
      "get": {
        "operationId": "pickups_list",
        "summary": "pickups_list",
        "description": "List carrier pickups, newest first (max 100), with the warehouse and carrier label. Filter by status (owed, scheduling, scheduled, confirmed, cancelled), warehouse or carrier account. Each row carries the carrier's `charge`, an open `cancel` ({ attempt, state: open | unknown }), `statusReason` (a charge above your limit, a shared pickup number, a refused cancellation) and `joinedCount` (parcels joined after booking). `owed`: a close-out made the booking due and the carrier was never asked: book it with pickups.schedule under its `pickupKey`, book it for another day (source `pickup`) or drop it (pickups.resolve `dropped`).\n\n**Operation id:** `pickups_list` — the same operation is `app.pickups.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "owed",
                "scheduling",
                "scheduled",
                "confirmed",
                "cancelled"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "carrierAccountId",
            "in": "query",
            "required": false,
            "description": "document id of the carrier account.",
            "schema": {
              "description": "document id of the carrier account.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/pickups/cancel": {
      "post": {
        "operationId": "pickups_cancel",
        "summary": "pickups_cancel",
        "description": "Cancel a booked pickup at the carrier. Answers `cancelled` only on the carrier's word; `refused` (the carrier cancelled nothing: it stays booked); `unknown` (no answer: the row says the cancellation is not confirmed — check the carrier, then pickups.resolve `cancelled` or `still_booked`). Refused before any carrier call: `pickup_not_booked`, `pickup_cancel_unsupported` (cancel it in the carrier's account; also when another pickup shares its carrier number), `effect_in_flight`. Reschedule = cancel, then pickups.schedule with source `pickup`. Irreversible.\n\n**Operation id:** `pickups_cancel` — the same operation is `app.pickups.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_cancel`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickupId": {
                    "type": "string",
                    "description": "The pickup (pickups.list).",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "pickupId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pickups/quote": {
      "post": {
        "operationId": "pickups_quote",
        "summary": "pickups_quote",
        "description": "What a pickup would cost, booking nothing: the carrier's fee rule (`free`, `quoted`, `charged_unpriced`, `contract`), the price where the carrier quotes one (UPS) and the words the desk shows. A quote that could not be read answers `charge: null`.\n\n**Operation id:** `pickups_quote` — the same operation is `app.pickups.quote({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_quote`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "carrierAccountId": {
                    "type": "string",
                    "description": "The carrier account that collects (carriers.list).",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "The warehouse the parcels wait at.",
                    "format": "floormode-id"
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The pickup day, as YYYY-MM-DD in the warehouse's zone."
                  },
                  "timeWindow": {
                    "description": "Ready from / collect by, warehouse-local HH:mm; omitted: the pickup plan's.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "readyBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "closeBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "readyBy",
                          "closeBy"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "closeout"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "freight"
                          },
                          "quoteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "quoteId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "manifest"
                          },
                          "manifestId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "manifestId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "pickup"
                          },
                          "pickupId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "pickupId"
                        ]
                      }
                    ],
                    "description": "What it collects: `closeout` — every open label of the account here (and, where the carrier closes out, their manifest: a side effect); `manifest` — one closed-out manifest's parcels; `pickup` — a cancelled or owed pickup's parcels again (Reschedule, Book for another day); `freight` — a booked freight quote."
                  }
                },
                "required": [
                  "carrierAccountId",
                  "warehouseId",
                  "date",
                  "source"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/pickups/resolve": {
      "post": {
        "operationId": "pickups_resolve",
        "summary": "pickups_resolve",
        "description": "Resolve what nobody could read about a pickup. A booking attempt: `booked` records the collection on the operator's attestation (with the carrier's confirmation number when known), `not_booked` cancels the attempt so a new booking can be made. A cancellation the carrier never confirmed: `cancelled` or `still_booked` (the next cancel is a new attempt). `cancelled` on a booked pickup with no cancellation only where Floormode cannot cancel it — a carrier that cancels in its own account, or one booking several pickups share — and it settles every pickup of that booking. A booked pickup the carrier missed, after its day: `not_collected` (then book its parcels again with source `pickup`). An owed pickup: `dropped` (the carrier was never asked). Refused while an attempt is still running, and `not_booked` when the carrier's answer is held.\n\n**Operation id:** `pickups_resolve` — the same operation is `app.pickups.resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickupId": {
                    "type": "string",
                    "description": "A pickups id, e.g. \"pickups_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "verdict": {
                    "type": "string",
                    "enum": [
                      "booked",
                      "not_booked",
                      "cancelled",
                      "still_booked",
                      "not_collected",
                      "dropped"
                    ]
                  },
                  "confirmationNumber": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "pickupId",
                  "verdict"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pickups/retry": {
      "post": {
        "operationId": "pickups_retry",
        "summary": "pickups_retry",
        "description": "Send an outstanding pickup booking again, only where the carrier answers the same booking twice (UPS returns the same pickup number for the address) and only after its attempt's 5-minute lease ended; the same answers as pickups.schedule. Any other carrier is refused `pickup_retry_unsupported`: resolve it instead. Irreversible.\n\n**Operation id:** `pickups_retry` — the same operation is `app.pickups.retry({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_retry`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pickupId": {
                    "type": "string",
                    "description": "The outstanding pickup (pickups.list).",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "pickupId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/pickups/schedule": {
      "post": {
        "operationId": "pickups_schedule",
        "summary": "pickups_schedule",
        "description": "Book a carrier pickup at a warehouse, as the desk's Schedule pickup does. `source`: `closeout` collects every open label of the account there AND, where the carrier closes out (USPS), closes them out on a manifest (a side effect: the answer carries `manifest`); `manifest` collects one closed-out manifest's parcels; `pickup` books a cancelled or owed pickup's parcels again (Reschedule, Book for another day). `pickupKey` is yours: send the SAME key after a lost answer or a TIMEOUT and the stored pickup answers (`replayed: true`), never a second booking; an owed pickup's key books it. A priced carrier (UPS) needs `maxFee` and `chargeMayDifferAccepted: true`. Booked only if UPS's quote is within your Max fee. UPS bills its own charge; a higher charge is flagged, never cancelled for you. A quote missing or in another currency books nothing. Answers by `outcome`: `booked` (the pickup, its `charge`, `mergedInto` when the carrier answered another live pickup's number); `refused` (the carrier booked nothing); `unknown` (no answer: the pickup stays outstanding and is never sent again by itself; resolve it, or for UPS pickups.retry); `unrecorded`; `undone`. Refused before any carrier call with `conflict` / `invalid_input` and `details.code`: `pickups_unsupported` (book it in the carrier's account), `pickup_awaiting_certification`, `pickup_contact_missing` (`details.field`), `max_cost_required`, `nothing_to_collect`, `pickup_window_passed`, `pickup_replacement_needs_cancel`, `effect_in_flight`, `idempotency_key_reused`. Irreversible: the carrier may charge for it and send a driver.\n\n**Operation id:** `pickups_schedule` — the same operation is `app.pickups.schedule({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/pickups_schedule`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "pickups"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "carrierAccountId": {
                    "type": "string",
                    "description": "The carrier account that collects (carriers.list).",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "The warehouse the parcels wait at.",
                    "format": "floormode-id"
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The pickup day, as YYYY-MM-DD in the warehouse's zone."
                  },
                  "timeWindow": {
                    "description": "Ready from / collect by, warehouse-local HH:mm; omitted: the pickup plan's.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "readyBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "closeBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "readyBy",
                          "closeBy"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "closeout"
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "freight"
                          },
                          "quoteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "quoteId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "manifest"
                          },
                          "manifestId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "manifestId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "pickup"
                          },
                          "pickupId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          }
                        },
                        "required": [
                          "kind",
                          "pickupId"
                        ]
                      }
                    ],
                    "description": "What it collects: `closeout` — every open label of the account here (and, where the carrier closes out, their manifest: a side effect); `manifest` — one closed-out manifest's parcels; `pickup` — a cancelled or owed pickup's parcels again (Reschedule, Book for another day); `freight` — a booked freight quote."
                  },
                  "maxFee": {
                    "description": "The most the pickup may cost, in the carrier's currency: required where the carrier charges a priced fee. Booked only if UPS's quote is within your Max fee. UPS bills its own charge; a higher charge is flagged, never cancelled for you.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 10000
                          },
                          "currency": {
                            "type": "string",
                            "minLength": 3,
                            "maxLength": 3
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "chargeMayDifferAccepted": {
                    "description": "true: you accept that the carrier's charge may exceed maxFee (it bills its own charge when the pickup is booked). Required with maxFee.",
                    "type": "boolean"
                  },
                  "pickupKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "A key you make for this booking. Send the SAME key after a lost answer or a TIMEOUT: it answers the stored pickup, never a second booking. An owed pickup's key (`closeout-pickup:…`) books it."
                  }
                },
                "required": [
                  "carrierAccountId",
                  "warehouseId",
                  "date",
                  "source",
                  "pickupKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/print-jobs": {
      "get": {
        "operationId": "print_jobs_list",
        "summary": "print_jobs_list",
        "description": "List cloud print jobs, newest first (max 100), with the shipment short id. Filter by shipment or by status (queued, sent, failed, unknown). Unknown means provider acceptance could not be confirmed.\n\n**Operation id:** `print_jobs_list` — the same operation is `app.print.jobs_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/print_jobs_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "print-jobs"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": false,
            "description": "document id of the shipment.",
            "schema": {
              "description": "document id of the shipment.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "sent",
                "failed",
                "unknown"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/print-jobs/label-attempt": {
      "get": {
        "operationId": "label_print_attempt",
        "summary": "label_print_attempt",
        "description": "Inspect one generated-label print attempt, including immutable request identity and confirmed provider acceptance. Does not expose PDF bytes or credentials.\n\n**Operation id:** `label_print_attempt` — the same operation is `app.label.print_attempt({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/label_print_attempt`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "print-jobs"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "requestKey",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/printers": {
      "get": {
        "operationId": "printers_list",
        "summary": "printers_list",
        "description": "List the tenant's discovered PrintNode printers (max 200): id, name, state, computer and the default flag. Refreshed by the Worker's printer-discovery route; the API key is never returned.\n\n**Operation id:** `printers_list` — the same operation is `app.printers.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/printers_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "printers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/printnode/scales": {
      "get": {
        "operationId": "printnode_scales_list",
        "summary": "printnode_scales_list",
        "description": "The PrintNode scales Floormode's discovery last saw (computer, device name and number, when seen): the scale id stations_set_devices binds to a pack station. No credential and no reading.\n\n**Operation id:** `printnode_scales_list` — the same operation is `app.printnode.scales_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/printnode_scales_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "printnode"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/privacy/requests": {
      "get": {
        "operationId": "privacy_list",
        "summary": "privacy_list",
        "description": "List customer privacy requests, oldest first, with 50-row pagination and delivery deadlines.\n\n**Operation id:** `privacy_list` — the same operation is `app.privacy.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/privacy_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "privacy"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "exporting",
                "ready",
                "completed",
                "redacted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/privacy/requests/confirm-delivered": {
      "post": {
        "operationId": "privacy_confirmDelivered",
        "summary": "privacy_confirmDelivered",
        "description": "Confirm that the complete retrieved export was reviewed and securely delivered to the merchant, including manual-review items. An incomplete export cannot be completed.\n\n**Operation id:** `privacy_confirmDelivered` — the same operation is `app.privacy.confirmDelivered({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/privacy_confirmDelivered`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "privacy"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "manualReviewConfirmed": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "requestId",
                  "sessionId",
                  "manualReviewConfirmed"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/privacy/requests/export/page": {
      "post": {
        "operationId": "privacy_exportPage",
        "summary": "privacy_exportPage",
        "description": "Retrieve the next bounded page of an authorized export and advance its session cursor. Continue until nextCursor is null; review all manual-review notices.\n\n**Operation id:** `privacy_exportPage` — the same operation is `app.privacy.exportPage({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/privacy_exportPage`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "privacy"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "tableIndex": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "afterId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "format": "floormode-id",
                                "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tables": {
                            "type": "string",
                            "minLength": 64,
                            "maxLength": 64
                          }
                        },
                        "required": [
                          "tableIndex",
                          "afterId",
                          "tables"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "requestId",
                  "sessionId",
                  "cursor"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/privacy/requests/export/start": {
      "post": {
        "operationId": "privacy_startExport",
        "summary": "privacy_startExport",
        "description": "Start or restart a complete customer-data export session. Does not fulfill the privacy request.\n\n**Operation id:** `privacy_startExport` — the same operation is `app.privacy.startExport({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/privacy_startExport`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "privacy"
        ],
        "x-topic": "customers",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "A privacyRequests id, e.g. \"privacyRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "requestId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/production/pipeline": {
      "get": {
        "operationId": "production_pipeline",
        "summary": "production_pipeline",
        "description": "The PRODUCTION PIPELINE: one row per Assemblified work order, joining the three documents Floormode holds about it — the work-order head Assemblified pushes, the component pick batch cut for its materials, and the finished-goods receipt its output is put away against. Answers 'where does WO-2031 actually stand' without three separate list calls. `stage` is DERIVED on every read, never stored: announced → picking → staged → in_production → awaiting_putaway → put_away, plus cancelled. Latest evidence wins, because a document that exists proves the stages before it happened. `in_production` is the ONE stage that needs the head (only Assemblified knows the build started); every other stage is derivable from our own documents, so a shop whose peer predates contracts 1.2 still gets a working board. `status` is Assemblified's own lifecycle value and is null without a head — it sits ALONGSIDE the stage rather than being folded into it (paused, quality_control and in_progress are one stage here and three different facts there). `dueDate` is verbatim as the peer stated it: a calendar day or a full timestamp, never normalised. `outputVariantId` is the numeric Shopify variant id the work order makes (digits only, never a GID), as the mirror keys a variant. `shortLines` counts component lines the floor could not fully pick and `cancelPending` flags an open 'return these goods to stock' claim — both are blockers, not stages. `hasHeads: false` with no rows means this shop has no Assemblified connection rather than no work in flight. `stages` is a SET applied before every source read's cut (B12-5): absent = the whole board, finished work included; the in-flight board is every stage but put_away and cancelled. The former `stage` and `openOnly` arguments are refused. The board is ONE bounded page in soonest-due order: there is no cursor, and `capped: true` says the page is a part of the pipeline.\n\n**Operation id:** `production_pipeline` — the same operation is `app.production.pipeline({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/production_pipeline`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "production"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stages",
            "in": "query",
            "required": false,
            "description": "Work orders at any of these stages; absent = every stage, finished ones too. Repeat `stages` for each value (`?stages=announced&stages=picking`), or pass a JSON array (`?stages=[\"announced\",\"picking\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "announced",
              "picking"
            ],
            "schema": {
              "description": "Work orders at any of these stages; absent = every stage, finished ones too.",
              "minItems": 1,
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "announced",
                  "picking",
                  "staged",
                  "in_production",
                  "awaiting_putaway",
                  "put_away",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Work orders on the board (max 100). Default 100.",
            "schema": {
              "description": "Work orders on the board (max 100). Default 100.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "operationId": "products_list",
        "summary": "products_list",
        "description": "List the mirrored Shopify products of the authenticated tenant (max 100).\n\n**Operation id:** `products_list` — the same operation is `app.products.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/products_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "products"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/products/refresh": {
      "post": {
        "operationId": "products_refresh",
        "summary": "products_refresh",
        "description": "Queue an authoritative Shopify snapshot for this variant's product. Requests coalesce per product and use canonical durable ingest; local items and deleted products are refused.\n\n**Operation id:** `products_refresh` — the same operation is `app.products.refresh({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/products_refresh`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "products"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "variantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/products/refresh-status": {
      "get": {
        "operationId": "products_refresh_status",
        "summary": "products_refresh_status",
        "description": "Read targeted catalog refresh delivery and canonical ingest progress. A processed snapshot can be unchanged or stale; it never means every field changed.\n\n**Operation id:** `products_refresh_status` — the same operation is `app.products.refresh_status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/products_refresh_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "products"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving": {
      "get": {
        "operationId": "receiving_list",
        "summary": "receiving_list",
        "description": "List receipts in the chosen order (`sort`; newest first by default), paged by `cursor` (at most `limit` rows), with expected/received units and the discrepancy count. Filter by one or more statuses (expected, receiving, received, cancelled), `openOnly` (expected + receiving in one call — pass either this or `status`, not both), `sources`, warehouse, or variant. `sources` (any of these) names the SIBLING DOCUMENT the receipt came from: `logistified_po` (a Logistified purchase order), `logistified_ssr` (a Logistified supplier stock release), `logistified_to` (a Logistified transfer, the only kind `receiving_confirm_transfer_shipment` accepts), `assemblified_wo` (finished goods from an Assemblified work order) or `manual` (entered here). `warehouse_transfer` marks the receiving half of a native warehouse transfer: listed and filterable here, but received on the transfer (receiving_record_line, receiving_complete and receiving_cancel refuse it). It is applied BEFORE the page window, so it is how a sibling document stays reachable past that window — filtering after the cap could not find one at all. variantId returns only receipts carrying a line for that variant, which is the inbound history of one sku and the way to turn an `incoming` number back into documents. A receipt carries no bin and no station (putaway destinations live in the ledger), so zoneId and stationId both narrow to their WAREHOUSE — the finest granularity this surface has. `stages` keeps only receipts with units still on the dock in any of these stages: `inspecting` (waiting for inspection) or `putting_away` (waiting for putaway), e.g. [\"inspecting\"]. For 'what is due, and what is late', use `receiving_schedule` instead: this list is ordered by announcement date, which is not the delivery calendar.\n\n**Operation id:** `receiving_list` — the same operation is `app.receiving.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of these statuses. Not combinable with openOnly. Repeat `status` for each value (`?status=expected&status=receiving`), or pass a JSON array (`?status=[\"expected\",\"receiving\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "expected",
              "receiving"
            ],
            "schema": {
              "description": "Any of these statuses. Not combinable with openOnly.",
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "expected",
                  "receiving",
                  "received",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "openOnly",
            "in": "query",
            "required": false,
            "description": "Live documents only (expected + receiving). Not combinable with status. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Live documents only (expected + receiving). Not combinable with status.",
              "type": "boolean"
            }
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Any of these origins, e.g. [\"manual\", \"logistified_po\"]: manual, warehouse_transfer, logistified_po, logistified_to, assemblified_wo, logistified_ssr, logistified_mo; absent = every origin. Repeat `sources` for each value (`?sources=manual&sources=logistified_po`), or pass a JSON array (`?sources=[\"manual\",\"logistified_po\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "manual",
              "logistified_po"
            ],
            "schema": {
              "description": "Any of these origins, e.g. [\"manual\", \"logistified_po\"]: manual, warehouse_transfer, logistified_po, logistified_to, assemblified_wo, logistified_ssr, logistified_mo; absent = every origin.",
              "minItems": 1,
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "manual",
                  "warehouse_transfer",
                  "logistified_po",
                  "logistified_to",
                  "assemblified_wo",
                  "logistified_ssr",
                  "logistified_mo"
                ]
              }
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "stages",
            "in": "query",
            "required": false,
            "description": "Receipts with units still on the dock in any of these stages, e.g. [\"inspecting\"]: inspecting or putting_away (waiting for putaway); absent = every receipt. Repeat `stages` for each value (`?stages=inspecting`), or pass a JSON array (`?stages=[\"inspecting\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "inspecting"
            ],
            "schema": {
              "description": "Receipts with units still on the dock in any of these stages, e.g. [\"inspecting\"]: inspecting or putting_away (waiting for putaway); absent = every receipt.",
              "minItems": 1,
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inspecting",
                  "putting_away"
                ]
              }
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "Only receipts with a line for this variant (its inbound history).",
            "schema": {
              "description": "Only receipts with a line for this variant (its inbound history).",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Narrows to the zone's warehouse.",
            "schema": {
              "description": "Narrows to the zone's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "assignment",
            "in": "query",
            "required": false,
            "description": "mine = assigned to the caller or to nobody; all = everyone's.",
            "schema": {
              "description": "mine = assigned to the caller or to nobody; all = everyone's.",
              "type": "string",
              "enum": [
                "mine",
                "all"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The previous page's cursor, under the same sort.",
            "schema": {
              "description": "The previous page's cursor, under the same sort.",
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default), `created:asc` (oldest first), `promised:asc` (soonest promised delivery first, unscheduled last) or `promised:desc` (latest promise first, unscheduled first).",
            "schema": {
              "description": "`created:desc` (newest first, the default), `created:asc` (oldest first), `promised:asc` (soonest promised delivery first, unscheduled last) or `promised:desc` (latest promise first, unscheduled first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc",
                "promised:asc",
                "promised:desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per page, at most 100.",
            "schema": {
              "description": "Rows per page, at most 100.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "receiving_create",
        "summary": "receiving_create",
        "description": "Create an expected receipt (`#RC-…`, max 500 lines). Lines are {variantId|sku, expectedQty}; duplicates of the same variant and lot are merged (one line per variant and lot; a lot-less line stays its own). A lot announced for an item that tracks no lots is refused (`details.code: \"lot_not_tracked\"`). `blind: true` opens a receipt without expectations — the floor may then receive any item, and the over-receipt tolerance is not applied. `requestKey` is minted by the caller once per submit and kept across retries: the same key with the same arguments answers the same receipt again (`replayed: true`, nothing written); the same key with other arguments is refused as a conflict (`idempotency_key_reused`). Reordered, re-split or whitespace-equivalent lines are the same arguments. The answer is kept for as long as the tenant's data, so a retry replays regardless of its age.\n\n**Operation id:** `receiving_create` — the same operation is `app.receiving.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "blind": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "arrival": {
                    "description": "When and at which dock door the delivery is due, and its reference. Needs Plan arrivals (arrivals_off otherwise).",
                    "type": "object",
                    "properties": {
                      "at": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "The arrival's calendar day in the warehouse's zone, YYYY-MM-DD."
                          },
                          "time": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "The arrival's wall time in the warehouse's zone, HH:MM (24-hour)."
                          }
                        },
                        "required": [
                          "day",
                          "time"
                        ]
                      },
                      "stationId": {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      "reference": {
                        "type": "string",
                        "maxLength": 60
                      }
                    }
                  },
                  "sourceRef": {
                    "description": "Deep-link data of the source document (PO/TO).",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "number": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "name"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lines": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "sku": {
                          "description": "Sku or barcode.",
                          "type": "string"
                        },
                        "expectedQty": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "lotNumber": {
                          "description": "Announced lot; pre-fills the receiving station.",
                          "type": "string"
                        },
                        "expiryDate": {
                          "description": "ISO calendar day (2027-03-31), only with a lot number.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "expectedQty"
                      ]
                    }
                  }
                },
                "required": [
                  "warehouseId",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/arrival": {
      "post": {
        "operationId": "receiving_set_arrival",
        "summary": "receiving_set_arrival",
        "description": "Set an expected receipt's arrival note: the appointment (day and HH:MM in the warehouse's zone; null clears), the dock door, and a trailer, container or booking reference. Needs Plan arrivals on the warehouse (arrivals_off otherwise); expectedUpdatedAt guards a stale edit (revision_mismatch).\n\n**Operation id:** `receiving_set_arrival` — the same operation is `app.receiving.set_arrival({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_set_arrival`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "arrival": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "The arrival's calendar day in the warehouse's zone, YYYY-MM-DD."
                          },
                          "time": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "The arrival's wall time in the warehouse's zone, HH:MM (24-hour)."
                          }
                        },
                        "required": [
                          "day",
                          "time"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reference": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedUpdatedAt": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "receiptId",
                  "expectedUpdatedAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/cancel": {
      "post": {
        "operationId": "receiving_cancel",
        "summary": "receiving_cancel",
        "description": "Cancel a receipt that has not received anything yet. A receipt with goods in a bin must be completed — the ledger is append-only. A Logistified purchase- or transfer-order receipt tells Logistified it was cancelled (its one terminal report, head `cancelled`); `sourceSwitchedOff` is true when the connection is off, so Logistified was not told. The document itself stays open in Logistified. A blind delivery linked to a document is refused (`linked_receipt`): it is completed instead.\n\n**Operation id:** `receiving_cancel` — the same operation is `app.receiving.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "receiptId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/check-in": {
      "post": {
        "operationId": "receiving_check_in",
        "summary": "receiving_check_in",
        "description": "Check a delivery in at the dock: stamps its arrival now (once: already_checked_in), optionally at the dock door named. Needs Plan arrivals (arrivals_off). The same requestKey replays the first answer. Receiving never waits for a check-in: the first booking stamps the arrival too.\n\n**Operation id:** `receiving_check_in` — the same operation is `app.receiving.check_in({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_check_in`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "stationId": {
                    "type": "string",
                    "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "receiptId",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/check-in/undo": {
      "post": {
        "operationId": "receiving_check_in_undo",
        "summary": "receiving_check_in_undo",
        "description": "Undo the check-in the caller saw (expectedArrivedAtMs), while nothing of the receipt is booked (check_in_booked) and no newer check-in replaced it (check_in_changed). The door stays.\n\n**Operation id:** `receiving_check_in_undo` — the same operation is `app.receiving.check_in_undo({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_check_in_undo`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedArrivedAtMs": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "receiptId",
                  "expectedArrivedAtMs",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/complete": {
      "post": {
        "operationId": "receiving_complete",
        "summary": "receiving_complete",
        "description": "Close a receipt. Partial receipts are allowed: the remainder stays visible as a discrepancy instead of rewriting the expectation, and the discrepancy list is returned. Closing with lines still owed is a gated floor exception (close_receipt_short): outside a desk lead it needs a lead's approvalId.\n\n**Operation id:** `receiving_complete` — the same operation is `app.receiving.complete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_complete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for close_receipt_short.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "receiptId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/confirm-transfer-shipment": {
      "post": {
        "operationId": "receiving_confirm_transfer_shipment",
        "summary": "receiving_confirm_transfer_shipment",
        "description": "Confirm that the outbound leg of a transfer order left this shop's source warehouse and report it to Logistified (`to_ship_report`). Addressed by the expected receipt the transfer's inbound notice created — that receipt is the transfer order here — and refused unless the transfer ships FROM a warehouse this shop manages. The report is a status signal: it carries no quantities, moves no stock, and the Shopify write for this leg stays on the Logistified side. Confirming twice is a no-op.\n\n**Operation id:** `receiving_confirm_transfer_shipment` — the same operation is `app.receiving.confirm_transfer_shipment({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_confirm_transfer_shipment`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shippedAt": {
                    "description": "ISO-8601 timestamp with an offset; defaults to now.",
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "receiptId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/dock-correct": {
      "post": {
        "operationId": "receiving_dock_correct",
        "summary": "receiving_dock_correct",
        "description": "Correct a booking still waiting at the dock, on its putaway (taskId from receiving_dock_units; not started). `reverse` takes the units back out of stock and the receipt line back towards its expectation: only an open receipt of Floormode's own (`details.code: \"receipt_not_open\"` or \"reverse_not_allowed\"); the valuation is untouched, as the booking left it. `set_aside` moves the units to a bin that sells nothing — HOSP-01 for damaged or packaging, QUAR-01 otherwise, or toBinId — and counts them rejected on the line; it needs a reason (`other` also a note). Either way the putaway carries fewer units (cancelled at none). Repeating the same requestKey answers the first correction with `replayed: true`.\n\n**Operation id:** `receiving_dock_correct` — the same operation is `app.receiving.dock_correct({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_dock_correct`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "taskId": {
                    "type": "string",
                    "description": "The receipt's putaway the units wait on (receiving_dock_units' taskId); not started.",
                    "format": "floormode-id"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "reverse",
                      "set_aside"
                    ],
                    "description": "reverse: take the booking back (an open receipt of Floormode's own); set_aside: move the units to a bin that sells nothing."
                  },
                  "reason": {
                    "description": "Required to set aside; other also needs a note.",
                    "type": "string",
                    "enum": [
                      "damaged",
                      "wrong_item",
                      "expired",
                      "packaging",
                      "other"
                    ]
                  },
                  "toBinId": {
                    "description": "Set aside into this bin (one that sells nothing); default HOSP-01 or QUAR-01.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "receiptId",
                  "taskId",
                  "qty",
                  "action",
                  "requestKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/dock-units": {
      "get": {
        "operationId": "receiving_dock_units",
        "summary": "receiving_dock_units",
        "description": "One receipt's units waiting at the dock for a putaway (receivingFlow dock or dock_inspect): one row per open putaway with the item, lot, dock bin and units, and whether a worker started it. `reverse` says why the receipt's bookings cannot be reversed (null when they can).\n\n**Operation id:** `receiving_dock_units` — the same operation is `app.receiving.dock_units({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_dock_units`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/generate-serials": {
      "post": {
        "operationId": "receiving_generate_serials",
        "summary": "receiving_generate_serials",
        "description": "Generate serials for units a merchant labels themselves: books `count` units of a receipt line's item, each with the next serial of a range — `prefix`, then the number from `from`, zero-padded to the range's widest number — exactly as receiving_record_line books a scanned carton (same bin, flow, over-receipt and serial checks; all or nothing). Only for an item that records its serials at receiving. Answers like receiving_record_line, with the new units in serialUnitIds for their labels.\n\n**Operation id:** `receiving_generate_serials` — the same operation is `app.receiving.generate_serials({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_generate_serials`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptLineId": {
                    "type": "string",
                    "description": "The receipt line whose item the units are of.",
                    "format": "floormode-id"
                  },
                  "prefix": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "What every serial starts with (\"SN-2026-\"); may be empty."
                  },
                  "from": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The first number of the range."
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500,
                    "description": "How many units are booked, each with the next serial of the range."
                  },
                  "toBinId": {
                    "description": "The bin the units go to; omitted → the suggested putaway bin (or the dock).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "toBinCode": {
                    "description": "The bin by its code, as typed, when no id was chosen; ignored beside toBinId.",
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotencyKey": {
                    "description": "One per booking, kept across its retries; bound to the whole request.",
                    "type": "string"
                  }
                },
                "required": [
                  "receiptLineId",
                  "prefix",
                  "from",
                  "count"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/get": {
      "get": {
        "operationId": "receiving_get",
        "summary": "receiving_get",
        "description": "Get one receipt: the header totals (expected/received units, discrepancy and short-line counts, `fullyReceived`) computed over EVERY line, the FIRST page of lines (up to 100), the discrepancy list and the putaway movements this receipt produced. A receipt may hold up to 500 lines: when `hasMoreLines` is true, continue with `receiving_lines_list` using `linesCursor`. The header numbers are never a function of the page.\n\n**Operation id:** `receiving_get` — the same operation is `app.receiving.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "document id of the receipt.",
            "schema": {
              "type": "string",
              "description": "document id of the receipt.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/inspect-line": {
      "post": {
        "operationId": "receiving_inspect_line",
        "summary": "receiving_inspect_line",
        "description": "Inspect units a dock_inspect warehouse accepted into QC-IN-01: pass some (moved to DOCK-01, where a putaway task picks them up) and reject some (moved to HOSP-01 for damaged or packaging, else QUAR-01). Judged per receipt line's item and lot: more than the units still waiting is refused (`details.code: \"inspection_exceeds_received\"`). A reject needs a reason (`other` also a note); a warehouse whose inspection.photoOnFail is on (the default) also needs `photoId` (`details.code: \"photo_required\"`), the id the photo upload route answered within the last hour. Never changes the received quantity a connected app is told. Repeating the same idempotencyKey with the same verdict answers the first verdict with `replayed: true`; with another verdict it is refused.\n\n**Operation id:** `receiving_inspect_line` — the same operation is `app.receiving.inspect_line({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_inspect_line`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "receiptLineId": {
                    "type": "string",
                    "description": "A receiptLines id, e.g. \"receiptLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lotId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The lot the units carry; null for none."
                  },
                  "passQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rejectQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "reason": {
                    "description": "Required with a reject; other also needs a note.",
                    "type": "string",
                    "enum": [
                      "damaged",
                      "wrong_item",
                      "expired",
                      "packaging",
                      "other"
                    ]
                  },
                  "customReasonKey": {
                    "description": "One of the warehouse's own inspection reasons, by key.",
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,39}$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "photoId": {
                    "description": "A photo of this receipt the photo upload route stored.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "receiptId",
                  "receiptLineId",
                  "lotId",
                  "passQty",
                  "rejectQty",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/inspect-queue": {
      "get": {
        "operationId": "receiving_inspect_queue",
        "summary": "receiving_inspect_queue",
        "description": "The receipts with units waiting for inspection, oldest first, with the units still waiting. warehouseId, zoneId or stationId narrow it to that warehouse.\n\n**Operation id:** `receiving_inspect_queue` — the same operation is `app.receiving.inspect_queue({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_inspect_queue`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/inspection-groups": {
      "get": {
        "operationId": "receiving_inspection_groups",
        "summary": "receiving_inspection_groups",
        "description": "One receipt's items and lots with units still waiting for inspection at QC-IN-01: the line a verdict names, the lot, the units waiting, and the warehouse's inspection rules (whether a fail needs a photo, its own reasons).\n\n**Operation id:** `receiving_inspection_groups` — the same operation is `app.receiving.inspection_groups({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_inspection_groups`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/inspections": {
      "get": {
        "operationId": "receiving_inspections_list",
        "summary": "receiving_inspections_list",
        "description": "One receipt's inspection verdicts, newest first, paged by `cursor`: item, lot, units passed and rejected, the reason, the bin the rejected units went to, the photo id and who inspected.\n\n**Operation id:** `receiving_inspections_list` — the same operation is `app.receiving.inspections_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_inspections_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/label-items": {
      "get": {
        "operationId": "receiving_label_items",
        "summary": "receiving_label_items",
        "description": "Read actual booked receipt movements for contextual labels, including the captured lot and expiry and current catalog price. Browse bounded pages or supply up to 200 movement ids; selected ids must all belong to this receipt.\n\n**Operation id:** `receiving_label_items` — the same operation is `app.receiving.label_items({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_label_items`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "movementIds",
            "in": "query",
            "required": false,
            "description": "A stockMovements id, e.g. \"stockMovements_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `movementIds` for each value (`?movementIds=stockMovements_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?movementIds=[\"stockMovements_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "stockMovements_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "minItems": 1,
              "maxItems": 200,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A stockMovements id, e.g. \"stockMovements_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/lines": {
      "get": {
        "operationId": "receiving_lines_list",
        "summary": "receiving_lines_list",
        "description": "One page of a receipt's expectation lines (max 100), ordered by position. Keyset pagination: pass the previous page's `cursor` back to continue, and stop when it comes back null. This is the only complete way to read the lines of a large receipt — a receipt holds up to 500 of them.\n\n**Operation id:** `receiving_lines_list` — the same operation is `app.receiving.lines_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_lines_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "document id of the receipt.",
            "schema": {
              "type": "string",
              "description": "document id of the receipt.",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`cursor` of the previous page; omit for the first.",
            "schema": {
              "description": "`cursor` of the previous page; omit for the first.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "lines per page, 1…100.",
            "schema": {
              "description": "lines per page, 1…100.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/link-document": {
      "post": {
        "operationId": "receiving_link_document",
        "summary": "receiving_link_document",
        "description": "Link a blind receipt (counted with no document) to an open purchase order or an expected manual receipt in the same warehouse. Lines match by item, the document's oldest open line first; units beyond what the document still expects stay on its last line (an over-delivery, never refused); an item the document does not carry stays a blind line. Permanent: there is no unlink, and the linked receipt cannot be cancelled. `expectedMatchedUnits` must equal the units the link binds now, else `plan_changed` (its `matchedUnits` detail says the current count); an `expectedPlanDigest` (the app's preview) refuses it when any split or over-delivery moved too. A Logistified purchase order hears the delivery as one more split delivery: its report when the receipt is received, else its progress. Refusals: other_warehouse, document_closed, nothing_matches, already_linked, not_blind, ownership_superseded, document_receipts_full, delivery_archived (a delivery more than two years old is in the history books). `requestKey` makes a retry answer the first result.\n\n**Operation id:** `receiving_link_document` — the same operation is `app.receiving.link_document({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_link_document`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "receipt"
                      },
                      "receiptId": {
                        "type": "string",
                        "description": "A receipt of the purchase order or the expected delivery.",
                        "format": "floormode-id"
                      }
                    },
                    "required": [
                      "kind",
                      "receiptId"
                    ]
                  },
                  "expectedMatchedUnits": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "expectedPlanDigest": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "receiptId",
                  "target",
                  "expectedMatchedUnits"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/link-preview": {
      "get": {
        "operationId": "receiving_link_preview",
        "summary": "receiving_link_preview",
        "description": "What linking a blind receipt to a document would do, before receiving_link_document: outcome ready with the rows it matches and the units it binds (pass them as expectedMatchedUnits / expectedPlanDigest), or the refusal it would meet.\n\n**Operation id:** `receiving_link_preview` — the same operation is `app.receiving.link_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_link_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": true,
            "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "description": "Pass this as a JSON-encoded object.",
            "schema": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "receipt"
                },
                "receiptId": {
                  "type": "string",
                  "description": "A receipt of the purchase order or the expected delivery.",
                  "format": "floormode-id"
                }
              },
              "required": [
                "kind",
                "receiptId"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/match-codes": {
      "post": {
        "operationId": "receiving_match_codes",
        "summary": "receiving_match_codes",
        "description": "Match the rows of a supplier's delivery note or packing list to items, by code only (no description or fuzzy match). Per row: a GTIN (with a valid check digit) and the supplier's article number match only codes an item holds (its barcode, an alias, a carton code); buyerSku matches an item's own SKU and is only for a column the note labels as the buyer's number. Each row answers `outcome`: item (with `via` and the carton code's `packQty`), ambiguous (a code several items hold, a local and a Shopify item included), conflict (the row's codes name different items), sku_only (the supplier's number is only some item's own SKU: a coincidence, never proof) or none; `candidates` lists the items to choose among. Reads only; up to 200 rows.\n\n**Operation id:** `receiving_match_codes` — the same operation is `app.receiving.match_codes({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_match_codes`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rows": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "gtin": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "supplierSku": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "buyerSku": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        }
                      }
                    }
                  }
                },
                "required": [
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/plan-putaway": {
      "get": {
        "operationId": "receiving_plan_putaway",
        "summary": "receiving_plan_putaway",
        "description": "Directed putaway v1 (WHT-006): the capacity-capped split PLAN for a quantity. Ranks home location → consolidation (bins already holding the SKU) → emptiest bins, caps each leg at its remaining capacity and spills into further locations when the receipt exceeds one bin. `steps` carries the per-bin qty + reason + remaining; `capped` flags a quantity no location could take (the intrinsic over-fill guard). With no capacity configured a single unbounded step absorbs the whole quantity — today's behavior.\n\n**Operation id:** `receiving_plan_putaway` — the same operation is `app.receiving.plan_putaway({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_plan_putaway`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": false,
            "description": "Supplies the warehouse.",
            "schema": {
              "description": "Supplies the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "scannedCode",
            "in": "query",
            "required": false,
            "description": "Item barcode or sku.",
            "schema": {
              "description": "Item barcode or sku.",
              "type": "string"
            }
          },
          {
            "name": "qty",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "required": false,
            "description": "A booking or planning key; the spread strategy ranks bins by it, so a replay proposes the same bin.",
            "schema": {
              "description": "A booking or planning key; the spread strategy ranks bins by it, so a replay proposes the same bin.",
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/record-line": {
      "post": {
        "operationId": "receiving_record_line",
        "summary": "receiving_record_line",
        "description": "Receive goods against a receipt. The item comes from variantId or scannedCode (resolved server-side through the scan router), the destination from toBinId/toBinCode or — when both are omitted — the suggested putaway bin. Writes one `receipt` ledger movement. An over-receipt beyond the warehouse's overReceiptTolerancePct is rejected; items that are not expected are only accepted on a blind receipt. Lots follow the ITEM's tracking mode (variants_set_tracking): an item that tracks lots needs one (`details.code: \"lot_required\"`; with a date when the item requires one, `expiry_required`); an item that tracks none refuses a typed lot (`lot_not_tracked`) and books a lot from a GS1 barcode or the announcement without it. A typed lot wins; otherwise the one lot still expected for the item is used (two expected lots refuse a lot-less scan of a lot item with `lot_required`); units fill the lines of their lot, then the item's lot-less lines, never another lot's; an undeclared lot becomes its own zero-expected line. The movement records where its lot came from (gs1, typed, announced). The over-receipt tolerance is judged per item over all its lines. Booking a lot item without a lot into a bin that already holds lot-tracked units of it is refused with `details.code: \"lot_required\"` and writes nothing. In a warehouse whose receiving flow is `dock` or `dock_inspect` (warehouses_update settings.receivingFlow), a manual receipt or a Logistified purchase order books into DOCK-01 (a putaway task is created or topped up) or QC-IN-01 (the units wait for receiving_inspect_line): the bin is forced, so toBinId / toBinCode are refused with `details.code: \"bin_not_used_in_dock_flow\"`. The answer's `receivingFlow` and `binCode` say where the units went. An item that records its serials at receiving (serialCapture receive) names one serial per unit in `serials` (or, for one unit, the GS1 code's serial, AI 21): each becomes a serial unit in stock in this warehouse, listed in the answer's serialUnitIds; fewer is refused as serials_needed, a unit already in stock as serial_in_stock (with its warehouse), a shipped one as serial_shipped (it comes back on its return). `partialOf` books a partial carton: the scanned units only; on the floor it takes a lead's grant (approvalId, action receive_partial).\n\n**Operation id:** `receiving_record_line` — the same operation is `app.receiving.record_line({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_record_line`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "toBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toBinCode": {
                    "type": "string"
                  },
                  "expectedAcceptanceBinId": {
                    "description": "The dock bin the caller showed (receiving_get's dockBinId): a fresh booking finding the receipt at another door is refused acceptance_moved and books nothing; omit for no check.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lotNumber": {
                    "description": "Batch/lot of the goods in hand, judged by the item's tracking mode; omitted, the one lot still expected for the item is used; two expected lots refuse the scan of a lot item (`lot_required`).",
                    "type": "string"
                  },
                  "expiryDate": {
                    "description": "ISO calendar day the lot expires on; only together with a lot number.",
                    "type": "string"
                  },
                  "idempotencyKey": {
                    "description": "Bound to the whole booking request (item, quantity, bin, lot, expiry): repeating a key for the SAME booking writes nothing and answers the original booking with `replayed: true`; reusing it for a different booking is a conflict (`idempotency_key_reused`) that names what the key booked.",
                    "type": "string"
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "serials": {
                    "description": "One serial per unit, for an item that records its serials at receiving; a GS1 code's serial (AI 21) is read out.",
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "partialOf": {
                    "description": "The carton's units when fewer were scanned: the scanned units are booked.",
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 9007199254740991
                  },
                  "serialMethod": {
                    "description": "How the serials were captured: scan (the floor's default) or typed.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "typed"
                    ]
                  },
                  "typedSerials": {
                    "description": "The serials of `serials` that were typed (the others scanned): each unit records its own method, and a lead's grant covers the typed ones alone.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "serialApprovalId": {
                    "description": "A lead's single-use grant (serial_typed) for typed serials on the floor where the warehouse confirms by scan only; it names the receipt and the typed units.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "receiptId",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/resolve-document": {
      "get": {
        "operationId": "receiving_resolve_document",
        "summary": "receiving_resolve_document",
        "description": "Resolve hold covering documents (`linkRef`) to the receipts that represent them here: `refs` names up to 50, and `results` answers each in the order asked, a null `receipt` when no receipt exists for it. `kind` is the link kind — `po` and `to` are Logistified documents, `wo` is an Assemblified work order, and `bom` always answers null because a bill of materials is a recipe, not something goods are received against. `ref` may be the peer's internal id, the document number or its display name: a hold can be filed from any of the three, and all three are matched, newest document first. This is the read behind 'the order is waiting for PO-1042 — show me PO-1042'.\n\n**Operation id:** `receiving_resolve_document` — the same operation is `app.receiving.resolve_document({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_resolve_document`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "refs",
            "in": "query",
            "required": true,
            "description": "The hold documents to resolve, up to 50, answered in order. Pass a JSON array of objects (`?refs=[{…}]`): a repeated parameter cannot carry an object.",
            "style": "form",
            "explode": true,
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "po",
                      "to",
                      "wo",
                      "bom"
                    ],
                    "description": "The hold link kind: po, to, wo or bom."
                  },
                  "ref": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The document id, number or name the hold named."
                  }
                },
                "required": [
                  "kind",
                  "ref"
                ]
              },
              "description": "The hold documents to resolve, up to 50, answered in order."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/schedule": {
      "get": {
        "operationId": "receiving_schedule",
        "summary": "receiving_schedule",
        "description": "The inbound DELIVERY CALENDAR: every open receipt (expected + receiving) in promise order, soonest first. This is the ETA view — `receiving_list` orders by announcement date, which answers a different question. `expectedAt` is epoch ms: the EARLIEST `expectedDeliveryDate` still live on one of the receipt's lines, maintained on the header as the sibling notice and its revisions write those lines. A receipt is due when its first unit is due. `expectedAt: null` means UNSCHEDULED and is returned LAST, newest first — a manual receipt, a peer on contracts 1.0 that sends no dates, or a receipt announced before this field existed. It is never guessed. Overdue is deliberately NOT computed here: 'promised before today' is a question about a calendar day in the merchant's timezone, which this server does not know. `expectedDay` (YYYY-MM-DD) is set when that earliest promise is a bare calendar day with no time: `expectedAt` is then only its UTC midnight, the sort key, so compare `expectedDay` against your own calendar day (overdue once it lies before today) and compare `expectedAt` against your own clock only when `expectedDay` is null. `capped` means either half hit the row limit and this calendar is a page of the calendar, not all of it.\n\n**Operation id:** `receiving_schedule` — the same operation is `app.receiving.schedule({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_schedule`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Any of these origins, e.g. [\"logistified_po\", \"logistified_to\"]: manual, warehouse_transfer, logistified_po, logistified_to, assemblified_wo, logistified_ssr, logistified_mo; absent = every origin. Repeat `sources` for each value (`?sources=logistified_po&sources=logistified_to`), or pass a JSON array (`?sources=[\"logistified_po\",\"logistified_to\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "logistified_po",
              "logistified_to"
            ],
            "schema": {
              "description": "Any of these origins, e.g. [\"logistified_po\", \"logistified_to\"]: manual, warehouse_transfer, logistified_po, logistified_to, assemblified_wo, logistified_ssr, logistified_mo; absent = every origin.",
              "minItems": 1,
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "manual",
                  "warehouse_transfer",
                  "logistified_po",
                  "logistified_to",
                  "assemblified_wo",
                  "logistified_ssr",
                  "logistified_mo"
                ]
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per half (scheduled, unscheduled); 1…100, default 100.",
            "schema": {
              "description": "Rows per half (scheduled, unscheduled); 1…100, default 100.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/receiving/station": {
      "post": {
        "operationId": "receiving_set_station",
        "summary": "receiving_set_station",
        "description": "Set where an open receipt is received: an active receiving station or inbound dock door of its warehouse (null clears it). In the dock flow, goods land in that door's bin. Refused not_a_receive_place otherwise; does not move or receive stock.\n\n**Operation id:** `receiving_set_station` — the same operation is `app.receiving.set_station({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_set_station`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "description": "A receipts id, e.g. \"receipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "stationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedStationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "receiptId",
                  "stationId",
                  "expectedStationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/receiving/suggest-putaway": {
      "get": {
        "operationId": "receiving_suggest_putaway",
        "summary": "receiving_suggest_putaway",
        "description": "Directed putaway (WMS-032): the bin an item should go to. Order — the bin that already holds the variant (its de-facto home bin), else the emptiest pickable bin (optionally inside one zone), else a receiving bin. Answers {kind: \"suggested\", binId, binCode, zone, reason, holdsLots} or {kind: \"none\"} when the warehouse has no usable bin — an explicit fact, never a null. `holdsLots` says the bin already holds lot-tracked units of the item: for an item that tracks lots, a receipt into it without a lot is refused (`lot_required`).\n\n**Operation id:** `receiving_suggest_putaway` — the same operation is `app.receiving.suggest_putaway({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/receiving_suggest_putaway`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "receiving"
        ],
        "x-topic": "receiving",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "receiptId",
            "in": "query",
            "required": false,
            "description": "Supplies the warehouse.",
            "schema": {
              "description": "Supplies the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "scannedCode",
            "in": "query",
            "required": false,
            "description": "Item barcode or sku.",
            "schema": {
              "description": "Item barcode or sku.",
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludeBinIds",
            "in": "query",
            "required": false,
            "description": "Bins already tried and refused; never suggested again. Repeat `excludeBinIds` for each value (`?excludeBinIds=bins_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?excludeBinIds=[\"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "bins_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Bins already tried and refused; never suggested again.",
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          },
          {
            "name": "seed",
            "in": "query",
            "required": false,
            "description": "A booking or planning key; the spread strategy ranks bins by it, so a replay proposes the same bin.",
            "schema": {
              "description": "A booking or planning key; the spread strategy ranks bins by it, so a replay proposes the same bin.",
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/replenishment": {
      "get": {
        "operationId": "replenishment_suggestions",
        "summary": "replenishment_suggestions",
        "description": "Every pick-face below its min level (WHT-016), then every station supply face below its effective min (WMS BN-63d), bounded + cap-disclosed. Each row is one face: refId (`variantId:binId`, what replenishment_materialize names), source (home | station), stations (a station face's stations by code), the face's available, the replenishment target toward max, the best bulk source and its available (never another station's face), the move quantity (capped by source + face capacity) and any live replenish task. Empty when nothing is below min.\n\n**Operation id:** `replenishment_suggestions` — the same operation is `app.replenishment.suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/replenishment_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "replenishment"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/replenishment/materialize": {
      "post": {
        "operationId": "replenishment_materialize",
        "summary": "replenishment_materialize",
        "description": "Turn below-min faces into `replenish` move tasks (WHT-016): pick faces and station supply faces (WMS BN-63d), optionally restricted to named faces by their refill key `variantId:binId` (the suggestions' refId). Deduped: a face that already has a live replenish task, or nothing to move / no source, is skipped. Returns the created task ids and each skipped face with its reason (task_exists, nothing_to_move, not_a_face). An unrestricted run takes only pick faces with no live task and a bulk source, then the station faces below their min, pages on past those with no room left, and creates up to 200 tasks from up to 500 faces a run (`capped`); named faces report their skips.\n\n**Operation id:** `replenishment_materialize` — the same operation is `app.replenishment.materialize({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/replenishment_materialize`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "replenishment"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "refIds": {
                    "description": "Restrict to these faces, by refill key `variantId:binId` (at most 200).",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120,
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests": {
      "get": {
        "operationId": "return_requests_list",
        "summary": "return_requests_list",
        "description": "List customer-initiated return requests (RMAs, OMS-075), in the chosen order (`sort`; newest first by default), one page, with the order, resolution (refund/store_credit/exchange), line/unit counts and status. Filter by one or more statuses (requested, approved, denied, received, refunded, cancelled). `toRefund` lists what waits for money instead: received requests plus approved requests whose order already has a completed return receipt; each row carries `payout`, the newest settlement status. These are created on the store's returns page; this is the admin review queue.\n\n**Operation id:** `return_requests_list` — the same operation is `app.return.requests_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `status` for each value (`?status=requested&status=approved`), or pass a JSON array (`?status=[\"requested\",\"approved\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "requested",
              "approved"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "requested",
                  "approved",
                  "denied",
                  "received",
                  "refunded",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "toRefund",
            "in": "query",
            "required": false,
            "description": "What waits to be settled instead of a status: received, or approved with a completed receipt. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "What waits to be settled instead of a status: received, or approved with a completed receipt.",
              "type": "boolean"
            }
          },
          {
            "name": "labelState",
            "in": "query",
            "required": false,
            "description": "Any of these return-label states (none, creating, sent, in_transit, delivered, failed); absent = any. Repeat `labelState` for each value (`?labelState=none&labelState=creating`), or pass a JSON array (`?labelState=[\"none\",\"creating\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "none",
              "creating"
            ],
            "schema": {
              "description": "Any of these return-label states (none, creating, sent, in_transit, delivered, failed); absent = any.",
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "none",
                  "creating",
                  "sent",
                  "in_transit",
                  "delivered",
                  "failed"
                ]
              }
            }
          },
          {
            "name": "reasonChanged",
            "in": "query",
            "required": false,
            "description": "Only requests where a reviewer changed a line's reason (the customer's own stays as `customerReasons`). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only requests where a reviewer changed a line's reason (the customer's own stays as `customerReasons`).",
              "type": "boolean"
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`submitted:desc` (newest first, the default) or `submitted:asc` (longest waiting first).",
            "schema": {
              "description": "`submitted:desc` (newest first, the default) or `submitted:asc` (longest waiting first).",
              "type": "string",
              "enum": [
                "submitted:desc",
                "submitted:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/return-requests/approve": {
      "post": {
        "operationId": "return_requests_approve",
        "summary": "return_requests_approve",
        "description": "Approve a requested RMA. Approval authorizes the payout and settles it against what the dock actually received: if a return receipt for the order has already been completed, the refund / store credit / exchange release is enqueued by THIS call (the response carries the settled units and amount, and the RMA moves straight to received); otherwise it is enqueued when the goods are scanned in. Either way the amount covers only the units that came back in a sellable grade, priced at what the customer paid. received is not terminal: the outbox settle moves the RMA to refunded when the payout lands, and a payout that cannot be enqueued (all units damaged, exchange without a target) leaves the RMA received with a recorded resolution error — close it with return_requests_resolve.\n\n**Operation id:** `return_requests_approve` — the same operation is `app.return.requests_approve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_approve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "returnRequestId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/cancel": {
      "post": {
        "operationId": "return_requests_cancel",
        "summary": "return_requests_cancel",
        "description": "Cancel a still-open RMA (requested or approved), withdrawing it before resolution.\n\n**Operation id:** `return_requests_cancel` — the same operation is `app.return.requests_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "returnRequestId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/check-photos": {
      "get": {
        "operationId": "return_requests_checkPhotos",
        "summary": "return_requests_checkPhotos",
        "description": "Check a return request's customer photos for visible damage (AI, a suggestion only: it never approves, declines or refunds; the reviewer decides). Reads the first 4 photos by position, each as a reduced copy without metadata and nothing else of the request. Answers { outcome: \"checked\", summary: { face, photo, kinds, text }, photos: [{ evidenceId, verdict, kinds, packagingDamage, unread }] }: `verdict` damage, packaging_damage, clear (no visible damage — never proof there is none), no_product, cant_tell, or unread (`unread` says why: over_budget, busy, timeout, gone, unreadable). Or { outcome: \"not_checked\", reason: rate_limited | not_configured, retryAfterSeconds }. Refused with `conflict` (`details.code: photo_check_off`) while the account has the check off (returns_policy_set `photoCheck`); a request that is not here is `not_found`. Nothing is stored: two calls are two checks.\n\n**Operation id:** `return_requests_checkPhotos` — the same operation is `app.return.requests_checkPhotos({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_checkPhotos`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnRequestId",
            "in": "query",
            "required": true,
            "description": "The return request whose customer photos are checked (`_id` of return_requests.get).",
            "schema": {
              "type": "string",
              "description": "The return request whose customer photos are checked (`_id` of return_requests.get).",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/return-requests/create-label": {
      "post": {
        "operationId": "return_requests_create_label",
        "summary": "return_requests_create_label",
        "description": "Create the return label of an APPROVED RMA with one carrier account (see return_requests_label_options). The label is made in the background: the answer is the attempt's id with status creating, and return_requests_get answers the label once it is issued (with its tracking number and documents) or failed (with the carrier's or the claim's refusal, e.g. return_request_closed). A carrier that charges the label when it is created and prices it first (`priced`) needs `maxCost`, the most it may cost in the account's currency (refused max_cost_required without it); one that states no price refuses a maxCost (max_cost_unpriced). Refused: illegal_transition (not approved), return_label_exists (the RMA has a live label), return_label_unavailable with its reason, unknown_service, unknown_delivery, return_parcel_size_missing (the account's carrier needs the parcel's three sides: pass `parcel`, or set the usual return parcel size in the settings). Pass a `requestKey` to make a retry safe.\n\n**Operation id:** `return_requests_create_label` — the same operation is `app.return.requests_create_label({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_create_label`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "document id of the RMA.",
                    "format": "floormode-id"
                  },
                  "carrierAccountId": {
                    "type": "string",
                    "description": "document id of the parcel carrier account.",
                    "format": "floormode-id"
                  },
                  "serviceCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "the return service (return_requests_label_options); null = the account's own."
                  },
                  "weightGrams": {
                    "description": "the parcel's weight in grams; the products' weights (else 500 g a unit) when omitted.",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 70000
                  },
                  "parcel": {
                    "description": "this return's parcel sides in whole millimetres; the settings' return parcel size when omitted. Bound only where the carrier needs the sides.",
                    "type": "object",
                    "properties": {
                      "lengthMm": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 2700
                      },
                      "widthMm": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 2700
                      },
                      "heightMm": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 2700
                      }
                    },
                    "required": [
                      "lengthMm",
                      "widthMm",
                      "heightMm"
                    ]
                  },
                  "delivery": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "qr",
                      "both",
                      "carrier_email"
                    ],
                    "description": "how the label reaches the customer."
                  },
                  "maxCost": {
                    "description": "the most the label may cost; required where the carrier charges when it is created.",
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 10000
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ]
                  },
                  "requestKey": {
                    "description": "Caller-minted idempotency key (e.g. a UUID), one per logical submit.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "returnRequestId",
                  "carrierAccountId",
                  "serviceCode",
                  "delivery"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/deny": {
      "post": {
        "operationId": "return_requests_deny",
        "summary": "return_requests_deny",
        "description": "Deny a requested RMA with an optional reason. A denied RMA never pays out.\n\n**Operation id:** `return_requests_deny` — the same operation is `app.return.requests_deny({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_deny`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "returnRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/get": {
      "get": {
        "operationId": "return_requests_get",
        "summary": "return_requests_get",
        "description": "Get one customer return request (RMA) with its lines, chosen resolution, estimated refund, prepaid-label state and the linked WMS receipt (refund-on-scan).\n\n**Operation id:** `return_requests_get` — the same operation is `app.return.requests_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnRequestId",
            "in": "query",
            "required": true,
            "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/return-requests/label-options": {
      "get": {
        "operationId": "return_requests_label_options",
        "summary": "return_requests_label_options",
        "description": "What a return label for one RMA can be made with: per active parcel carrier account (max 100) whether it can make this return's label now (`enabled`) and why not (`disabledReason`: no_return_carrier, no_return_address, carrier_cannot_return, awaiting_certification, awaiting_approval, cross_border_without_customs, customs_incomplete, outside_carrier_reach, carrier_setup_incomplete), its return services for the return address's country (the default first), what its carrier needs ready (`needs`: returns_enrolment, return_address_phone, parcel_size), the deliveries it offers this customer (pdf, qr, both, carrier_email), when it bills (`on_use`: free until posted; `at_creation`: charged when created), whether it prices the label first (`priced`: then a label charged when created takes maxCost) and the address the parcel goes to; the default the return label settings name, with the usual return parcel size (`defaults.parcel`); the parcel's weight and its source; and the customs declaration the label would carry. The same decision return_requests_create_label makes.\n\n**Operation id:** `return_requests_label_options` — the same operation is `app.return.requests_label_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_label_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnRequestId",
            "in": "query",
            "required": true,
            "description": "document id of the RMA.",
            "schema": {
              "type": "string",
              "description": "document id of the RMA.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/return-requests/refresh-label-tracking": {
      "post": {
        "operationId": "return_requests_refresh_label_tracking",
        "summary": "return_requests_refresh_label_tracking",
        "description": "Ask the carrier for a return label's latest tracking: queued in the background, at most once a minute (a request still open is answered, not repeated). The label then moves to in transit, delivered or exception as the carrier's newest checkpoint says (see return_requests_get). Refused: a label that is not issued, in transit or in exception (`illegal_transition`), one with no carrier reference (`return_label_not_trackable`), a disconnected carrier account.\n\n**Operation id:** `return_requests_refresh_label_tracking` — the same operation is `app.return.requests_refresh_label_tracking({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_refresh_label_tracking`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "returnLabelId": {
                    "type": "string",
                    "description": "A returnLabels id, e.g. \"returnLabels_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "returnRequestId",
                  "returnLabelId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/resolve": {
      "post": {
        "operationId": "return_requests_resolve",
        "summary": "return_requests_resolve",
        "description": "Manually resolve a received RMA: moves it to its terminal refunded state after the merchant compensated the customer outside the automatic payout (or decided a fully-damaged return pays nothing). This is the exit for an RMA stuck at received — every unit graded damaged, an exchange with no replacement variant, or a refund/credit the outbox gave up on. Refused (`conflict`) while a payout is still being delivered.\n\n**Operation id:** `return_requests_resolve` — the same operation is `app.return.requests_resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_resolve`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "returnRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/set-reasons": {
      "post": {
        "operationId": "return_requests_set_reasons",
        "summary": "return_requests_set_reasons",
        "description": "Change the reason on lines of a return request (the reviewed reason); the customer's own choice stays on record (`customerReasonKey` / `customerReasonCode` on the line, set on the first change, cleared on a change back). `lines` names 1–50 lines, each with `reasonKey` (a reason the store offers, returns_policy_get; the line's current or the customer's own reason is accepted even when archived) and `expectedReasonKey` (the line's `reasonKey ?? reasonCode` as you read it). All or nothing: a line that moved since is `conflict` `return_reason_moved`, a declined or cancelled request `conflict` `return_reason_closed`, a line of another request `invalid_input` `return_reason_line_unknown`, a reason not offered `invalid_input` `return_reason_unknown`. `source` (person | suggestion) is recorded on the request's timeline. Approval and rules decided at submit are not re-decided; the grading default and the queue's Reason follow the new reason, and so do fees and value deductions: a change to a fault refunds what was already taken (`topUp`, one refund or store credit through the request's ledger, reopening a refunded request until Shopify confirms); nothing is taken back.\n\n**Operation id:** `return_requests_set_reasons` — the same operation is `app.return.requests_set_reasons({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_set_reasons`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "The return request whose lines get a reviewed reason.",
                    "format": "floormode-id"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "person",
                      "suggestion"
                    ],
                    "description": "`person`, or `suggestion` when a reason suggestion was used (recorded only)."
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "lineId": {
                          "type": "string",
                          "description": "A returnRequestLines id, e.g. \"returnRequestLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "reasonKey": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40,
                          "description": "The store's reason key: a built-in's code or `r<n>` (returns_policy_get)."
                        },
                        "expectedReasonKey": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40,
                          "description": "The line's reason as you saw it (`reasonKey ?? reasonCode`); a line that moved since is refused."
                        }
                      },
                      "required": [
                        "lineId",
                        "reasonKey",
                        "expectedReasonKey"
                      ]
                    }
                  }
                },
                "required": [
                  "returnRequestId",
                  "source",
                  "lines"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/settle": {
      "post": {
        "operationId": "return_requests_settle",
        "summary": "return_requests_settle",
        "description": "Settle an approved RMA against the goods the dock has already booked: the same payout an approval or a receipt completion enqueues (refund / store credit / exchange release for the units that came back in a sellable grade), for an RMA whose receipt was completed 'booked here only'. Answers `applied` (payout enqueued, RMA received) or `nothing_received` (no completed receipt of the order carries its goods — recorded on the RMA, nothing written). Refused (`conflict`) unless the RMA is approved.\n\n**Operation id:** `return_requests_settle` — the same operation is `app.return.requests_settle({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_settle`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "returnRequestId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/return-requests/suggest-reasons": {
      "get": {
        "operationId": "return_requests_suggestReasons",
        "summary": "return_requests_suggestReasons",
        "description": "Suggest which of the store's return reasons the customer's own notes describe (AI, a suggestion only: it never changes a reason, approves, declines or refunds; the reviewer decides). Reads the request note and the first 8 line notes by position, with e-mail addresses, phone numbers, links and order or other long numbers replaced first, and the store's offered reasons; nothing else of the request, the order or the customer. Answers { outcome: \"read\", capped, note: reading | null, lines: [{ lineId, reasonKeyAtAsk, reading, skipped }] } (`skipped`: a line note past the first 8, not read; `capped`: notes or lines past the first 8 notes or 50 lines were not read), a reading { face, suggestion: { key, code, label } | null, unread }: `face` suggested, same (the line already has it), no_reason, several, unsure, no_text or unread (`unread` says why: over_budget, busy, timeout, unreadable). A request note is never attributed to a line. To use a suggestion, call return_requests_set_reasons with `source: \"suggestion\"` and `expectedReasonKey` = `reasonKeyAtAsk`. Or { outcome: \"not_read\", reason: rate_limited | not_configured, retryAfterSeconds }. Refused with `conflict` (`details.code: reason_assist_off`) while the account has it off (returns_policy_set `reasonAssist`); a request that is not here is `not_found`. Nothing is stored: two calls are two readings.\n\n**Operation id:** `return_requests_suggestReasons` — the same operation is `app.return.requests_suggestReasons({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_suggestReasons`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnRequestId",
            "in": "query",
            "required": true,
            "description": "The return request whose customer notes are read (`_id` of return_requests.get).",
            "schema": {
              "type": "string",
              "description": "The return request whose customer notes are read (`_id` of return_requests.get).",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/return-requests/void-label": {
      "post": {
        "operationId": "return_requests_void_label",
        "summary": "return_requests_void_label",
        "description": "Take back an RMA's issued return label. A label billed only when posted whose carrier needs no void (DHL) is set `voided` (`superseded`) at once and a new one can be created; an unused one costs nothing (answer `status: voided`). A label only the carrier can take back (EasyPost, Sendcloud) is cancelled at the carrier in the background (answer `status: void_queued` with its `outboxId`): return_requests_get then shows the label voided (`carrier_void`, or `carrier_void_requested` when the carrier still confirms it) or, on the issued label, the carrier's refusal (`return_label_void_refused`) or an unanswered cancellation (`return_label_void_unresolved`: check the carrier account). Refused: a label no carrier takes back (`return_label_not_voidable`), the label of an RMA that is received, refunded, denied or cancelled (`return_request_closed`), an earlier cancellation still unanswered (`effect_in_flight`).\n\n**Operation id:** `return_requests_void_label` — the same operation is `app.return.requests_void_label({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/return_requests_void_label`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "return-requests"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnRequestId": {
                    "type": "string",
                    "description": "document id of the RMA.",
                    "format": "floormode-id"
                  },
                  "returnLabelId": {
                    "type": "string",
                    "description": "document id of the return label.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "returnRequestId",
                  "returnLabelId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns": {
      "get": {
        "operationId": "returns_list",
        "summary": "returns_list",
        "description": "List mirrored Shopify returns, in the chosen order (`sort`; newest first by default), one page, with the order, the reverse-fulfillment-order count, the units expected back and the status of our return receipt. Filter by Shopify return status (REQUESTED, OPEN, CLOSED, DECLINED, CANCELED) or hide returns we already finished receiving.\n\n**Operation id:** `returns_list` — the same operation is `app.returns.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of REQUESTED, OPEN, CLOSED, DECLINED, CANCELED; absent = every status. Repeat `status` for each value (`?status=REQUESTED&status=OPEN`), or pass a JSON array (`?status=[\"REQUESTED\",\"OPEN\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "REQUESTED",
              "OPEN"
            ],
            "schema": {
              "description": "Any of REQUESTED, OPEN, CLOSED, DECLINED, CANCELED; absent = every status.",
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "REQUESTED",
                  "OPEN",
                  "CLOSED",
                  "DECLINED",
                  "CANCELED"
                ]
              }
            }
          },
          {
            "name": "openReceiptsOnly",
            "in": "query",
            "required": false,
            "description": "Only returns without a completed receipt of ours. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only returns without a completed receipt of ours.",
              "type": "boolean"
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (most recently recorded in Floormode first, the default) or `created:asc` (first recorded first).",
            "schema": {
              "description": "`created:desc` (most recently recorded in Floormode first, the default) or `created:asc` (first recorded first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/approve-request": {
      "post": {
        "operationId": "returns_approve_request",
        "summary": "returns_approve_request",
        "description": "Approve a return the customer requested in Shopify (OMS-1 G-15). Only a return in the Requested state, one decision per return at a time (action_in_flight). Shopify's return status is the proof: a return already approved settles as confirmed without asking again. The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `returns_approve_request` — the same operation is `app.returns.approve_request({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_approve_request`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "shopifyReturnId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify return id of a return the customer requested.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "notifyCustomer": {
                    "type": "boolean",
                    "description": "Tell the customer about the decision by email."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "shopifyReturnId",
                  "requestKey",
                  "notifyCustomer"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/create": {
      "post": {
        "operationId": "returns_create",
        "summary": "returns_create",
        "description": "Create a return in Shopify for shipped items of an order (OMS-1 G-15), with a return reason per line. Admitted only while no cancellation or item edit is in flight; the units are checked against what each line can still return, and while earlier returns are still being confirmed the answer is ok false with reason order_checking. Shopify's returnable items are read again before the return is created: when they no longer cover the request nothing is created and the request settles as not applied. The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `returns_create` — the same operation is `app.returns.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "shopifyLineItemId": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Numeric Shopify line item id, as listed in the order's lineItems.",
                          "format": "floormode-id"
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "description": "Shipped units of the line to return."
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "damaged",
                            "defective",
                            "wrong_item",
                            "not_as_described",
                            "too_small",
                            "too_large",
                            "changed_mind",
                            "arrived_late",
                            "other"
                          ],
                          "description": "Why the customer returns it; sent to Shopify as the return reason."
                        }
                      },
                      "required": [
                        "shopifyLineItemId",
                        "quantity",
                        "reason"
                      ]
                    },
                    "description": "The shipped items the customer sends back."
                  },
                  "notifyCustomer": {
                    "type": "boolean",
                    "description": "Send Shopify's return email to the customer."
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "requestKey",
                  "lines",
                  "notifyCustomer"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/decline-request": {
      "post": {
        "operationId": "returns_decline_request",
        "summary": "returns_decline_request",
        "description": "Decline a return the customer requested in Shopify (OMS-1 G-15) with Shopify's decline reason and an optional note to the customer. Only a return in the Requested state, one decision per return at a time (action_in_flight). The same requestKey with the same arguments replays the first answer.\n\n**Operation id:** `returns_decline_request` — the same operation is `app.returns.decline_request({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_decline_request`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify order id as a string.",
                    "format": "floormode-id"
                  },
                  "shopifyReturnId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Numeric Shopify return id of a return the customer requested.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "notifyCustomer": {
                    "type": "boolean",
                    "description": "Tell the customer about the decision by email."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "final_sale",
                      "return_period_ended",
                      "other"
                    ],
                    "description": "Why the request is declined: Shopify's ReturnDeclineReason, lower-cased."
                  },
                  "note": {
                    "description": "A note to the customer about the decline.",
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "shopifyOrderId",
                  "shopifyReturnId",
                  "requestKey",
                  "notifyCustomer",
                  "reason"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/dispositions/resolve": {
      "post": {
        "operationId": "outbox_resolveReturnDisposition",
        "summary": "outbox_resolveReturnDisposition",
        "description": "Resolve one Shopify return update (`rfo_dispose`) in doubt: an attempt's answer was lost and Shopify's dispositions could not say whether it applied, so the row ended with its claim standing and no retry sends it blind. After checking the return in Shopify, `applied` settles it delivered (its receipt lines are confirmed and the items' stock publication resumes); `nothing` releases the claim and sends it again. Refuses (`conflict`) a row that has not ended or is not in doubt.\n\n**Operation id:** `outbox_resolveReturnDisposition` — the same operation is `app.outbox.resolveReturnDisposition({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/outbox_resolveReturnDisposition`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns (integrations)"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outboxId": {
                    "type": "string",
                    "description": "document id of the ended `rfo_dispose` row (the return receipt's `failedOutbox`).",
                    "format": "floormode-id"
                  },
                  "shopifyShows": {
                    "type": "string",
                    "enum": [
                      "applied",
                      "nothing"
                    ],
                    "description": "What the return in Shopify shows for this update's items: `applied` settles the update as delivered, `nothing` sends it again."
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "outboxId",
                  "shopifyShows"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/get": {
      "get": {
        "operationId": "returns_get",
        "summary": "returns_get",
        "description": "Get one mirrored return with its reverse fulfillment orders (line items incl. dispositions and each line's product and variant title), reverse deliveries (tracking) and our return receipts.\n\n**Operation id:** `returns_get` — the same operation is `app.returns.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnId",
            "in": "query",
            "required": false,
            "description": "document id of the return.",
            "schema": {
              "description": "document id of the return.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "shopifyReturnId",
            "in": "query",
            "required": false,
            "description": "Numeric Shopify return id.",
            "schema": {
              "description": "Numeric Shopify return id.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/label-settings": {
      "get": {
        "operationId": "returns_label_settings_get",
        "summary": "returns_label_settings_get",
        "description": "The return label settings and what they resolve to: the warehouse returns go to (null = the only active one), the carrier account (null = the first that can make return labels) and its return service, whether the customer portal makes labels itself (`portalAutoLabel`) and prefers a QR code (`preferQr`), the `revision`, the address the carrier sends returns to (a DHL account's returns receiver), and what makes a stored choice unusable.\n\n**Operation id:** `returns_label_settings_get` — the same operation is `app.returns.label_settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_label_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "returns_label_settings_set",
        "summary": "returns_label_settings_set",
        "description": "Save the return label settings, fenced by `expectedRevision` (revision_mismatch when they changed meanwhile). `parcel`: the usual return parcel's sides, for a carrier that needs them; omitted keeps the stored size, null clears it. Refused: carrier_account_unusable, unknown_service, return_address_incomplete. An account with a setup step left (`returns_enrolment_missing`, `return_address_phone_missing`, `return_parcel_size_missing`) saves and is reported among the settings' `problems`. Answers the warning return_address_differs when a DHL account's returns receiver is not the chosen warehouse: DHL sends the parcels there.\n\n**Operation id:** `returns_label_settings_set` — the same operation is `app.returns.label_settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_label_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnWarehouseId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carrierAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A carrierAccounts id, e.g. \"carrierAccounts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "serviceCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "portalAutoLabel": {
                    "type": "boolean"
                  },
                  "preferQr": {
                    "type": "boolean"
                  },
                  "parcel": {
                    "description": "the usual return parcel's sides; null clears it, omitted keeps it.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "lengthMm": {
                            "type": "integer",
                            "minimum": 10,
                            "maximum": 2700
                          },
                          "widthMm": {
                            "type": "integer",
                            "minimum": 10,
                            "maximum": 2700
                          },
                          "heightMm": {
                            "type": "integer",
                            "minimum": 10,
                            "maximum": 2700
                          }
                        },
                        "required": [
                          "lengthMm",
                          "widthMm",
                          "heightMm"
                        ],
                        "description": "the return parcel's three sides in whole millimetres, each 10–2,700, for a carrier that needs the sides."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "the revision the settings were read at; refused revision_mismatch when it moved."
                  }
                },
                "required": [
                  "returnWarehouseId",
                  "carrierAccountId",
                  "serviceCode",
                  "portalAutoLabel",
                  "preferQr",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/match-parcel": {
      "post": {
        "operationId": "returns_match_parcel",
        "summary": "returns_match_parcel",
        "description": "Find the returns an arriving parcel may be (AI lane P-D): pass the codes scanned or typed at the returns desk (a tracking number, a carrier barcode's payload, `RMA-…`, `RET-…`, a Shopify return name) or `readings` ({ key, carrier }). Matches are EXACT on the number's normal form and carrier-aware (a named carrier that conflicts with the held one never matches); never fuzzy. Each row is a card to choose from: an RMA, a Shopify return, a receipt that already holds the parcel (`kind: receipt`), an outbound label (`delivered` true = a reused box, not a return to sender) or an enclosed DHL return label; at most 5, `capped` says more exist.\n\n**Operation id:** `returns_match_parcel` — the same operation is `app.returns.match_parcel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_match_parcel`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "codes": {
                    "default": [],
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "readings": {
                    "default": [],
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 48
                        },
                        "carrier": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "dhl",
                                "dpd",
                                "ups",
                                "gls",
                                "hermes",
                                "royal_mail",
                                "usps",
                                "fedex",
                                "other"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "key",
                        "carrier"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/policy": {
      "get": {
        "operationId": "returns_policy_get",
        "summary": "returns_policy_get",
        "description": "Get the returns policy (OMS-075): the return window in days after fulfillment and the SKUs / order tags that are final sale, whether the defaults are still in force (`isDefault`), and the address of the returns page in this store (`returnsUrl`, share it with customers; null while the store's address is unknown or its customer links lead to the carrier).\n\n**Operation id:** `returns_policy_get` — the same operation is `app.returns.policy_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_policy_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "returns_policy_set",
        "summary": "returns_policy_set",
        "description": "Change the returns policy: `returnWindowDays` (between one day and one year after fulfillment), `finalSaleSkus` (never returnable, case-insensitive), `finalSaleTags` (an order carrying one is final sale), `reviewEveryRequest` (off: a store request inside the window approves itself unless an item is final sale, its reason asks for photos or the order is held), `keepItBelow` (the customer keeps a return refunding less, in the store's currency; null is off), `reasons` (the store's return reasons: every built-in by its code, your own as `r<n>` with a name, each with its usual grade and whether it asks for photos; one left out is kept archived), `photoCheck` (the review sheet offers the AI photo check, return_requests_checkPhotos) and `reasonAssist` (the review sheet offers the AI reason suggestion, return_requests_suggestReasons). Each part sent replaces what is stored; the parts not sent stay. The store's returns apply it on the next look.\n\n**Operation id:** `returns_policy_set` — the same operation is `app.returns.policy_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_policy_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnWindowDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "finalSaleSkus": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "finalSaleTags": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "reviewEveryRequest": {
                    "type": "boolean"
                  },
                  "reasons": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "damaged",
                            "defective",
                            "wrong_item",
                            "not_as_described",
                            "too_small",
                            "too_large",
                            "changed_mind",
                            "arrived_late",
                            "other"
                          ]
                        },
                        "label": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 60
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "disposition": {
                          "type": "string",
                          "enum": [
                            "restock",
                            "quarantine",
                            "scrap"
                          ]
                        },
                        "photoRequired": {
                          "type": "boolean"
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "key",
                        "code",
                        "label",
                        "disposition",
                        "photoRequired",
                        "archived"
                      ]
                    }
                  },
                  "keepItBelow": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "photoCheck": {
                    "type": "boolean"
                  },
                  "reasonAssist": {
                    "type": "boolean"
                  },
                  "grades": {
                    "description": "The grades a returned unit is booked in (up to 8; null turns grades off): each with where its units go and its refund, full, hold (for review) or deduct (deductPercent 1–90 off its value, never on a fault). A grade left out is kept archived. The answer's warnings name a list that probably does not mean what it says.",
                    "anyOf": [
                      {
                        "maxItems": 8,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b",
                                "g3",
                                "g4",
                                "g5",
                                "g6",
                                "g7",
                                "g8"
                              ]
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "meaning": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "disposition": {
                              "type": "string",
                              "enum": [
                                "restock",
                                "quarantine",
                                "scrap"
                              ]
                            },
                            "refund": {
                              "type": "string",
                              "enum": [
                                "full",
                                "hold",
                                "deduct"
                              ]
                            },
                            "deductPercent": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 90
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label",
                            "meaning",
                            "disposition",
                            "refund",
                            "deductPercent",
                            "archived"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fees": {
                    "description": "A restocking fee (percent) and a flat return shipping fee (in the store's currency, tax included) taken off a refund at settlement, never on an exchange or a fault; frozen on each request when it is made. null turns them off.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "restockingPercent": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 90
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnShippingAmount": {
                            "anyOf": [
                              {
                                "type": "number",
                                "exclusiveMinimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "waiveForStoreCredit": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "restockingPercent",
                          "returnShippingAmount",
                          "waiveForStoreCredit"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "returnerSignal": {
                    "description": "The frequent-returner signal (off: null): a return asked through Floormode counts the customer's other non-cancelled, non-declined returns with the same e-mail, across the account's stores, within `windowDays` (30–365), up to `threshold` (2–50); reaching it stores the count on the return (`returnerCount`) and sends it to review. It never refuses a return.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "threshold": {
                            "type": "integer",
                            "minimum": 2,
                            "maximum": 50
                          },
                          "windowDays": {
                            "type": "integer",
                            "minimum": 30,
                            "maximum": 365
                          }
                        },
                        "required": [
                          "threshold",
                          "windowDays"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "useShopifyRules": {
                    "description": "Shopify's return rules decide the window (off by default): each order is judged by the return policy profile of its market, as it stood when the order was placed, counted from delivery. Applies where the store granted the read_legal_policies scope and was read (returns_rules_list); elsewhere `returnWindowDays` does. A window Floormode cannot establish sends the request to review, never a refusal.",
                    "type": "boolean"
                  },
                  "transitBufferDays": {
                    "description": "Days added to a shipment when Shopify knows no delivery date (0–30, 7 by default), under Shopify's return rules.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 30
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/receipts": {
      "get": {
        "operationId": "returns_receiving_list",
        "summary": "returns_receiving_list",
        "description": "List return receipts, in the chosen order (`sort`; newest first by default), one page, with units per disposition. Filter by status (open, received) or by the return they belong to.\n\n**Operation id:** `returns_receiving_list` — the same operation is `app.returns.receiving_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of open, received, cancelled; absent = every status. Repeat `status` for each value (`?status=open&status=received`), or pass a JSON array (`?status=[\"open\",\"received\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "open",
              "received"
            ],
            "schema": {
              "description": "Any of open, received, cancelled; absent = every status.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "received",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "returnId",
            "in": "query",
            "required": false,
            "description": "Receipts of this return only.",
            "schema": {
              "description": "Receipts of this return only.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "returns_receiving_create",
        "summary": "returns_receiving_create",
        "description": "Open a return receipt (`#RET-…`). Link it to a mirrored return by returnId or shopifyReturnId; without either it is a blind return (goods without a Shopify return), which may still be attributed to an order via shopifyOrderId. A receiver limited to some warehouses opens receipts in those only (`out_of_scope`). The answer's `receivedAtStationId` is the returns station the receipt is attributed to (null for none). `returnRequestId` names the RMA the parcel is for (from `returns_match_parcel`): completion settles that RMA only; it must still be approved, on the receipt's order and on no other open receipt. `parcelKey` keeps the parcel's tracking number on the receipt (in its form under `parcelCarrier`, when named) and is refused (`parcel_already_received`) while an open or completed receipt holds it. Pass a `requestKey` per opening, kept across retries of it: a lost answer re-sent answers the receipt the first call opened, never a second one; the same key for another opening is refused (`idempotency_key_reused`).\n\n**Operation id:** `returns_receiving_create` — the same operation is `app.returns.receiving_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "stationId": {
                    "description": "A station of the warehouse the receipt is attributed to (the returns station's PC); an unknown, foreign or retired station is ignored, never refused.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "returnId": {
                    "type": "string",
                    "description": "A returns id, e.g. \"returns_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shopifyReturnId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "shopifyOrderId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "returnRequestId": {
                    "type": "string",
                    "description": "A returnRequests id, e.g. \"returnRequests_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "parcelKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "parcelCarrier": {
                    "type": "string",
                    "enum": [
                      "dhl",
                      "dpd",
                      "ups",
                      "gls",
                      "hermes",
                      "royal_mail",
                      "usps",
                      "fedex",
                      "other"
                    ]
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/receipts/cancel": {
      "post": {
        "operationId": "returns_receiving_cancel",
        "summary": "returns_receiving_cancel",
        "description": "Cancel an OPEN return receipt that has booked nothing — the exit for a receipt opened against the wrong return or by mistake. Terminal (`open → cancelled`); no stock moves and nothing is reported to Shopify. Refused with `conflict` (`code: receipt_has_lines`) once a line is booked, because every booked line already moved stock: complete the receipt instead. Idempotent on an already-cancelled receipt.\n\n**Operation id:** `returns_receiving_cancel` — the same operation is `app.returns.receiving_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnReceiptId": {
                    "type": "string",
                    "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "description": "Why it was cancelled (timeline only).",
                    "type": "string"
                  }
                },
                "required": [
                  "returnReceiptId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/receipts/complete": {
      "post": {
        "operationId": "returns_receiving_complete",
        "summary": "returns_receiving_complete",
        "description": "Close a return receipt. For every reverse fulfillment order it touched, one `rfo_dispose` job is queued: restock → RESTOCKED, quarantine → PROCESSING_REQUIRED, scrap → NOT_RESTOCKED — the graded condition is kept on the line and does not change the Shopify disposition. The tenant object only records the intent; the Worker executes `reverseFulfillmentOrderDispose`. Refund-on-scan is a declared choice: `payOutApprovedRequests` (default true) resolves the approved return requests of the receipt's order — refund / store credit / exchange ride the outbox — and `false` closes the receipt while leaving them approved (`unresolvedRequests`). The answer's `settlement` is what the finish settled, read from the ledger: queued payouts per resolution with their amounts in minor units at `decimals` of `currency`, zero-value settlements (`satisfied`), payouts held for review with their reason, and the approved requests still waiting for goods. With a `requestKey` a retry answers the finish's own answer (`settlementAsOf: \"finish\"`); without one, a call on a finished receipt answers the ledger as it stands now (`settlementAsOf: \"now\"`).\n\n**Operation id:** `returns_receiving_complete` — the same operation is `app.returns.receiving_complete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_complete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnReceiptId": {
                    "type": "string",
                    "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "stationId": {
                    "description": "The finishing returns station's id: it takes the receipt's attribution when it is one of the warehouse's; otherwise ignored.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "payOutApprovedRequests": {
                    "description": "Resolve the order's approved RMAs on completion (default true).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "returnReceiptId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/receipts/get": {
      "get": {
        "operationId": "returns_receiving_get",
        "summary": "returns_receiving_get",
        "description": "Get one return receipt with its graded lines (condition, disposition, bin and the Shopify disposition type each line will report). `unmatchedLines` counts the graded lines of a return-linked receipt that matched NO reverse fulfillment order line — their disposition is never reported to Shopify (each is also a `return_line_unmatched` timeline event); always 0 for a blind receipt.\n\n**Operation id:** `returns_receiving_get` — the same operation is `app.returns.receiving_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnReceiptId",
            "in": "query",
            "required": true,
            "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/receipts/inspection": {
      "get": {
        "operationId": "returns_inspection_context",
        "summary": "returns_inspection_context",
        "description": "Read receipt-linked quarantine inspection quantities, original grading and stock-proof blockers.\n\n**Operation id:** `returns_inspection_context` — the same operation is `app.returns.inspection_context({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_inspection_context`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnReceiptId",
            "in": "query",
            "required": true,
            "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/receipts/inspection/history": {
      "get": {
        "operationId": "returns_inspection_history",
        "summary": "returns_inspection_history",
        "description": "Read immutable inspection releases for one return receipt line, newest first. Each row preserves actor, reason, quantity, time and exact movement/bin/lot identities. Pass the returned cursor to read older decisions.\n\n**Operation id:** `returns_inspection_history` — the same operation is `app.returns.inspection_history({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_inspection_history`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "returnReceiptLineId",
            "in": "query",
            "required": true,
            "description": "A returnReceiptLines id, e.g. \"returnReceiptLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A returnReceiptLines id, e.g. \"returnReceiptLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/receipts/inspection/release": {
      "post": {
        "operationId": "returns_inspection_release",
        "summary": "returns_inspection_release",
        "description": "Record an explicit physical inspection and move the exact returned quantity and lot into a sellable bin. Preserves original grading and Shopify disposition; never retries disposal or refunds.\n\n**Operation id:** `returns_inspection_release` — the same operation is `app.returns.inspection_release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_inspection_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnReceiptLineId": {
                    "type": "string",
                    "description": "A returnReceiptLines id, e.g. \"returnReceiptLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "qty": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "toBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "physicallyInspected": {
                    "type": "boolean",
                    "const": true
                  },
                  "expectedReleasedQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "returnReceiptLineId",
                  "qty",
                  "toBinId",
                  "reason",
                  "physicallyInspected",
                  "expectedReleasedQty",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/receipts/record-line": {
      "post": {
        "operationId": "returns_receiving_record_line",
        "summary": "returns_receiving_record_line",
        "description": "Receive one returned item. The disposition drives the ledger: restock → `return` movement into a sellable bin (Shopify availability follows), quarantine → `return` movement into the warehouse's QUAR-01 bin (created on first use, not sellable), scrap → no stock movement at all. Damaged goods cannot be restocked. A restock of a bill whose Shopify number Assemblified computes (dynamic or hold quantity) follows the bill's return setting where Assemblified states it (contracts 3.7.0, `bill-return-v1`, at a location whose takeover Floormode stated), and Shopify hears NOT_RESTOCKED: kept whole, the unit goes on the shelf as Assemblified's and Assemblified hears it; taken apart, its parts are booked into the warehouse's UNASSIGNED-01, never the scanned shelf, and the answer's `brokenDown` names that bin and each part's units (null otherwise). Without that statement such a bill, or, with the Assemblified connection on, an item Assemblified has not answered for yet, is booked as quarantine instead (`disposition: \"quarantine\"`, the line's `reasonCode` `assemblified_computed`, `assemblified_unresolved` or `assemblified_break_down_by_hand`): Shopify hears PROCESSING_REQUIRED and keeps Assemblified's number. This door asks Assemblified first about an item it has not answered for, so such an item is quarantined only when Assemblified cannot be reached or will not answer; the answer's `quarantinedBecause` names why a restock went to quarantine (null otherwise). The line is matched to a reverse-fulfillment-order line automatically (or via rfoLineItemId) so `returns_receiving_complete` can dispose it on Shopify; a booking that brings more than the return still expects links the expected units and books the rest on a line of its own (`surplusQty`), which Shopify is never told about. A LOCAL item (VMAT-/ASM-/CSTM-) is a resolvable scan code like any other, so the same ownership gate applies: restocking one mirrors the new levels to its owning peer, and is refused with a coded `details.localRefusal` when the item is frozen history, still unplaced, a catalog placeholder, or archived by its owner. For an item that tracks lots, restocking or quarantining without a lot into a bin that already holds lot-tracked units of it is refused with `details.code: \"lot_required\"`. Any item may name a lot it already has; only an item that tracks lots may bring a new one (`details.code: \"lot_not_tracked\"`). With a `requestKey` a lost answer re-sent answers the first booking and moves no stock twice; the same key for another line is refused (`idempotency_key_reused`).\n\n**Operation id:** `returns_receiving_record_line` — the same operation is `app.returns.receiving_record_line({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_receiving_record_line`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnReceiptId": {
                    "type": "string",
                    "description": "A returnReceipts id, e.g. \"returnReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "condition": {
                    "description": "Defaults to sellable.",
                    "type": "string",
                    "enum": [
                      "sellable",
                      "damaged"
                    ]
                  },
                  "gradeKey": {
                    "description": "The store's return grade (returns_policy_get's policy.grades): it sets the condition (a held grade's units are damaged), freezes its value deduction on the line and, with no bin named, sends B-stock to BSTK-01. unknown_grade for one the store does not offer; deduction_rates_full past the refund rates one order item may come back under.",
                    "type": "string",
                    "enum": [
                      "a",
                      "b",
                      "g3",
                      "g4",
                      "g5",
                      "g6",
                      "g7",
                      "g8"
                    ]
                  },
                  "disposition": {
                    "type": "string",
                    "enum": [
                      "restock",
                      "quarantine",
                      "scrap"
                    ]
                  },
                  "toBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toBinCode": {
                    "type": "string"
                  },
                  "reasonCode": {
                    "description": "A known adjustment reason (damaged, lost, …); an unknown code is refused.",
                    "type": "string"
                  },
                  "rfoLineItemId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "lotNumber": {
                    "description": "Lot of the returned goods, only for a disposition that enters stock: a lot the item already has, or a new one for an item that tracks lots.",
                    "type": "string"
                  },
                  "expiryDate": {
                    "description": "ISO calendar day the lot expires on; only together with a lot number.",
                    "type": "string"
                  },
                  "serials": {
                    "description": "One serial per returned unit, for an item that tracks serials: each must have shipped on this return's order (serial_not_from_order otherwise). A restock puts an item that records its serials at receiving back in stock; a scrap scraps the units.",
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "askKitOwnerFirst": {
                    "description": "Set by this door itself, which asks Assemblified about an unanswered item and books again; a value given here is ignored.",
                    "type": "boolean"
                  },
                  "kitOwnerAbsentVariantIds": {
                    "description": "Set by this door itself: the unanswered items whose store Assemblified never ran on, booked as plain; a value given here is ignored.",
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  }
                },
                "required": [
                  "returnReceiptId",
                  "qty",
                  "disposition"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/returns/rules": {
      "get": {
        "operationId": "returns_rules_list",
        "summary": "returns_rules_list",
        "description": "Shopify's return rules as Floormode last read them (WMS BN-24b): per store, whether it granted the scopes (read_legal_policies for the rules, read_markets for which market uses which), when it was read, and each return policy profile with its current terms (accepts returns, window days or -1 for no limit, counted from the item's or the last item's delivery, extended past weekends) and the regions that use it. `capped`: more profiles or regions than one read keeps.\n\n**Operation id:** `returns_rules_list` — the same operation is `app.returns.rules_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_rules_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/returns/rules/refresh": {
      "post": {
        "operationId": "returns_rules_refresh",
        "summary": "returns_rules_refresh",
        "description": "Read Shopify's return rules again now, for every store that granted the read_legal_policies scope (the night reads them too). Answers how many stores were asked.\n\n**Operation id:** `returns_rules_refresh` — the same operation is `app.returns.rules_refresh({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/returns_rules_refresh`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "returns"
        ],
        "x-topic": "returns",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/roles": {
      "get": {
        "operationId": "roles_list",
        "summary": "roles_list",
        "description": "List the roles (max 200): the built-in Admin, Manager and Floor roles and the custom roles, each with the permissions it allows now. A custom role edit WorkOS has not confirmed yet is marked pending and counts only where it narrows. Archived roles are left out.\n\n**Operation id:** `roles_list` — the same operation is `app.roles.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/roles_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "roles"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "roles_save",
        "summary": "roles_save",
        "description": "Create (no roleId) or edit a custom role: name, description, permissions. Needs team.roles and the caller's own P&H account; only permissions the caller holds; the built-in Admin, Manager and Floor roles are read-only (duplicate them). The role is written to the P&H account; until it confirms, the role allows only what both the old and the new permissions allow.\n\n**Operation id:** `roles_save` — the same operation is `app.roles.save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/roles_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "roles"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 48
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 150
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "permissions": {
                    "maxItems": 44,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "orders.view",
                        "orders.manage",
                        "orders.cancel_refund",
                        "fulfillment.view",
                        "fulfillment.plan",
                        "fulfillment.assign",
                        "shipping.labels",
                        "inventory.view",
                        "inventory.adjust",
                        "inventory.counts",
                        "inventory.approve",
                        "inventory.transfers",
                        "receiving.manage",
                        "catalog.manage",
                        "returns.view",
                        "returns.manage",
                        "reports.view",
                        "warehouse.setup",
                        "automation.manage",
                        "settings.manage",
                        "integrations.manage",
                        "privacy.manage",
                        "billing.manage",
                        "api.use",
                        "stores.manage",
                        "team.view",
                        "team.people",
                        "team.roles",
                        "team.devices",
                        "labour.today",
                        "labour.shifts",
                        "labour.timesheets",
                        "labour.productivity",
                        "floor.use",
                        "floor.pick",
                        "floor.pack",
                        "floor.receive",
                        "floor.count",
                        "floor.move",
                        "floor.returns",
                        "floor.load",
                        "floor.stock",
                        "floor.approve",
                        "floor.wallboard"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "permissions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/roles/archive": {
      "post": {
        "operationId": "roles_archive",
        "summary": "roles_archive",
        "description": "Archive a custom role nobody holds: it is deleted in the P&H account and leaves the role list once that confirms. Refused while a person, a P&H membership or the default staff role uses it.\n\n**Operation id:** `roles_archive` — the same operation is `app.roles.archive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/roles_archive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "roles"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "roleId",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/roles/duplicate": {
      "post": {
        "operationId": "roles_duplicate",
        "summary": "roles_duplicate",
        "description": "Copy a built-in or custom role into a new custom role (name defaults to the source's name with \"copy\"). Only permissions the caller holds.\n\n**Operation id:** `roles_duplicate` — the same operation is `app.roles.duplicate({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/roles_duplicate`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "roles"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roleId": {
                    "type": "string",
                    "description": "A roles id, e.g. \"roles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 48
                  }
                },
                "required": [
                  "roleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/dropship-pos": {
      "get": {
        "operationId": "dropship_pos_list",
        "summary": "dropship_pos_list",
        "description": "List the newest dropship purchase orders (max 200): the vendor, order, lines, status (draft → sent → tracked → received/cancelled) and any captured vendor tracking.\n\n**Operation id:** `dropship_pos_list` — the same operation is `app.dropship.pos_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_pos_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "dropship_po_create",
        "summary": "dropship_po_create",
        "description": "Manually route an order to a dropship vendor: create the PO + enqueue the vendor email (dropship_po outbox). Idempotent per (order, vendor).\n\n**Operation id:** `dropship_po_create` — the same operation is `app.dropship.po_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_po_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "vendorId": {
                    "type": "string",
                    "description": "A dropshipVendors id, e.g. \"dropshipVendors_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "orderId",
                  "vendorId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/dropship-pos/tracking": {
      "post": {
        "operationId": "dropship_po_record_tracking",
        "summary": "dropship_po_record_tracking",
        "description": "Capture the carrier + tracking a dropship vendor reported (moves the PO to `tracked`). Pass null to clear.\n\n**Operation id:** `dropship_po_record_tracking` — the same operation is `app.dropship.po_record_tracking({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_po_record_tracking`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dropshipPoId": {
                    "type": "string",
                    "description": "A dropshipPurchaseOrders id, e.g. \"dropshipPurchaseOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "carrier": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tracking": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "dropshipPoId",
                  "carrier",
                  "tracking"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/preview": {
      "get": {
        "operationId": "dom_routing_preview",
        "summary": "dom_routing_preview",
        "description": "Preview where an order would ship from with the current rules + defaults, WITHOUT any side effect: `decisions`, one per open fulfillment order (`fulfillment` = its id and its 'Fulfillment #N' on the order page), or one with `fulfillment` null when the decision is the whole order's (a rule, a vendor, a refusal, or no fulfillment order yet). Each carries the decision kind (warehouse / dropship / unchanged / unsupported), the resolved warehouse or vendor, and the reason (rule / nearest / most_available / none_can_fill / only / none / kept / work_started / order_too_large). Without a matching rule the default is stock-aware: among the active warehouses whose pickable stock covers EVERY ordered item, the nearest to the delivery address (`nearest`) or, with no distance to measure, the best stocked (`most_available`); when none covers every item, the one holding the most of the ordered units (`none_can_fill`). Stock is what allocation could reserve (pickable, sellable, unflagged bins), measured against what the order still owes (its open fulfillment orders); it counts the order's own reservations and picked units, and counts a bundle as held where its parts can build it. The default is sticky per fulfillment order: one already reserved in a warehouse that can still fill the order stays there (`kept`), and once picking started there it stays even when it no longer can (`work_started`); a matching rule still moves it. `unchanged` and `unsupported` (reason `order_too_large`) are 'no decision'.\n\n**Operation id:** `dom_routing_preview` — the same operation is `app.dom.routing_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_routing_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/routing/rules": {
      "get": {
        "operationId": "dom_rules_list",
        "summary": "dom_rules_list",
        "description": "List the distributed order routing rules in cascade (position) order. Each is an ordered conditions→target row (first enabled match wins): the conditions test the routed order in the one rule language (matchAll: all or any) and the target sources it (warehouse / ship-from-store / dropship vendor). No rules ⇒ today's allocation (no regression). Each row carries `resolvedTarget` {name, state}: the target's name and whether the router can honour it — active, inactive (deactivated), deleted (a soft-deleted vendor) or missing — so a rule that routes nothing is visible as such.\n\n**Operation id:** `dom_rules_list` — the same operation is `app.dom.rules_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_rules_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "dom_rules_create",
        "summary": "dom_rules_create",
        "description": "Create a routing rule (appended last in the cascade). The target references must belong to the tenant (warehouse/store → a warehouse; dropship → a vendor); a rule with no condition is a catch-all default rule.\n\n**Operation id:** `dom_rules_create` — the same operation is `app.dom.rules_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_rules_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "destinationCountry",
                            "destinationProvince",
                            "destinationPostcodePrefix",
                            "total",
                            "tag",
                            "channel",
                            "store",
                            "shippableSku",
                            "shippableWeight",
                            "shippableUnits"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "description": "The routed order's facts (B-RUL-1): destinationCountry, destinationProvince (the code with its country, `DE-BE`), destinationPostcodePrefix, total, tag, channel, store, and its shippable demand — shippableSku, shippableWeight (grams), shippableUnits (the physical lines the customer still owns). Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                  },
                  "matchAll": {
                    "type": "boolean",
                    "description": "true: every condition must hold; false: any one."
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "warehouse",
                          "dropship",
                          "store"
                        ]
                      },
                      "warehouseId": {
                        "description": "document id of the source warehouse/store.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dropshipVendorId": {
                        "description": "document id of the dropship vendor.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "description": "Where a matched order is sourced (warehouse / ship-from-store / dropship vendor)."
                  },
                  "enabled": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "conditions",
                  "matchAll",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/rules/delete": {
      "post": {
        "operationId": "dom_rules_delete",
        "summary": "dom_rules_delete",
        "description": "Soft-delete a routing rule.\n\n**Operation id:** `dom_rules_delete` — the same operation is `app.dom.rules_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_rules_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A domRules id, e.g. \"domRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/rules/reorder": {
      "post": {
        "operationId": "dom_rules_reorder",
        "summary": "dom_rules_reorder",
        "description": "Move a routing rule one slot up or down the cascade by swapping positions (lower position is evaluated first).\n\n**Operation id:** `dom_rules_reorder` — the same operation is `app.dom.rules_reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_rules_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A domRules id, e.g. \"domRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "ruleId",
                  "direction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/rules/update": {
      "post": {
        "operationId": "dom_rules_update",
        "summary": "dom_rules_update",
        "description": "Update a routing rule: name, enabled, conditions, matchAll or target. Only passed fields change; naming none is refused.\n\n**Operation id:** `dom_rules_update` — the same operation is `app.dom.rules_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dom_rules_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "destinationCountry",
                            "destinationProvince",
                            "destinationPostcodePrefix",
                            "total",
                            "tag",
                            "channel",
                            "store",
                            "shippableSku",
                            "shippableWeight",
                            "shippableUnits"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "description": "The routed order's facts (B-RUL-1): destinationCountry, destinationProvince (the code with its country, `DE-BE`), destinationPostcodePrefix, total, tag, channel, store, and its shippable demand — shippableSku, shippableWeight (grams), shippableUnits (the physical lines the customer still owns). Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "warehouse",
                          "dropship",
                          "store"
                        ]
                      },
                      "warehouseId": {
                        "description": "document id of the source warehouse/store.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dropshipVendorId": {
                        "description": "document id of the dropship vendor.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "description": "Where a matched order is sourced (warehouse / ship-from-store / dropship vendor)."
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/vendors": {
      "get": {
        "operationId": "dropship_vendors_list",
        "summary": "dropship_vendors_list",
        "description": "List the active dropship vendors (name + email a dropship PO is sent to).\n\n**Operation id:** `dropship_vendors_list` — the same operation is `app.dropship.vendors_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_vendors_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "dropship_vendors_create",
        "summary": "dropship_vendors_create",
        "description": "Create a dropship vendor. email is where the dropship PO is emailed (null or a blank string means none); a vendor with no email settles its POs as a non-retryable 'no recipient'. A malformed address is refused with invalid_input.\n\n**Operation id:** `dropship_vendors_create` — the same operation is `app.dropship.vendors_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_vendors_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "email": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 0
                          },
                          {
                            "type": "string",
                            "maxLength": 254,
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/vendors/delete": {
      "post": {
        "operationId": "dropship_vendors_delete",
        "summary": "dropship_vendors_delete",
        "description": "Soft-delete a dropship vendor.\n\n**Operation id:** `dropship_vendors_delete` — the same operation is `app.dropship.vendors_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_vendors_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vendorId": {
                    "type": "string",
                    "description": "A dropshipVendors id, e.g. \"dropshipVendors_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "vendorId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/routing/vendors/update": {
      "post": {
        "operationId": "dropship_vendors_update",
        "summary": "dropship_vendors_update",
        "description": "Update a dropship vendor: name, email (null or a blank string clears; a malformed address is refused) or active. Only passed fields change.\n\n**Operation id:** `dropship_vendors_update` — the same operation is `app.dropship.vendors_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/dropship_vendors_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "routing"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vendorId": {
                    "type": "string",
                    "description": "A dropshipVendors id, e.g. \"dropshipVendors_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "email": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 0
                          },
                          {
                            "type": "string",
                            "maxLength": 254,
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "vendorId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules": {
      "get": {
        "operationId": "rules_list",
        "summary": "rules_list",
        "description": "List the tenant's automation rules in cascade (position) order. Each rule has a trigger (order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, pick_short, order_backordered, order_backorder_resolved, order_hold_released, order_held, parcel_packed, label_purchased, order_fulfilled, shipment_delivered, order_cancelled, manual, scheduled), conditions, matchAll (AND/OR) and actions (their types: rules_create). A rule fires at most once per occurrence of its trigger: once per order, per set of added tags, per return, per delivery problem, per due time a late order misses, per hold, per parcel, per label. `manual` rules run only when someone runs them (rules_run).\n\n**Operation id:** `rules_list` — the same operation is `app.rules.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "rules_create",
        "summary": "rules_create",
        "description": "Create an automation rule. It is added at the end of the cascade and enabled by default. Conditions test the order's facts and the trigger's own (channel, tag, sku, total, destinationCountry, shippingOption, riskLevel, weight, lineCount, dangerousGoods, store, warehouse, source, priority, tagsAdded, returnReasons, returnUnits, returnValue, returnConditions, carrier, exceptionStatus, dueKind, minutesLate, shortUnits, unitCount, productVendor, productType, destinationProvince, destinationPostcodePrefix, placedWeekday, placedTime, backordered, heldReason, holdReason, parcelWarehouse, workStage, placedHoursAgo); each trigger offers only its own facts and the order's, and the write names a condition or an action the trigger does not offer. matchAll true = AND, false = ANY. stopAfter: once the rule fires on an order, the rules after it on the same trigger do not run for it. A floor moment (parcel_packed, label_purchased, order_fulfilled, shipment_delivered, order_cancelled, pick_short, order_backordered, order_backorder_resolved) takes no more enabled rules than 20, of them no more with a send_event or a notify (both reach the webhooks) than 5, and of those no more that start Shopify Flow (send_event without flow: false) than 3, each action once a rule: one more is refused as a conflict. A send_event with flow: false tells the webhooks only.\n\n**Operation id:** `rules_create` — the same operation is `app.rules.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "order_created",
                      "order_paid",
                      "order_routing_complete",
                      "order_risk_changed",
                      "order_tags_added",
                      "order_address_changed",
                      "return_requested",
                      "return_received",
                      "shipment_exception",
                      "order_late",
                      "pick_short",
                      "order_backordered",
                      "order_backorder_resolved",
                      "order_hold_released",
                      "order_held",
                      "parcel_packed",
                      "label_purchased",
                      "order_fulfilled",
                      "shipment_delivered",
                      "order_cancelled",
                      "manual",
                      "scheduled"
                    ]
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "channel",
                            "tag",
                            "sku",
                            "total",
                            "destinationCountry",
                            "shippingOption",
                            "riskLevel",
                            "weight",
                            "lineCount",
                            "dangerousGoods",
                            "store",
                            "warehouse",
                            "source",
                            "priority",
                            "tagsAdded",
                            "returnReasons",
                            "returnUnits",
                            "returnValue",
                            "returnConditions",
                            "carrier",
                            "exceptionStatus",
                            "dueKind",
                            "minutesLate",
                            "shortUnits",
                            "unitCount",
                            "productVendor",
                            "productType",
                            "destinationProvince",
                            "destinationPostcodePrefix",
                            "placedWeekday",
                            "placedTime",
                            "backordered",
                            "heldReason",
                            "holdReason",
                            "parcelWarehouse",
                            "workStage",
                            "placedHoursAgo"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        },
                        "group": {
                          "description": "Its group of conditionGroups (0 first); omit on a rule with no groups.",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 4
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "description": "`neq` and `in` take a comma-separated list. For `shippingOption` (the customer's checkout option), `eq` / `neq` / `in` take ids from checkout_options_list and `contains` matches the title; `gt` / `lt` are refused, and a rule with this condition is skipped while the order's option is unknown. For `dangerousGoods` (the classes the order's or the parcel's items are marked with; `none` when it holds none), `eq` / `neq` / `in` take class keys (lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated, none); `contains`, `gt` and `lt` are refused. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                    }
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_tag"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "tag"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "hold"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "payment_pending",
                                    "fraud_risk",
                                    "address_issue",
                                    "awaiting_stock",
                                    "awaiting_production",
                                    "awaiting_supplier",
                                    "customer_request",
                                    "other"
                                  ]
                                },
                                "note": {
                                  "type": "string"
                                },
                                "release": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "afterMinutes": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 129600
                                        }
                                      },
                                      "required": [
                                        "afterMinutes"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "at": {
                                          "type": "string",
                                          "pattern": "^(\\d{4}-\\d{2}-\\d{2})T([01]\\d|2[0-3]):([0-5]\\d)$"
                                        }
                                      },
                                      "required": [
                                        "at"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "set_priority"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "priority": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "priority"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "route_to_warehouse"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "warehouseId": {
                                  "type": "string",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                },
                                "warehouse": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "notify"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "severity": {
                                  "type": "string",
                                  "enum": [
                                    "info",
                                    "warning",
                                    "critical"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "remove_tag"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "tag"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "set_box"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "boxId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                }
                              },
                              "required": [
                                "boxId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_pack_note"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "note": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "confirm": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "note"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "require_pack_step"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "photo",
                                    "weigh",
                                    "qc"
                                  ]
                                }
                              },
                              "required": [
                                "step"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "send_event"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "flow": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "release_hold"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "payment_pending",
                                    "fraud_risk",
                                    "address_issue",
                                    "awaiting_stock",
                                    "awaiting_production",
                                    "awaiting_supplier",
                                    "customer_request",
                                    "other"
                                  ]
                                },
                                "includePeopleHolds": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_insert"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "variantId": {
                                  "type": "string",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "per": {
                                  "type": "string",
                                  "enum": [
                                    "order",
                                    "parcel"
                                  ]
                                },
                                "confirm": {
                                  "type": "boolean"
                                },
                                "crossBorder": {
                                  "type": "string",
                                  "enum": [
                                    "leave_out",
                                    "printed_no_value"
                                  ]
                                }
                              },
                              "required": [
                                "variantId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        }
                      ],
                      "description": "Discriminated on `type`; each type has its own params object: add_tag {tag}, remove_tag {tag} (both a comma-separated list), hold {reason?, note?, release?} (release: {afterMinutes: 1..129600} or {at: 'YYYY-MM-DDTHH:mm'} in the store's time zone, UTC while unknown; a past time places no hold; an order already held keeps its hold and gets no timer), release_hold {reason?, includePeopleHolds?} (releases the holds a rule placed, of that reason or any; includePeopleHolds also releases people's and risk checks' holds), set_priority {priority}, route_to_warehouse {warehouseId?, warehouse?}, notify {severity?, message?} (message: 1..1000 characters, non-blank), set_box {boxId}, add_pack_note {note, confirm?}, require_pack_step {step: photo|weigh|qc}, send_event {} (tells the shop's webhooks and Shopify Flow 'Rule matched'; it never starts a rule), add_insert {variantId, quantity? 1..20 (1), per? order|parcel (order: in the first parcel started), confirm? (true: the packer scans or taps it), crossBorder? leave_out|printed_no_value (leave_out: not in parcels that need a customs form)} (a flyer, card or sample in the order's parcels: an active Floormode item counted in pieces, untracked, taken from stock at the parcel's fulfil; only parcels packed at the warehouses the rule's own Warehouse condition names, which must be one `eq` or `in` condition joined by AND — any other form is refused; at most 5 inserts an order). set_box, add_pack_note, add_insert and require_pack_step fit only the triggers order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, order_late, manual, scheduled, order_hold_released; hold fits only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, manual, scheduled; set_priority only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, order_backordered, order_backorder_resolved, order_hold_released, order_held, manual, scheduled; route_to_warehouse only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, order_hold_released, manual, scheduled; release_hold only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, order_late, manual, scheduled, order_backorder_resolved; add_tag, remove_tag, notify and send_event fit every trigger."
                    }
                  },
                  "enabled": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  },
                  "stopAfter": {
                    "description": "Stop processing more rules for this order when this rule runs. Defaults to false.",
                    "type": "boolean"
                  },
                  "schedule": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "every": {
                            "type": "string",
                            "const": "day"
                          },
                          "at": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                          },
                          "days": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "mon",
                                "tue",
                                "wed",
                                "thu",
                                "fri",
                                "sat",
                                "sun"
                              ]
                            }
                          },
                          "zone": {
                            "type": "string",
                            "maxLength": 64
                          },
                          "repeat": {
                            "type": "string",
                            "enum": [
                              "once",
                              "every_run"
                            ]
                          },
                          "missed": {
                            "type": "string",
                            "enum": [
                              "run_late",
                              "skip"
                            ]
                          }
                        },
                        "required": [
                          "every",
                          "at",
                          "days",
                          "repeat",
                          "missed"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "every": {
                            "type": "string",
                            "const": "hours"
                          },
                          "hours": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "from": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                          },
                          "to": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                          },
                          "days": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "mon",
                                "tue",
                                "wed",
                                "thu",
                                "fri",
                                "sat",
                                "sun"
                              ]
                            }
                          },
                          "zone": {
                            "type": "string",
                            "maxLength": 64
                          },
                          "repeat": {
                            "type": "string",
                            "enum": [
                              "once",
                              "every_run"
                            ]
                          },
                          "missed": {
                            "type": "string",
                            "enum": [
                              "run_late",
                              "skip"
                            ]
                          }
                        },
                        "required": [
                          "every",
                          "hours",
                          "days",
                          "repeat",
                          "missed"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "With trigger `scheduled` only, and required there: {every: 'day', at: 'HH:MM'} or {every: 'hours', hours: 1|2|3|4|6|8|12, from?, to?} (quarter hours), days (mon..sun), zone (IANA; the store's when omitted), repeat (once: act on an order once; every_run: at every run, at most 100 scheduled actions an order), missed (run_late or skip: a run reached more than 15 minutes late is skipped). At most 10 scheduled rules switched on."
                  },
                  "conditionGroups": {
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "matchAll": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "matchAll"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Groups, each its own all (matchAll true) or any; the rule's matchAll combines the groups: (DE and express) or (AT and over 200) is two groups of matchAll true and the rule's matchAll false. Every condition names its group; null: no groups."
                  }
                },
                "required": [
                  "name",
                  "trigger",
                  "conditions",
                  "matchAll",
                  "actions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/delete": {
      "post": {
        "operationId": "rules_delete",
        "summary": "rules_delete",
        "description": "Soft-delete an automation rule; its run history is kept.\n\n**Operation id:** `rules_delete` — the same operation is `app.rules.delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A automationRules id, e.g. \"automationRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/preview": {
      "get": {
        "operationId": "rules_preview",
        "summary": "rules_preview",
        "description": "Dry-run a rule without applying anything: returns whether it would match and the would-be action labels. With `sampleShopifyOrderId`, against that one mirrored order; without it, against the newest facts of `trigger` (the rule's own trigger when omitted: the newest orders, return requests, received returns, shipments in a delivery problem or released holds), up to 25, each in `samples` with its trigger facts; the top-level answer is the newest sample's. `samplesApproximate: true` for the tags trigger, whose added tags are the order's current tags, and for `pick_short`, `order_backordered` and `order_backorder_resolved`, tested on the newest open orders without the moment's own facts. `factsComplete: false` names the fact the order cannot answer yet in `unknownFact` (`sku`: more SKUs than the facts carry; `shippingOption`: its checkout option is not known yet); the live rule skips such an order rather than guess. Test rules on an order: `orderId` with `explain: true` answers `explain` — every enabled rule (or `ruleId`'s) against that order, each condition's verdict (pass, fail, unknown, decided_at_event for a trigger's fact) with the order's value (never the postcode), the rule's runs on it so far (10, then `ranCapped`) and each would-be action with the decline it already knows.\n\n**Operation id:** `rules_preview` — the same operation is `app.rules.preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "ruleId",
            "in": "query",
            "required": false,
            "description": "Required, but with `explain`.",
            "schema": {
              "description": "Required, but with `explain`.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "sampleShopifyOrderId",
            "in": "query",
            "required": false,
            "description": "Numeric Shopify order id as a string; omit to preview the trigger's newest.",
            "schema": {
              "description": "Numeric Shopify order id as a string; omit to preview the trigger's newest.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "description": "Which trigger's newest facts to preview; the rule's own when omitted.",
            "schema": {
              "description": "Which trigger's newest facts to preview; the rule's own when omitted.",
              "type": "string",
              "enum": [
                "order_created",
                "order_paid",
                "order_routing_complete",
                "order_risk_changed",
                "order_tags_added",
                "order_address_changed",
                "return_requested",
                "return_received",
                "shipment_exception",
                "order_late",
                "pick_short",
                "order_backordered",
                "order_backorder_resolved",
                "order_hold_released",
                "order_held",
                "parcel_packed",
                "label_purchased",
                "order_fulfilled",
                "shipment_delivered",
                "order_cancelled",
                "manual",
                "scheduled"
              ]
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "The order to test the rules on (with `explain`): this app's document id or Shopify's order id.",
            "schema": {
              "description": "The order to test the rules on (with `explain`): this app's document id or Shopify's order id.",
              "type": "string",
              "minLength": 1,
              "format": "floormode-id"
            }
          },
          {
            "name": "explain",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean",
              "const": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/rules/reorder": {
      "post": {
        "operationId": "rules_reorder",
        "summary": "rules_reorder",
        "description": "Move a rule one slot up or down the cascade (rules run in position order, lowest first). Returns moved:false when it is already at the end in that direction.\n\n**Operation id:** `rules_reorder` — the same operation is `app.rules.reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A automationRules id, e.g. \"automationRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "ruleId",
                  "direction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/run": {
      "post": {
        "operationId": "rules_run",
        "summary": "rules_run",
        "description": "Run one automation rule on chosen orders now (up to 50), as Shopify Flow's \"Run Flow automation\": a rule of any trigger whose conditions test no trigger fact. It is recorded under `manual`, so the rule still fires at its own trigger later. Needs the permission of each action's own door. Answers per order: fired (with the actions), no_match, already_ran (this run key did it), unknown (the fact it could not tell), declined (every action's code), capped, not_found, or not_run — the page budget did not reach it: send those orders again with `page` + 1 under the same `runKey`. A retry with the same `runKey` and `page` answers what it answered first.\n\n**Operation id:** `rules_run` — the same operation is `app.rules.run({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_run`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "Document id of the rule.",
                    "format": "floormode-id"
                  },
                  "orderIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "Document ids of the orders."
                  },
                  "runKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 100,
                    "description": "Your key for this run, kept across retries of it."
                  },
                  "page": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 50,
                    "description": "0 first, then 1, 2, …"
                  }
                },
                "required": [
                  "ruleId",
                  "orderIds",
                  "runKey",
                  "page"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/runs": {
      "get": {
        "operationId": "rule_runs_list",
        "summary": "rule_runs_list",
        "description": "List the run log of one automation rule, newest first (max 100). Each run records the order it fired on, the trigger (`manual` for a run someone started), the occurrence it fired once for (`occurrence`, `''` for a once-per-order trigger, else `<trigger>/<key>`, with its `occurrenceKind`: order, tag_set, address, return, receipt, exception, due, hold, parcel, shipment or run) and the actions applied — the audit behind the \"matched rule X\" timeline entries. Skips and matches that changed nothing are on the order's timeline, not here.\n\n**Operation id:** `rule_runs_list` — the same operation is `app.rule.runs_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rule_runs_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "ruleId",
            "in": "query",
            "required": true,
            "description": "A automationRules id, e.g. \"automationRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A automationRules id, e.g. \"automationRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/rules/set-enabled": {
      "post": {
        "operationId": "rules_set_enabled",
        "summary": "rules_set_enabled",
        "description": "Switch up to 100 rules on or off together, all or nothing (B-RUL-1): a batch that would pass a floor moment's cap (20 live rules, 3 with Send event) is refused whole as a conflict, its details naming `limit`, `max` and `trigger`, and nothing changes. A rule already in the asked state is left as it is; `changed` counts the rest.\n\n**Operation id:** `rules_set_enabled` — the same operation is `app.rules.set_enabled({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_set_enabled`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A automationRules id, e.g. \"automationRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "document ids of the automation rules, at most 100."
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "ruleIds",
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/update": {
      "post": {
        "operationId": "rules_update",
        "summary": "rules_update",
        "description": "Update an automation rule. Any field may be changed independently — pass only what you want to change (e.g. enabled to toggle the rule on or off). Switching a rule on, or moving an enabled rule, onto a floor moment whose enabled rules already number 20 is refused as a conflict; so is an edit that adds a send_event or a notify, or makes an event start Shopify Flow (flow true or absent), on a moment whose rules with one, or that start Flow, already reach their bound.\n\n**Operation id:** `rules_update` — the same operation is `app.rules.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "document id of the rule.",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "order_created",
                      "order_paid",
                      "order_routing_complete",
                      "order_risk_changed",
                      "order_tags_added",
                      "order_address_changed",
                      "return_requested",
                      "return_received",
                      "shipment_exception",
                      "order_late",
                      "pick_short",
                      "order_backordered",
                      "order_backorder_resolved",
                      "order_hold_released",
                      "order_held",
                      "parcel_packed",
                      "label_purchased",
                      "order_fulfilled",
                      "shipment_delivered",
                      "order_cancelled",
                      "manual",
                      "scheduled"
                    ]
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "channel",
                            "tag",
                            "sku",
                            "total",
                            "destinationCountry",
                            "shippingOption",
                            "riskLevel",
                            "weight",
                            "lineCount",
                            "dangerousGoods",
                            "store",
                            "warehouse",
                            "source",
                            "priority",
                            "tagsAdded",
                            "returnReasons",
                            "returnUnits",
                            "returnValue",
                            "returnConditions",
                            "carrier",
                            "exceptionStatus",
                            "dueKind",
                            "minutesLate",
                            "shortUnits",
                            "unitCount",
                            "productVendor",
                            "productType",
                            "destinationProvince",
                            "destinationPostcodePrefix",
                            "placedWeekday",
                            "placedTime",
                            "backordered",
                            "heldReason",
                            "holdReason",
                            "parcelWarehouse",
                            "workStage",
                            "placedHoursAgo"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        },
                        "group": {
                          "description": "Its group of conditionGroups (0 first); omit on a rule with no groups.",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 4
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "description": "`neq` and `in` take a comma-separated list. For `shippingOption` (the customer's checkout option), `eq` / `neq` / `in` take ids from checkout_options_list and `contains` matches the title; `gt` / `lt` are refused, and a rule with this condition is skipped while the order's option is unknown. For `dangerousGoods` (the classes the order's or the parcel's items are marked with; `none` when it holds none), `eq` / `neq` / `in` take class keys (lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated, none); `contains`, `gt` and `lt` are refused. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                    }
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_tag"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "tag"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "hold"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "payment_pending",
                                    "fraud_risk",
                                    "address_issue",
                                    "awaiting_stock",
                                    "awaiting_production",
                                    "awaiting_supplier",
                                    "customer_request",
                                    "other"
                                  ]
                                },
                                "note": {
                                  "type": "string"
                                },
                                "release": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "afterMinutes": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 129600
                                        }
                                      },
                                      "required": [
                                        "afterMinutes"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "at": {
                                          "type": "string",
                                          "pattern": "^(\\d{4}-\\d{2}-\\d{2})T([01]\\d|2[0-3]):([0-5]\\d)$"
                                        }
                                      },
                                      "required": [
                                        "at"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "set_priority"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "priority": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "priority"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "route_to_warehouse"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "warehouseId": {
                                  "type": "string",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                },
                                "warehouse": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "notify"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "severity": {
                                  "type": "string",
                                  "enum": [
                                    "info",
                                    "warning",
                                    "critical"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "remove_tag"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "tag"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "set_box"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "boxId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                }
                              },
                              "required": [
                                "boxId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_pack_note"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "note": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "confirm": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "note"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "require_pack_step"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "photo",
                                    "weigh",
                                    "qc"
                                  ]
                                }
                              },
                              "required": [
                                "step"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "send_event"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "flow": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "release_hold"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "payment_pending",
                                    "fraud_risk",
                                    "address_issue",
                                    "awaiting_stock",
                                    "awaiting_production",
                                    "awaiting_supplier",
                                    "customer_request",
                                    "other"
                                  ]
                                },
                                "includePeopleHolds": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "add_insert"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "variantId": {
                                  "type": "string",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "per": {
                                  "type": "string",
                                  "enum": [
                                    "order",
                                    "parcel"
                                  ]
                                },
                                "confirm": {
                                  "type": "boolean"
                                },
                                "crossBorder": {
                                  "type": "string",
                                  "enum": [
                                    "leave_out",
                                    "printed_no_value"
                                  ]
                                }
                              },
                              "required": [
                                "variantId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type",
                            "params"
                          ]
                        }
                      ],
                      "description": "Discriminated on `type`; each type has its own params object: add_tag {tag}, remove_tag {tag} (both a comma-separated list), hold {reason?, note?, release?} (release: {afterMinutes: 1..129600} or {at: 'YYYY-MM-DDTHH:mm'} in the store's time zone, UTC while unknown; a past time places no hold; an order already held keeps its hold and gets no timer), release_hold {reason?, includePeopleHolds?} (releases the holds a rule placed, of that reason or any; includePeopleHolds also releases people's and risk checks' holds), set_priority {priority}, route_to_warehouse {warehouseId?, warehouse?}, notify {severity?, message?} (message: 1..1000 characters, non-blank), set_box {boxId}, add_pack_note {note, confirm?}, require_pack_step {step: photo|weigh|qc}, send_event {} (tells the shop's webhooks and Shopify Flow 'Rule matched'; it never starts a rule), add_insert {variantId, quantity? 1..20 (1), per? order|parcel (order: in the first parcel started), confirm? (true: the packer scans or taps it), crossBorder? leave_out|printed_no_value (leave_out: not in parcels that need a customs form)} (a flyer, card or sample in the order's parcels: an active Floormode item counted in pieces, untracked, taken from stock at the parcel's fulfil; only parcels packed at the warehouses the rule's own Warehouse condition names, which must be one `eq` or `in` condition joined by AND — any other form is refused; at most 5 inserts an order). set_box, add_pack_note, add_insert and require_pack_step fit only the triggers order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, order_late, manual, scheduled, order_hold_released; hold fits only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, manual, scheduled; set_priority only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, order_backordered, order_backorder_resolved, order_hold_released, order_held, manual, scheduled; route_to_warehouse only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, return_requested, return_received, shipment_exception, order_late, order_hold_released, manual, scheduled; release_hold only order_created, order_paid, order_routing_complete, order_risk_changed, order_tags_added, order_address_changed, order_late, manual, scheduled, order_backorder_resolved; add_tag, remove_tag, notify and send_event fit every trigger."
                    }
                  },
                  "stopAfter": {
                    "type": "boolean"
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "every": {
                                "type": "string",
                                "const": "day"
                              },
                              "at": {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                              },
                              "days": {
                                "minItems": 1,
                                "maxItems": 7,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "mon",
                                    "tue",
                                    "wed",
                                    "thu",
                                    "fri",
                                    "sat",
                                    "sun"
                                  ]
                                }
                              },
                              "zone": {
                                "type": "string",
                                "maxLength": 64
                              },
                              "repeat": {
                                "type": "string",
                                "enum": [
                                  "once",
                                  "every_run"
                                ]
                              },
                              "missed": {
                                "type": "string",
                                "enum": [
                                  "run_late",
                                  "skip"
                                ]
                              }
                            },
                            "required": [
                              "every",
                              "at",
                              "days",
                              "repeat",
                              "missed"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "every": {
                                "type": "string",
                                "const": "hours"
                              },
                              "hours": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "from": {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                              },
                              "to": {
                                "type": "string",
                                "pattern": "^([01]\\d|2[0-3]):(00|15|30|45)$"
                              },
                              "days": {
                                "minItems": 1,
                                "maxItems": 7,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "mon",
                                    "tue",
                                    "wed",
                                    "thu",
                                    "fri",
                                    "sat",
                                    "sun"
                                  ]
                                }
                              },
                              "zone": {
                                "type": "string",
                                "maxLength": 64
                              },
                              "repeat": {
                                "type": "string",
                                "enum": [
                                  "once",
                                  "every_run"
                                ]
                              },
                              "missed": {
                                "type": "string",
                                "enum": [
                                  "run_late",
                                  "skip"
                                ]
                              }
                            },
                            "required": [
                              "every",
                              "hours",
                              "days",
                              "repeat",
                              "missed"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "description": "With trigger `scheduled` only, and required there: {every: 'day', at: 'HH:MM'} or {every: 'hours', hours: 1|2|3|4|6|8|12, from?, to?} (quarter hours), days (mon..sun), zone (IANA; the store's when omitted), repeat (once: act on an order once; every_run: at every run, at most 100 scheduled actions an order), missed (run_late or skip: a run reached more than 15 minutes late is skipped). At most 10 scheduled rules switched on."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "conditionGroups": {
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "matchAll": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "matchAll"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Groups, each its own all (matchAll true) or any; the rule's matchAll combines the groups: (DE and express) or (AT and over 200) is two groups of matchAll true and the rule's matchAll false. Every condition names its group; null: no groups."
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/walks": {
      "get": {
        "operationId": "rule_walks_list",
        "summary": "rule_walks_list",
        "description": "A rule's runs over the open orders, newest first (20 a page, `cursor`), or with no ruleId the runs open now. Each: origin (clock, run_now, backlog), state (queued, running, paused: behind the scheduled run; waiting: for Shopify to catch up; retrying, done, stopped with stopReason cancelled, rule_changed or rule_off; skipped: missed), the orders checked of about `estimate`, fired, the decisions still waiting for a fact, the slots folded in (skippedSlots).\n\n**Operation id:** `rule_walks_list` — the same operation is `app.rule.walks_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rule_walks_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "ruleId",
            "in": "query",
            "required": false,
            "description": "Document id of the rule; omit for the runs open now.",
            "schema": {
              "description": "Document id of the rule; omit for the runs open now.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 64
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/rules/walks/cancel": {
      "post": {
        "operationId": "rule_walk_cancel",
        "summary": "rule_walk_cancel",
        "description": "Stop a run over the open orders. Orders already handled keep what the rule did; decisions waiting for a missing fact are still decided when it arrives (`waiting`).\n\n**Operation id:** `rule_walk_cancel` — the same operation is `app.rule.walk_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rule_walk_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "walkId": {
                    "type": "string",
                    "description": "Document id of the run.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "walkId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/rules/walks/start": {
      "post": {
        "operationId": "rules_walk_start",
        "summary": "rules_walk_start",
        "description": "Run one automation rule on every open order (Rules 4.1a): ShipStation's \"Reprocess automation rules\", one rule at a time. A scheduled rule's run is a Run now: it states each order's placedHoursAgo and workStage, an `once` rule still acts on an order once, an every_run rule acts again at each run, up to 100 scheduled actions an order. Any other rule is recorded under `manual`, as rules_run, and is refused when it tests a fact only its trigger can tell. Checks each order open when the run reaches it, in blocks, never twice in one run. One open run per rule: a second request answers it (`created: false`); at most 10 such runs open at once, refused as a conflict (`rule_walks_open`). Needs the permission of each action's own door. Follow it with rule_walks_list; stop it with rule_walk_cancel. The same `requestKey` answers the same run.\n\n**Operation id:** `rules_walk_start` — the same operation is `app.rules.walk_start({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/rules_walk_start`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** `elevate` (feature `automation`); a lower plan is answered 403 `plan_required`.",
        "tags": [
          "rules"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "x-min-plan": "elevate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "Document id of the rule.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 100,
                    "description": "Your key for this request, kept across retries of it: the same key answers the same run."
                  }
                },
                "required": [
                  "ruleId",
                  "requestKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/saved-views": {
      "get": {
        "operationId": "saved_views_list",
        "summary": "saved_views_list",
        "description": "The saved list views this caller may see — their own plus the ones shared with the whole shop — as summaries (no filters), optionally for one list. Read a view's filters, sort and columns with saved_views_get.\n\n**Operation id:** `saved_views_list` — the same operation is `app.saved.views_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "surface",
            "in": "query",
            "required": false,
            "description": "One list, or every list.",
            "schema": {
              "description": "One list, or every list.",
              "type": "string",
              "enum": [
                "orders",
                "shipments",
                "receipts",
                "transfers",
                "stock",
                "packJobs",
                "batches",
                "returnRequests",
                "movements",
                "counts",
                "returns",
                "returnReceipts",
                "exceptions",
                "alerts",
                "bins",
                "pickQueue",
                "production",
                "floorTasks",
                "orderMerges",
                "releases",
                "checkoutOptions",
                "lots",
                "lotShips",
                "timeEntries",
                "serials"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "saved_views_save",
        "summary": "saved_views_save",
        "description": "Create or update a saved view: a name and the envelope { v, surface, filters, sort, columns } — the filters are validated against that list's query. Pass savedViewId to update, expectedRevision (its updatedAt) to refuse a view someone else moved, shared: true to make it the whole shop's.\n\n**Operation id:** `saved_views_save` — the same operation is `app.saved.views_save({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_save`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "savedViewId": {
                    "description": "Update this view; omitted creates one.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "state": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "orders"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string"
                              },
                              "status": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "unfulfilled",
                                    "partial",
                                    "fulfilled",
                                    "restocked",
                                    "cancelled"
                                  ]
                                }
                              },
                              "holdState": {
                                "type": "string",
                                "enum": [
                                  "held",
                                  "unheld",
                                  "all"
                                ]
                              },
                              "allocationState": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "allocated",
                                  "short",
                                  "released",
                                  "all"
                                ]
                              },
                              "holdReasons": {
                                "maxItems": 8,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "payment_pending",
                                    "fraud_risk",
                                    "address_issue",
                                    "awaiting_stock",
                                    "awaiting_production",
                                    "awaiting_supplier",
                                    "customer_request",
                                    "other"
                                  ]
                                }
                              },
                              "riskLevel": {
                                "type": "string",
                                "enum": [
                                  "LOW",
                                  "MEDIUM",
                                  "HIGH",
                                  "all"
                                ]
                              },
                              "tag": {
                                "type": "string"
                              },
                              "window": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "today",
                                  "7d",
                                  "30d"
                                ]
                              },
                              "destinationCountry": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[A-Z]{2}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deliveryMethod": {
                                "default": [],
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "shipping",
                                    "pickup",
                                    "local_delivery",
                                    "other"
                                  ]
                                }
                              },
                              "packDay": {
                                "default": [],
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "overdue",
                                    "today",
                                    "next",
                                    "later",
                                    "no_date",
                                    "unreadable"
                                  ]
                                }
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              },
                              "shippingOption": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A checkoutOptions id, e.g. \"checkoutOptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stalled": {
                                "default": false,
                                "type": "boolean"
                              },
                              "noProduct": {
                                "default": false,
                                "type": "boolean"
                              },
                              "failedUpdate": {
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "search",
                              "status",
                              "holdState",
                              "allocationState",
                              "holdReasons",
                              "riskLevel",
                              "tag",
                              "window",
                              "destinationCountry"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "order",
                                    "store",
                                    "blocked",
                                    "status",
                                    "fulfillment",
                                    "destination",
                                    "shippingOption",
                                    "due",
                                    "age",
                                    "total",
                                    "deliveryDate"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "shipments"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 9,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "rated",
                                    "purchasing",
                                    "purchased",
                                    "in_transit",
                                    "delivered",
                                    "exception",
                                    "voided",
                                    "refund_pending"
                                  ]
                                }
                              },
                              "search": {
                                "type": "string",
                                "maxLength": 100
                              },
                              "fallbackOnly": {
                                "default": false,
                                "type": "boolean"
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              }
                            },
                            "required": [
                              "status",
                              "search"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "shipment",
                                    "store",
                                    "status",
                                    "carrier",
                                    "tracking",
                                    "cost",
                                    "printed",
                                    "created"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "receipts"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "expected",
                                    "receiving",
                                    "received",
                                    "cancelled"
                                  ]
                                }
                              },
                              "sources": {
                                "maxItems": 7,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "manual",
                                    "warehouse_transfer",
                                    "logistified_po",
                                    "logistified_to",
                                    "assemblified_wo",
                                    "logistified_ssr",
                                    "logistified_mo"
                                  ]
                                }
                              },
                              "warehouseId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stages": {
                                "maxItems": 2,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "inspecting",
                                    "putting_away"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status",
                              "sources",
                              "warehouseId",
                              "stages"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc",
                                  "promised:asc",
                                  "promised:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "receipt",
                                    "status",
                                    "source",
                                    "supplier",
                                    "warehouse",
                                    "promised",
                                    "lines",
                                    "expected",
                                    "received",
                                    "discrepancies"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "transfers"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "ready",
                                    "in_progress",
                                    "completed",
                                    "cancelled"
                                  ]
                                }
                              },
                              "channelState": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "not_required",
                                    "pending",
                                    "confirmed",
                                    "refused",
                                    "ambiguous"
                                  ]
                                }
                              },
                              "warehouseId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "from",
                                  "to",
                                  "either"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "channelState",
                              "warehouseId",
                              "direction"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc",
                                  "updated:desc",
                                  "updated:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "transfer",
                                    "route",
                                    "status",
                                    "channel",
                                    "adapter",
                                    "planned",
                                    "staged",
                                    "dispatched",
                                    "inTransit",
                                    "received",
                                    "created",
                                    "updated"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "stock"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string",
                                "maxLength": 200
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "shopify",
                                      "assemblified_virtual_material",
                                      "assemblified_sub_assembly",
                                      "logistified_custom_item",
                                      "floormode_virtual_material"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customs": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "complete",
                                      "missing_hs",
                                      "missing_origin"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tracking": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "lot",
                                      "serial"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scanning": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "blocked",
                                      "no_scan"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "dangerousGoods": {
                                "default": [],
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "lithium_in_equipment",
                                    "lithium_with_equipment",
                                    "lithium_alone",
                                    "limited_quantity",
                                    "regulated"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "search",
                              "source"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "id:asc",
                                  "item:asc",
                                  "item:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "item",
                                    "source",
                                    "hsCode",
                                    "tracking",
                                    "dangerousGoods",
                                    "warehouses",
                                    "onHand",
                                    "demand",
                                    "available",
                                    "shopifyOnHand",
                                    "unassigned",
                                    "incoming"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "packJobs"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 8,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "verifying",
                                    "verified",
                                    "fulfill_queued",
                                    "prepared",
                                    "fulfilled",
                                    "failed",
                                    "cancelled"
                                  ]
                                }
                              },
                              "warehouseId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              }
                            },
                            "required": [
                              "statuses",
                              "warehouseId"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "job",
                                    "store",
                                    "order",
                                    "status",
                                    "scanned",
                                    "tracking",
                                    "updated"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "batches"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "picking",
                                    "picked",
                                    "cancelled"
                                  ]
                                }
                              },
                              "sources": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "shopify_fo",
                                    "assemblified_wo",
                                    "logistified_mo"
                                  ]
                                }
                              },
                              "profileId": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "statuses",
                              "sources"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "batch",
                                    "status",
                                    "warehouse",
                                    "progress",
                                    "orders",
                                    "lines",
                                    "units"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "returnRequests"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "requested",
                                    "approved",
                                    "denied",
                                    "received",
                                    "refunded",
                                    "cancelled"
                                  ]
                                }
                              },
                              "toRefund": {
                                "type": "boolean"
                              },
                              "reasonChanged": {
                                "default": false,
                                "type": "boolean"
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              }
                            },
                            "required": [
                              "status",
                              "toRefund"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "submitted:desc",
                                  "submitted:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "request",
                                    "store",
                                    "items",
                                    "refund",
                                    "reason",
                                    "customerReason",
                                    "status",
                                    "label",
                                    "waiting"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "movements"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "kinds": {
                                "maxItems": 12,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "receipt",
                                    "putaway",
                                    "pick",
                                    "pack",
                                    "ship",
                                    "adjust",
                                    "count",
                                    "return",
                                    "move",
                                    "release",
                                    "import",
                                    "opening"
                                  ]
                                }
                              },
                              "reasonCodes": {
                                "maxItems": 13,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                }
                              },
                              "window": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "today",
                                  "7d",
                                  "30d"
                                ]
                              },
                              "variantId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "binId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kinds",
                              "reasonCodes",
                              "window",
                              "variantId",
                              "binId"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "at:desc",
                                  "at:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "when",
                                    "kind",
                                    "item",
                                    "bins",
                                    "quantity",
                                    "reason",
                                    "reference",
                                    "who"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "counts"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "counting",
                                    "review",
                                    "approving",
                                    "approved",
                                    "cancelled"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "statuses"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "count",
                                    "status",
                                    "warehouse",
                                    "bins",
                                    "counted",
                                    "varianceLines",
                                    "varianceUnits"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "returns"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "REQUESTED",
                                    "OPEN",
                                    "CLOSED",
                                    "DECLINED",
                                    "CANCELED"
                                  ]
                                }
                              },
                              "openReceiptsOnly": {
                                "type": "boolean"
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              }
                            },
                            "required": [
                              "status",
                              "openReceiptsOnly"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "return",
                                    "store",
                                    "status",
                                    "order",
                                    "expectedUnits",
                                    "receipts",
                                    "requested",
                                    "added"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "returnReceipts"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "received",
                                    "cancelled"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "receipt",
                                    "status",
                                    "warehouse",
                                    "restocked",
                                    "quarantined",
                                    "writtenOff",
                                    "opened"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "exceptions"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 2,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "resolved"
                                  ]
                                }
                              },
                              "reason": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "statuses",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "at:desc",
                                  "at:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "shipment",
                                    "reason",
                                    "note",
                                    "opened",
                                    "status",
                                    "tracking",
                                    "resolved"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "alerts"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "severities": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "info",
                                    "warning",
                                    "critical"
                                  ]
                                }
                              },
                              "types": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "automation_rule",
                                    "backorder",
                                    "backorder_restocked",
                                    "barcode_aliases_refused",
                                    "checkout_options_cap_reached",
                                    "count_variance",
                                    "external_fulfillment_unbooked",
                                    "fo_close_deferred",
                                    "fulfillment_cancel_restocked",
                                    "handback_overdue",
                                    "integration_key_reuse",
                                    "inventory_writer_drift",
                                    "inventory_writer_drift_cleared",
                                    "inventory_writer_gap",
                                    "landed_cost_refused",
                                    "local_snapshot_skipped",
                                    "lot_blocked",
                                    "lot_expiry_tightened",
                                    "near_expiry",
                                    "order_action_attention",
                                    "order_edit_mirror_refresh_dead",
                                    "order_refresh_dead",
                                    "oversell_risk",
                                    "pack_ship_skipped",
                                    "packaging_short",
                                    "payment_auth_window",
                                    "peer_capability_revoked",
                                    "peer_reachable",
                                    "peer_unreachable",
                                    "pick_lines_dropped",
                                    "pick_release_skipped",
                                    "po_push_confirmation_overflow",
                                    "receipt_price_deviation",
                                    "refund_failure",
                                    "refund_restock_unreceived",
                                    "refund_stock_unbooked",
                                    "reorder_suggested",
                                    "return_label_unprintable",
                                    "shipment_weight_estimated",
                                    "sibling_report_refused",
                                    "sla_breach",
                                    "source_lines_exceeded",
                                    "station_supply_unrefillable",
                                    "stock_release_clamped",
                                    "sync_failure",
                                    "token_refresh_refused",
                                    "token_refresh_unresolved",
                                    "transfer_source_effect_refused",
                                    "wave_auto_release_refused",
                                    "webhook_endpoint_off"
                                  ]
                                }
                              },
                              "window": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "today",
                                  "7d",
                                  "30d"
                                ]
                              },
                              "state": {
                                "default": "open",
                                "type": "string",
                                "enum": [
                                  "open",
                                  "all"
                                ]
                              }
                            },
                            "required": [
                              "severities",
                              "types",
                              "window"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "at:desc",
                                  "at:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "when",
                                    "severity",
                                    "alert",
                                    "message",
                                    "about",
                                    "from",
                                    "delivery"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "bins"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "zoneId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "binTypes": {
                                "maxItems": 11,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "receiving",
                                    "qc",
                                    "quarantine",
                                    "bulk",
                                    "pick",
                                    "packing",
                                    "staging",
                                    "returns",
                                    "unassigned",
                                    "lane",
                                    "dock_door"
                                  ]
                                }
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "bins",
                                  "all"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "archived",
                                  "all"
                                ]
                              },
                              "occupancy": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "empty",
                                      "occupied"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sellable": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pickable": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "flagged": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "blocked": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "search",
                              "zoneId",
                              "binTypes",
                              "level",
                              "state",
                              "occupancy",
                              "sellable",
                              "pickable",
                              "flagged"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "code:asc",
                                  "code:desc",
                                  "route:asc",
                                  "route:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "bin",
                                    "zone",
                                    "type",
                                    "flags",
                                    "contents",
                                    "barcode",
                                    "path",
                                    "limits"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "pickQueue"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "singles": {
                                "type": "boolean"
                              },
                              "assignment": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "mine",
                                      "unassigned"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lateOnly": {
                                "type": "boolean"
                              },
                              "shipsToday": {
                                "default": false,
                                "type": "boolean"
                              },
                              "profileId": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stores": {
                                "default": [],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                }
                              }
                            },
                            "required": [
                              "singles",
                              "assignment",
                              "lateOnly"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "shipBy:asc",
                                  "allocated:asc",
                                  "allocated:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "order",
                                    "store",
                                    "status",
                                    "destination",
                                    "units",
                                    "allocated",
                                    "age",
                                    "due",
                                    "ships",
                                    "assignee"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "production"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "stages": {
                                "maxItems": 7,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "announced",
                                    "picking",
                                    "staged",
                                    "in_production",
                                    "awaiting_putaway",
                                    "put_away",
                                    "cancelled"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "stages"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "due:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "workOrder",
                                    "stage",
                                    "due",
                                    "materials",
                                    "shortLines",
                                    "receipt",
                                    "batch",
                                    "age"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "floorTasks"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "types": {
                                "maxItems": 7,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "receive",
                                    "putaway",
                                    "pick",
                                    "pack",
                                    "count",
                                    "replenish",
                                    "move"
                                  ]
                                }
                              },
                              "statuses": {
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "claimed",
                                    "assigned",
                                    "inProgress",
                                    "done",
                                    "cancelled"
                                  ]
                                }
                              },
                              "assignment": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "mine",
                                      "unassigned"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "types",
                              "statuses",
                              "assignment"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:asc",
                                  "created:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "task",
                                    "status",
                                    "units",
                                    "age",
                                    "created",
                                    "assignee"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "orderMerges"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "cancelled",
                                    "fulfilled"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "statuses"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "group",
                                    "status",
                                    "members",
                                    "created"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "releases"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "statuses": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "planned",
                                    "released",
                                    "closed"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "statuses"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "created:desc",
                                  "created:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "name",
                                    "status",
                                    "orders",
                                    "units",
                                    "created"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "checkoutOptions"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string",
                                "maxLength": 100
                              },
                              "statuses": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "needs_review",
                                    "mapped",
                                    "rules",
                                    "no_label"
                                  ]
                                }
                              },
                              "sources": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "shopify_rate",
                                    "carrier_app",
                                    "pickup",
                                    "local_delivery",
                                    "other"
                                  ]
                                }
                              },
                              "seen": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "7d",
                                      "30d",
                                      "stale"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "search",
                              "statuses",
                              "sources",
                              "seen"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "review:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "option",
                                    "shipWith",
                                    "orders",
                                    "lastSeen"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "lots"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string",
                                "maxLength": 64
                              },
                              "variantId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "search",
                              "variantId"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "lot:asc",
                                  "lot:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "lot",
                                    "item",
                                    "expiry",
                                    "status",
                                    "onHand"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "lotShips"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "window": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "today",
                                  "7d",
                                  "30d"
                                ]
                              }
                            },
                            "required": [
                              "window"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "at:desc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "order",
                                    "shipped",
                                    "units",
                                    "warehouse",
                                    "store"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "timeEntries"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "personIds": {
                                "maxItems": 25,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "A teamMembers id, e.g. \"teamMembers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                  "format": "floormode-id"
                                }
                              },
                              "statuses": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "closed",
                                    "needs_review",
                                    "forgotten"
                                  ]
                                }
                              },
                              "kinds": {
                                "maxItems": 2,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "work",
                                    "break"
                                  ]
                                }
                              },
                              "sources": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "floor_device",
                                    "desk",
                                    "manager"
                                  ]
                                }
                              },
                              "window": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "today",
                                  "7d",
                                  "30d"
                                ]
                              }
                            },
                            "required": [
                              "personIds",
                              "statuses",
                              "kinds",
                              "sources",
                              "window"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "start:desc",
                                  "start:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "person",
                                    "day",
                                    "in",
                                    "out",
                                    "kind",
                                    "minutes",
                                    "status",
                                    "flag",
                                    "source"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "surface": {
                            "type": "string",
                            "const": "serials"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "search": {
                                "type": "string",
                                "maxLength": 64
                              },
                              "variantId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                                    "format": "floormode-id"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "in_stock",
                                    "packed",
                                    "shipped",
                                    "returned",
                                    "scrapped"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "search",
                              "variantId",
                              "status"
                            ],
                            "additionalProperties": false
                          },
                          "sort": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "serial:asc"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "columns": {
                            "anyOf": [
                              {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "serial",
                                    "item",
                                    "status",
                                    "warehouse",
                                    "order"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "surface",
                          "filters",
                          "sort",
                          "columns"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "The view's envelope: the surface's filters, one of its sorts, its column ids."
                  },
                  "shared": {
                    "description": "true = every user of the shop sees and may edit it; omitted on an update keeps the owner.",
                    "type": "boolean"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "The view's updatedAt the edit was made against; a moved view is refused."
                  }
                },
                "required": [
                  "name",
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/saved-views/delete": {
      "post": {
        "operationId": "saved_views_delete",
        "summary": "saved_views_delete",
        "description": "Soft-delete a saved view.\n\n**Operation id:** `saved_views_delete` — the same operation is `app.saved.views_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "savedViewId": {
                    "type": "string",
                    "description": "A savedViews id, e.g. \"savedViews_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "The view's updatedAt the edit was made against; a moved view is refused."
                  }
                },
                "required": [
                  "savedViewId",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/saved-views/get": {
      "get": {
        "operationId": "saved_views_get",
        "summary": "saved_views_get",
        "description": "One saved view with its decoded state (filters, sort, columns) and the issues a stale or legacy view carries; null state means it cannot run as a view.\n\n**Operation id:** `saved_views_get` — the same operation is `app.saved.views_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "savedViewId",
            "in": "query",
            "required": true,
            "description": "A savedViews id, e.g. \"savedViews_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A savedViews id, e.g. \"savedViews_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/saved-views/rename": {
      "post": {
        "operationId": "saved_views_rename",
        "summary": "saved_views_rename",
        "description": "Rename a saved view without touching its filters.\n\n**Operation id:** `saved_views_rename` — the same operation is `app.saved.views_rename({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_rename`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "savedViewId": {
                    "type": "string",
                    "description": "A savedViews id, e.g. \"savedViews_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "The view's updatedAt the edit was made against; a moved view is refused."
                  }
                },
                "required": [
                  "savedViewId",
                  "name",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/saved-views/share": {
      "post": {
        "operationId": "saved_views_share",
        "summary": "saved_views_share",
        "description": "Share a saved view with the whole shop, or make it private to the caller again.\n\n**Operation id:** `saved_views_share` — the same operation is `app.saved.views_share({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/saved_views_share`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "saved-views"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "savedViewId": {
                    "type": "string",
                    "description": "A savedViews id, e.g. \"savedViews_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "shared": {
                    "type": "boolean"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "The view's updatedAt the edit was made against; a moved view is refused."
                  }
                },
                "required": [
                  "savedViewId",
                  "shared",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/scan": {
      "get": {
        "operationId": "scan_resolve",
        "summary": "scan_resolve",
        "description": "Resolve a scanned code to what it means. Resolution order: bin barcode, bin code, variant barcode, alternate variant barcode, sku, then a printed pick list's batch number (#PK-…, the # and case optional), then a packing slip's code: a pack job's number (#PJ-…) or an allocation's (#AL-…, the slip printed before picking), which names the order's one pack job a packer still has work on, then a cart's or tote's code or a cart slot's (CART-01-03), then a station supply card's code (SUP-…, case optional: the face it names, which station_supplies_signal_empty says is empty). Carts share one code space with bins and the codes typed here: no cart code a bin or item holds is accepted, and no bin code, barcode alias or material SKU a live cart or its slots answer to (cart_code_taken). A Shopify barcode or SKU is a mirror and never refused: an item that later takes a cart's code from Shopify answers first. Returns {type: \"bin\"|\"variant\"|\"pick_batch\"|\"pack_job\"|\"cart\"|\"supply_card\"|\"ambiguous\"|\"none\"}; variant hits carry `matchedOn`; a pick_batch carries the batch's status and whose it is (mine, unclaimed, other); a pack_job its status. Bin codes are unique per WAREHOUSE, so pass warehouseId whenever the caller knows where it stands; a code that stays undecidable answers {type: \"ambiguous\"} with the candidates and a reason instead of guessing.\n\n**Operation id:** `scan_resolve` — the same operation is `app.scan.resolve({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/scan_resolve`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "scan"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "description": "The scanned or typed code.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The scanned or typed code."
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse the scan happened in.",
            "schema": {
              "description": "document id of the warehouse the scan happened in.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "expectedVariantId",
            "in": "query",
            "required": false,
            "description": "document id of the item the scanning step expects: a shared code resolves to it, and it answers to its own codes even after Shopify deleted it. A code that counts as several units (a variant hit's packQty) is skipped then, since a step expecting an item takes units.",
            "schema": {
              "description": "document id of the item the scanning step expects: a shared code resolves to it, and it answers to its own codes even after Shopify deleted it. A code that counts as several units (a variant hit's packQty) is skipped then, since a step expecting an item takes units.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "search_global",
        "summary": "search_global",
        "description": "One search box across the identifiers people actually quote: order number or name, customer name or email, sku, barcode, tracking number and the short ids of shipments, returns, return requests and return receipts. At most 5 hits per type, each with a label, a sublabel and a suggested route. Every lookup is a bounded indexed prefix match — the customer match walks the 200 most recent orders (no index exists on the customer snapshot) and says so via `capped.customers`.\n\n**Operation id:** `search_global` — the same operation is `app.search.global({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/search_global`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "search"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Order number, customer, sku, barcode, tracking number or short id.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Order number, customer, sku, barcode, tracking number or short id."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials": {
      "get": {
        "operationId": "serials_list",
        "summary": "serials_list",
        "description": "List serial units by serial, 50 a page (the answer is { rows, capped, cursor } — pass `cursor` back to continue). `search` is the start of a serial (any case; a GS1 code's serial, AI 21, is read out), `variantId` one item's units, `status` any of these states (in_stock, packed, shipped, returned, scrapped; e.g. [\"in_stock\"]). Each row: the serial, its state and since when, the item, the warehouse it is in or was last, and the order it last went to by name and number.\n\n**Operation id:** `serials_list` — the same operation is `app.serials.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/serials_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "The start of a serial number, any case; a GS1 code's serial (21) is read out.",
            "schema": {
              "description": "The start of a serial number, any case; a GS1 code's serial (21) is read out.",
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "required": false,
            "description": "Only this item's units.",
            "schema": {
              "description": "Only this item's units.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only units in any of these states: in_stock, packed, shipped, returned or scrapped; absent = every state. Repeat `status` for each value (`?status=in_stock&status=packed`), or pass a JSON array (`?status=[\"in_stock\",\"packed\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "in_stock",
              "packed"
            ],
            "schema": {
              "description": "Only units in any of these states: in_stock, packed, shipped, returned or scrapped; absent = every state.",
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "in_stock",
                  "packed",
                  "shipped",
                  "returned",
                  "scrapped"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`serial:asc`, by serial (the only order).",
            "schema": {
              "description": "`serial:asc`, by serial (the only order).",
              "type": "string",
              "enum": [
                "serial:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials/archived": {
      "get": {
        "operationId": "history_serial_ships",
        "summary": "history_serial_ships",
        "description": "Shipped serial units that left Floormode for the history archive (the serial book): every unit whose serial starts with q (a GS1 code is read for its serial), newest first, up to 50, each with its item, instant, warehouse and order (name and number). throughMonth is the newest month the book holds; serials_search answers the rest.\n\n**Operation id:** `history_serial_ships` — the same operation is `app.history.serial_ships({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/history_serial_ships`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials (reports)"
        ],
        "x-topic": "reports",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "A serial, or its start, or a GS1 code carrying one.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "A serial, or its start, or a GS1 code carrying one."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials/by-order": {
      "get": {
        "operationId": "serials_for_order",
        "summary": "serials_for_order",
        "description": "The serial numbers one order's shipped parcels carried: per unit its serial, item and parcel, from each parcel's serial list. capped when the order has more parcels or serials than one read walks.\n\n**Operation id:** `serials_for_order` — the same operation is `app.serials.for_order({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/serials_for_order`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "description": "document id of the order.",
            "schema": {
              "type": "string",
              "description": "document id of the order.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials/detail": {
      "get": {
        "operationId": "serials_get",
        "summary": "serials_get",
        "description": "Read one serial unit: the unit (serial, state, item, warehouse, how and when it was recorded and by whom), the receipt it came in on, its current or last parcel with the order's name and number (and the live order's id while Floormode holds it), the return it came back on, and its item's units per state (each counted up to 1,000, capped beyond). No customer data: read the order for that. Null for an unknown unit.\n\n**Operation id:** `serials_get` — the same operation is `app.serials.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/serials_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "serialUnitId",
            "in": "query",
            "required": true,
            "description": "document id of the serial unit.",
            "schema": {
              "type": "string",
              "description": "document id of the serial unit.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials/search": {
      "get": {
        "operationId": "serials_search",
        "summary": "serials_search",
        "description": "Find serial units by the start of their serial across every item, as serials_list with `search` alone: `q` any case, a GS1 code's serial (AI 21) read out. Same rows and paging. An unreadable code finds nothing.\n\n**Operation id:** `serials_search` — the same operation is `app.serials.search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/serials_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The start of a serial number, any case; a GS1 code's serial (21) is read out.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "The start of a serial number, any case; a GS1 code's serial (21) is read out."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/serials/set-status": {
      "post": {
        "operationId": "serials_set_status",
        "summary": "serials_set_status",
        "description": "Mark a serial unit scrapped by hand (`to: scrapped`, with a note): a unit that is in stock or back from a return but gone — the fix when a count finds fewer units than the serial units in stock. The note is kept on the unit's timeline. Refused as serial_scrapped for a unit already scrapped, illegal_transition for one packed or shipped. SIDE EFFECTS: none on stock; the count or adjustment moves the units.\n\n**Operation id:** `serials_set_status` — the same operation is `app.serials.set_status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/serials_set_status`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "serials"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serialUnitId": {
                    "type": "string",
                    "description": "A serialUnits id, e.g. \"serialUnits_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "scrapped"
                    ],
                    "description": "\"scrapped\": the unit is gone (lost, broken)."
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why, as the unit's history says it."
                  }
                },
                "required": [
                  "serialUnitId",
                  "to",
                  "note"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/settings": {
      "get": {
        "operationId": "settings_list",
        "summary": "settings_list",
        "description": "List every tenant setting with its current value, its description and whether the value is still the default. Every setting is a boolean, and the list is the authoritative one — it is the same closed set settings_set accepts, so read this before writing rather than guessing a name.\n\n**Operation id:** `settings_list` — the same operation is `app.settings.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/settings_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "settings_set",
        "summary": "settings_set",
        "description": "Set one tenant setting (all of them are booleans; settings_list describes each). TWO of the names do more than set a flag, and both effects are irreversible by setting the same flag back to false. (1) Enabling any peer connection (logistifiedConnectionEnabled, assemblifiedConnectionEnabled, alertifiedConnectionEnabled) starts that connection FRESH: nothing is queued for a switched-off peer, and any message it still held from before the switch went off is settled as not sent, never delivered late — the count comes back as `notSent`. (2) Enabling logistifiedConnectionEnabled means Logistified stops writing Shopify stock levels the moment receiving moves here, so it is REFUSED as a value (`{ ok: false, reason: \"warehouses_not_live\", warehouses, capped }`) while a receiving warehouse is not live: run 'Go live' (warehouses_applyCutover) there first; integrations_health.logistifiedSwitchBlockers lists those warehouses up front, and a successful call answers `{ ok: true, value }`. Switching the connection off later does NOT hand writing back (zero writers is the worse failure, and it is silent) — use integrations_health to see the current writer matrix. (3) Enabling a peer connection whose local stock was HANDED BACK reconnects it: the frozen rows return to the unplaced worklist as claims suggesting what this warehouse held at the handback, and those units leave our ledger, because the peer has owned them since it acknowledged the release — the count comes back as `localStockReclaimed`, and exactly one total is ever placed. (4) Switching a peer connection OFF is REFUSED (`conflict`) while that peer's local stock is still held here, or while a handback is already in flight: turning the flag off would leave those units counted in both apps with nothing sent, or end a release the other app has not confirmed yet. Call local_stock_disconnect instead — it hands the quantities back and writes this flag off itself once the peer confirms. (5) Switching a peer connection OFF is a seam exit (contracts 1.6.0): the peer is told it is being disconnected (a `peer_uninstalled` notice that leaves after the switch), and the switch is REFUSED (`conflict`, details.outstanding) — before anything is sent, every blocker named — while this shop still owes the peer something the switch cannot settle: a receiving agreement in which Logistified still delegates locations here (Logistified must release it first). Open Assemblified component pick batches do not refuse it: the switch CANCELS them first (picked units go back to their bins, `wo_pick_status: cancelled` goes to Assemblified; local_stock_status `openComponentBatches` counts them). A peer whose local stock is active while nothing of it is held here is released by the same switch (the ownership pin is cleared; the notice still names it), so switching the connection back ON reconnects it. Returns `{ ok: true, value: { name, value, notSent, localStockReclaimed } }` on success, `{ ok: false, reason: \"warehouses_not_live\", detail, warehouses, capped }` when the Logistified switch is refused; every other refusal is a conflict error.\n\n**Operation id:** `settings_set` — the same operation is `app.settings.set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "enum": [
                      "autoHoldHighRisk",
                      "logistifiedConnectionEnabled",
                      "assemblifiedConnectionEnabled",
                      "alertifiedConnectionEnabled",
                      "autoAssignPickTasks",
                      "autoReplenishOnPick",
                      "refillForReleasedWork",
                      "domRoutingEnabled"
                    ],
                    "description": "Which setting to write. Closed set — see settings_list for what each one does."
                  },
                  "value": {
                    "type": "boolean",
                    "description": "The new value. Every tenant setting is a boolean."
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/settings/delivery-dates": {
      "get": {
        "operationId": "delivery_dates_settings_get",
        "summary": "delivery_dates_settings_get",
        "description": "Get the delivery-date mapping: which order attribute holds the customer's requested delivery day (`source`: key and format), the store's time zone, the `revision` an edit must name, whether delivery dates are on (`active`), and the re-derive of open orders after a change (`rederive`: idle, running or parked, with the orders read and rewritten so far). Off by default.\n\n**Operation id:** `delivery_dates_settings_get` — the same operation is `app.delivery.dates_settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/delivery_dates_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (orders)"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "delivery_dates_settings_set",
        "summary": "delivery_dates_settings_set",
        "description": "Replace the delivery-date mapping: `source` (the attribute key, matched case-insensitively, and its format; null switches delivery dates off) and the store's IANA `timeZone`, which a source needs (refused with time_zone_required otherwise). Fenced on `expectedRevision` (a stale edit is refused with revision_mismatch); saving what is stored changes nothing. A change that leaves a source set (a new key or format, or a moved time zone) re-derives the requested delivery day of every OPEN order in the background (the deliveryDayRederive job; `rederiveArmed`); closed orders keep theirs. Switching off rewrites nothing. While a source is set, open work with a requested day is due at the end of its pack day (see orders_work_queue).\n\n**Operation id:** `delivery_dates_settings_set` — the same operation is `app.delivery.dates_settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/delivery_dates_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (orders)"
        ],
        "x-topic": "orders",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The revision the edit started from; a stale one is refused."
                  },
                  "source": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "attribute"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "description": "The order attribute that holds the day, e.g. \"Delivery Date\"; matched case-insensitively."
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "iso",
                              "ymd_slash",
                              "dmy_slash",
                              "mdy_slash",
                              "dmy_dot",
                              "month_name"
                            ],
                            "description": "How the value is written. \"auto\" reads only unambiguous dates (2026-10-17, 2026/10/17, month names); a numeric day-month date needs dmy_slash, mdy_slash or dmy_dot."
                          }
                        },
                        "required": [
                          "kind",
                          "key",
                          "format"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Where the day is read from; null switches delivery dates off."
                  },
                  "timeZone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The store's IANA time zone (e.g. \"Europe/London\"); required with a source."
                  }
                },
                "required": [
                  "expectedRevision",
                  "source",
                  "timeZone"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/settings/delivery-dates/preview": {
      "post": {
        "operationId": "delivery_dates_preview",
        "summary": "delivery_dates_preview",
        "description": "Preview a draft delivery-date mapping on recent orders without saving it: the attribute keys the newest orders carry (`keys`, with how many of up to 20 sampled orders carry each), the proposed date-picker key (`suggestedKey`), and with a draft key what it would read: parsed / none / unreadable counts and up to five examples. An example's value as written (`raw`) needs orders.view as well; `capped` says the newest two hundred orders held fewer than 20 with attributes.\n\n**Operation id:** `delivery_dates_preview` — the same operation is `app.delivery.dates_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/delivery_dates_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (orders)"
        ],
        "x-topic": "orders",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "attribute"
                        ]
                      },
                      "key": {
                        "description": "The draft key; without one only the keys on recent orders are listed.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "iso",
                          "ymd_slash",
                          "dmy_slash",
                          "mdy_slash",
                          "dmy_dot",
                          "month_name"
                        ],
                        "description": "How the value is written. \"auto\" reads only unambiguous dates (2026-10-17, 2026/10/17, month names); a numeric day-month date needs dmy_slash, mdy_slash or dmy_dot."
                      }
                    },
                    "required": [
                      "kind",
                      "format"
                    ]
                  },
                  "timeZone": {
                    "description": "The draft's store time zone; absent = the saved one, else UTC.",
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "source"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/settings/item-photo-fill": {
      "get": {
        "operationId": "catalog_item_photo_settings_get",
        "summary": "catalog_item_photo_settings_get",
        "description": "Get the account's \"Fill items from a photo\" setting: `fillFromPhoto` (off by default; off, no item page offers it and the photo door refuses item_photo_fill_off), the `fields` a fill reads (gtin, net_content, origin, dangerous_goods, hs_code) and the `revision` a save names.\n\n**Operation id:** `catalog_item_photo_settings_get` — the same operation is `app.catalog.item_photo_settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_item_photo_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (catalog)"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "catalog_item_photo_settings_set",
        "summary": "catalog_item_photo_settings_set",
        "description": "Set the account's \"Fill items from a photo\" setting: `fillFromPhoto` and the `fields` it reads, fenced on `expectedRevision` (catalog_item_photo_settings_get's `revision`; a stale edit is refused revision_mismatch). Turning it on sends pack photos a person takes to a reader; nothing is written to an item until a person saves its card.\n\n**Operation id:** `catalog_item_photo_settings_set` — the same operation is `app.catalog.item_photo_settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/catalog_item_photo_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (catalog)"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fillFromPhoto": {
                    "type": "boolean"
                  },
                  "fields": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "gtin",
                        "net_content",
                        "origin",
                        "dangerous_goods",
                        "hs_code"
                      ]
                    }
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "fillFromPhoto",
                  "fields",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/settings/packing-slip": {
      "get": {
        "operationId": "packing_slip_settings_get",
        "summary": "packing_slip_settings_get",
        "description": "Get the packing slip settings: whether the slip prints each line's lots and dates (`printLots`, on by default), its serial numbers (`printSerials`, on) and a bundle's components' lots (`printComponentLots`, off); whether the lots a parcel shipped are written to its Shopify order as the metafield floormode.fulfilment_lots when Shopify confirms the fulfilment (`orderMetafield`, off); whether the label-size delivery note is offered (`labelNote`, off); and the `revision` an edit must name.\n\n**Operation id:** `packing_slip_settings_get` — the same operation is `app.packing.slip_settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_slip_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (fulfillment)"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "packing_slip_settings_set",
        "summary": "packing_slip_settings_set",
        "description": "Replace the packing slip settings (see packing_slip_settings_get), fenced on `expectedRevision` (a stale edit is refused with revision_mismatch); saving what is stored changes nothing. Turning `orderMetafield` on writes one line per lot (item, lot, date; no customer data) to the Shopify order of every parcel confirmed from then on, replacing the order's value when a later parcel ships more lots; orders already fulfilled are not written. Uses the granted write_orders scope.\n\n**Operation id:** `packing_slip_settings_set` — the same operation is `app.packing.slip_settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/packing_slip_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (fulfillment)"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "printLots": {
                    "type": "boolean",
                    "description": "print each line's lots and their dates under it."
                  },
                  "printSerials": {
                    "type": "boolean",
                    "description": "print each line's serial numbers under it."
                  },
                  "printComponentLots": {
                    "type": "boolean",
                    "description": "print the lots of a bundle's components too (off: the bundle prints none)."
                  },
                  "orderMetafield": {
                    "type": "boolean",
                    "description": "write the order's lots to its Shopify order (metafield floormode.fulfilment_lots) when a parcel's fulfilment is confirmed."
                  },
                  "labelNote": {
                    "type": "boolean",
                    "description": "offer the label-size delivery note for a label printer (format=label)."
                  },
                  "giftSlips": {
                    "description": "print a gift order's slip as a gift slip; left out: unchanged.",
                    "type": "boolean"
                  },
                  "giftFields": {
                    "description": "the gift fields, the whole list; [] maps none; left out: unchanged.",
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "attribute"
                          ],
                          "description": "attribute: an order attribute (Additional details)."
                        },
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "the field's name as Shopify shows it; case and - _ spaces do not matter."
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "message",
                            "to",
                            "from",
                            "flag"
                          ],
                          "description": "message: the gift message; to / from: the names; flag: marks the order a gift."
                        },
                        "stores": {
                          "anyOf": [
                            {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                              }
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "the stores (stores_list ids) whose orders it is read on; null: every store."
                        }
                      },
                      "required": [
                        "source",
                        "key",
                        "role",
                        "stores"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "commonGiftFields": {
                    "description": "also read the common gift fields; left out: unchanged.",
                    "type": "boolean"
                  },
                  "giftNoteOnSlip": {
                    "description": "without_message (the note only when the gift has no message) or never; left out: unchanged.",
                    "type": "string",
                    "enum": [
                      "without_message",
                      "never"
                    ]
                  },
                  "autoPrint": {
                    "description": "print the slip with the label (with_label) or only when asked (off); left out: unchanged.",
                    "type": "string",
                    "enum": [
                      "with_label",
                      "off"
                    ]
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "the settings' version as packing_slip_settings_get read them; a save is refused when another changed them since."
                  }
                },
                "required": [
                  "printLots",
                  "printSerials",
                  "printComponentLots",
                  "orderMetafield",
                  "labelNote",
                  "expectedRevision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/settings/preview": {
      "post": {
        "operationId": "settings_preview",
        "summary": "settings_preview",
        "description": "What a settings write would change, with nothing written: name the writer (`operation`, e.g. warehouses_update, settings_set, packing_slip_settings_set, delivery_dates_settings_set, returns_policy_set, returns_label_settings_set, notifications_settings_update, people_settings_update_team, people_settings_update_default_role, accounting_settings_set) and its own input as JSON text (`input`: JSON.stringify of what the save would send). The writer itself runs, through every check a save passes, and is rolled back, so the answer is exactly what saving would keep: `changes` (each leaf's path, before and after, and the setting it belongs to), `unchanged`, `scope` (the warehouse or the whole account) and `outcome` (the writer's own refusal as a value, e.g. settings_set's blockers, else null); a refused save is refused here the same way. search({ setting: \"…\" }) names a setting's writer and its read.\n\n**Operation id:** `settings_preview` — the same operation is `app.settings.preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/settings_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The settings writer to rehearse, e.g. \"warehouses_update\"."
                  },
                  "input": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 65536,
                    "description": "The writer's own input as JSON text — JSON.stringify of exactly what the save would send."
                  }
                },
                "required": [
                  "operation",
                  "input"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/settings/stock-adjustments": {
      "get": {
        "operationId": "stock_adjustment_settings_get",
        "summary": "stock_adjustment_settings_get",
        "description": "Get the adjustment reasons of the merchant's own, retired ones included, in the order they were added: each its `code` (`custom:` + its words), whether a booking with it needs a note (`noteRequired`) and whether it is `retired` (out of the picker, still named on its movements); the value limit `approvalAbove` (`amount`, `currency`) above which an adjustment or a count waits for a second person; `storeCurrency`; `team` (people holding inventory.approve, up to 2, and whether another active person changes stock); and the `revision` an edit must name.\n\n**Operation id:** `stock_adjustment_settings_get` — the same operation is `app.stock.adjustment_settings_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stock_adjustment_settings_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (inventory)"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "stock_adjustment_settings_set",
        "summary": "stock_adjustment_settings_set",
        "description": "Replace the adjustment reasons of the merchant's own (see stock_adjustment_settings_get), each by its `words`, fenced on `expectedRevision` (a stale edit is refused revision_mismatch); saving what is stored changes nothing. A reason's words are fixed once saved and a stored reason is never removed (`details.code` \"reason_removed\"): retire it and add new words. `approvalAbove` sets the value limit in the store's currency (null turns it off, absent keeps it). New words are 2–40 characters and differ from every other reason's (\"reason_words\", \"reason_duplicate\"); at most thirty offered at once and a hundred kept (\"reason_limit\").\n\n**Operation id:** `stock_adjustment_settings_set` — the same operation is `app.stock.adjustment_settings_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stock_adjustment_settings_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "settings (inventory)"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "reasons": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "words": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "noteRequired": {
                          "type": "boolean"
                        },
                        "retired": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "words",
                        "noteRequired",
                        "retired"
                      ]
                    }
                  },
                  "approvalAbove": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 10000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "expectedRevision",
                  "reasons"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/setup": {
      "get": {
        "operationId": "setup_status",
        "summary": "setup_status",
        "description": "Home's setup guide: every warehouse that is not live with its detected steps (bins, stock, live) and next step, the live / in-setup counts, the Shopify locations a warehouse can still be made from (suggested ones first; 3PL locations by name), the store import's state, whether a plan is needed, and the setup checklist: one done flag per step from the first location to the first parcel Floormode shipped, with where the first order stands. Nothing is remembered: everything is re-detected on read.\n\n**Operation id:** `setup_status` — the same operation is `app.setup.status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/setup_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "setup"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "locations",
            "in": "query",
            "required": false,
            "description": "Defaults to true: read whether Shopify holds stock at each candidate location (`holdsStock`, the suggestion). False skips that read and answers false for every candidate (Home's guide, which shows no location facts). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Defaults to true: read whether Shopify holds stock at each candidate location (`holdsStock`, the suggestion). False skips that read and answers false for every candidate (Home's guide, which shows no location facts).",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/setup/first-order": {
      "get": {
        "operationId": "setup_first_order",
        "summary": "setup_first_order",
        "description": "Home's setup step 'Ship a test order': the oldest order on its way through pick and pack — where it stands (to pick, picking, to pack, shipped) with its name and document ids — or null when no order is under way. Make the order in Shopify; this read then follows it through picking_create_batch … packing_fulfill.\n\n**Operation id:** `setup_first_order` — the same operation is `app.setup.first_order({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/setup_first_order`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "setup"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sheet-imports": {
      "get": {
        "operationId": "sheet_imports_get",
        "summary": "sheet_imports_get",
        "description": "A big sheet's job (a Scanning sheet, or a locations list or pattern): its status (queued, running, done, failed), rows done of rows, the outcome counted per name and the first skipped rows by reason, and why a failed job stopped (its pages before it stay applied).\n\n**Operation id:** `sheet_imports_get` — the same operation is `app.sheet.imports_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sheet_imports_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sheet-imports"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "importId",
            "in": "query",
            "required": true,
            "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sheet-imports/close": {
      "post": {
        "operationId": "sheet_imports_close",
        "summary": "sheet_imports_close",
        "description": "Close an ended job (done or failed): sheet_imports_recent stops offering it; its own read and created ids stay. A job still queued or running stays open and answers where it stands. Closing twice is once.\n\n**Operation id:** `sheet_imports_close` — the same operation is `app.sheet.imports_close({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sheet_imports_close`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sheet-imports"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "importId": {
                    "type": "string",
                    "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "importId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sheet-imports/created": {
      "get": {
        "operationId": "sheet_imports_created",
        "summary": "sheet_imports_created",
        "description": "The locations a locations job created, in its order, a page of up to 500 ids (`rows`/`capped`/`cursor`): their labels after the dialog closed. Kept 30 days.\n\n**Operation id:** `sheet_imports_created` — the same operation is `app.sheet.imports_created({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sheet_imports_created`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sheet-imports"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "importId",
            "in": "query",
            "required": true,
            "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A sheetImportCreated id, e.g. \"sheetImportCreated_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A sheetImportCreated id, e.g. \"sheetImportCreated_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sheet-imports/recent": {
      "get": {
        "operationId": "sheet_imports_recent",
        "summary": "sheet_imports_recent",
        "description": "A kind's open jobs, newest first, up to 20 a page (`rows`/`capped`/`cursor`): the locations jobs of one warehouse (`warehouseId`) or of every warehouse, or the Scanning column's sheets (`kind: scanning`), each as sheet_imports_get answers it. A job stays open until a person closes it (sheet_imports_close), so a running or ended job is found again after its page closed.\n\n**Operation id:** `sheet_imports_recent` — the same operation is `app.sheet.imports_recent({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sheet_imports_recent`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sheet-imports"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "scanning",
                "locations"
              ]
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A sheetImports id, e.g. \"sheetImports_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shipments": {
      "get": {
        "operationId": "shipments_list",
        "summary": "shipments_list",
        "description": "List shipments, in the chosen order (`sort`; newest first by default), one page, with the order name and carrier label. Filter by one or more statuses (draft, rated, purchasing, purchased, in_transit, delivered, exception, voided, refund_pending), by the order they belong to, or to the shipments whose checkout option's mapped service the carrier did not offer (`rateFallbackOnly`; voided ones left out).\n\n**Operation id:** `shipments_list` — the same operation is `app.shipments.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. Repeat `status` for each value (`?status=draft&status=rated`), or pass a JSON array (`?status=[\"draft\",\"rated\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "draft",
              "rated"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status.",
              "minItems": 1,
              "maxItems": 9,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "draft",
                  "rated",
                  "purchasing",
                  "purchased",
                  "in_transit",
                  "delivered",
                  "exception",
                  "voided",
                  "refund_pending"
                ]
              }
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A orders id, e.g. \"orders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "fulfillmentOrderId",
            "in": "query",
            "required": false,
            "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "rateFallbackOnly",
            "in": "query",
            "required": false,
            "description": "Only shipments whose rates lacked the service their checkout option is mapped to (`rateFallback: not_offered`), voided ones left out. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only shipments whose rates lacked the service their checkout option is mapped to (`rateFallback: not_offered`), voided ones left out.",
              "type": "boolean"
            }
          },
          {
            "name": "stores",
            "in": "query",
            "required": false,
            "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store. Repeat `stores` for each value (`?stores=channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stores=[\"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "Only the rows of any of these stores: store ids from `stores_list`; absent = every store. Refused while the account has one store.",
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "shipments_create_draft",
        "summary": "shipments_create_draft",
        "description": "Open a draft shipment for an order (optionally scoped to one fulfillment order) against a connected carrier account. Without `carrierAccountId` the account is chosen: the one the parcel's checkout option is mapped to when it is an active parcel account that can ship there, else the first such account by label; none refuses with `conflict` `code: no_carrier_account`. The answer names the account and how it was chosen (`draftAccountSource`: `explicit`, `mapped`, `default`). The mode and tracking type come from the carrier account; the Worker then rate-shops and buys it. A parcel that crosses a customs border (outside the EU VAT area, or between two other territories) starts with its declaration pre-filled from its contents: the pack job's scanned units, else the fulfillment order's lines, each with the product's HS code and country of origin from Shopify, its unit weight and the paid unit value. `customsItems` replaces the pre-fill. One OPEN draft per fulfillment order: while a shipment for that fulfillment order is still draft/rated/purchasing, a second draft is refused with `conflict` (`code: open_draft_exists`, `shipmentId` of the live one) — rate or buy that one. A pickup, local-delivery or other non-shipping fulfillment order (or an order with no shipping fulfillment order at all) gets no label: `conflict` with `code: not_a_shipping_order` and its `deliveryMethod`; shipments_claimPurchase refuses the same way, so no label is ever bought for one. A cancelled order gets no draft (`conflict`, `code: cancelled`): its draft and rated shipments close when Shopify cancels it.\n\n**Operation id:** `shipments_create_draft` — the same operation is `app.shipments.create_draft({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_create_draft`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "document id of the order.",
                    "format": "floormode-id"
                  },
                  "fulfillmentOrderId": {
                    "description": "document id of the fulfillment order.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "packJobId": {
                    "description": "The pack job this parcel is; its weighed package rates the shipment (B-0005).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "carrierAccountId": {
                    "description": "document id of the carrier account; absent = the mapped account, else the first reachable one.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "customsItems": {
                    "description": "The declaration lines, one per item of the parcel: description, quantity, unit value and currency, net weight of one unit in grams, HS code (6 to 13 digits), ISO country of origin, and the item it came from (variantId). Replaces the stored lines.",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "hsCode": {
                          "type": "string",
                          "maxLength": 32,
                          "description": "Harmonized System tariff code: 6 to 13 digits."
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Unit value in `currency`."
                        },
                        "currency": {
                          "type": "string",
                          "minLength": 1
                        },
                        "netWeightGrams": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Net weight of ONE unit, in grams."
                        },
                        "originCountry": {
                          "type": "string",
                          "maxLength": 32,
                          "description": "ISO alpha-2 country of manufacture."
                        },
                        "variantId": {
                          "description": "The item this line came from, as shipments.get lists it; send it back, or the line counts as typed and loses its item.",
                          "type": "string",
                          "format": "floormode-id"
                        }
                      },
                      "required": [
                        "hsCode",
                        "description",
                        "quantity",
                        "value",
                        "currency",
                        "netWeightGrams",
                        "originCountry"
                      ]
                    }
                  },
                  "iossNumber": {
                    "description": "IOSS number, only for goods sent from outside the EU into it (≤ €150). No connected carrier sends it yet, so a rate or label request carrying one is refused.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "incoterm": {
                    "description": "DAP = recipient pays; DDP = seller prepays. Sent by EasyPost.",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "DAP",
                          "DDP"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dutyPayment": {
                    "description": "Who pays duties. No connected carrier sends it yet; a request carrying it is refused.",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "SENDER",
                          "RECEIVER",
                          "THIRD_PARTY"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "orderId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/bulk-purchase": {
      "post": {
        "operationId": "shipments_bulk_purchase",
        "summary": "shipments_bulk_purchase",
        "description": "Buy the labels of up to 100 shipments in one run: name the shipments, or the fulfillment orders whose draft or rated shipment to buy. The run buys them one at a time in the background; `rows` are the per-shipment outcomes at opening (`pending`, `replayed` for a label that already exists, `refused` with a `code`), `jobId` reads the progress through shipments.bulk_purchase_status. `requestKey` replays the same run on a retry; `serviceId` forces one carrier service, otherwise the shipping rules or the cheapest rate decide. Each label is a paid carrier purchase. A purchase the carrier never answered is retried on the SAME carrier key with exactly the first rate, parcel and carrier account; if any of them changed meanwhile (new rules, a new weight, replaced or sandbox-flipped credentials) the row is refused with `purchase_payload_changed`, and a claim from before payloads were bound, or on a direct carrier, with `purchase_reconciliation_required`. Neither buys again: check the shipment at the carrier and answer with shipments.resolvePurchase (no label was created, or record the label found there), then buy once more if no label exists. A shipment of a pickup, local-delivery or other non-shipping order is refused at opening with `not_a_shipping_order` (final, never retried) and the refusal is recorded on the shipment's timeline. A draft or rated shipment of a closed order is refused at opening and again before its batch reaches the carrier, recorded on its timeline: `cancelled` (Shopify cancelled the order; its unbought shipments close), `cancel_pending` (a cancel Floormode asked for holds the order) or `order_fulfilled`. A shipment whose carrier account cannot reach its destination, cannot carry its dangerous goods, or whose required customs declaration has gaps, is skipped before any carrier call with `carrier_cannot_reach` / `carrier_cannot_carry_dg` / `customs_incomplete` and the sentence naming what is missing and the way out.\n\n**Operation id:** `shipments_bulk_purchase` — the same operation is `app.shipments.bulk_purchase({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_bulk_purchase`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentIds": {
                    "description": "Shipments to buy a label for (1 to 100).",
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A shipments id, e.g. \"shipments_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "fulfillmentOrderIds": {
                    "description": "Fulfillment orders whose open draft or rated shipment to buy (1 to 100).",
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  },
                  "serviceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  }
                },
                "required": [
                  "requestKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/bulk-purchase/status": {
      "get": {
        "operationId": "shipments_bulk_purchase_status",
        "summary": "shipments_bulk_purchase_status",
        "description": "Read one bulk purchase run: every shipment with its outcome (`pending`, `purchased`, `replayed`, `refused` with `code` and `detail`), the tally and `finishedAt` once no shipment is pending. Null for an unknown run. A refused row's `code` is the refusing door's own: `purchase_payload_changed` (the retry would not buy what the first attempt did) and `purchase_reconciliation_required` (a label may already exist) both mean: check the shipment at the carrier and answer with shipments.resolvePurchase before buying again; `purchase_unresolved` means the carrier never answered twice.\n\n**Operation id:** `shipments_bulk_purchase_status` — the same operation is `app.shipments.bulk_purchase_status({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_bulk_purchase_status`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "jobId",
            "in": "query",
            "required": true,
            "description": "A bulkPurchaseJobs id, e.g. \"bulkPurchaseJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bulkPurchaseJobs id, e.g. \"bulkPurchaseJobs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shipments/buy-label": {
      "post": {
        "operationId": "shipments_buy_label",
        "summary": "shipments_buy_label",
        "description": "Buy ONE label for a shipment at one of its rates (`rateId` from shipments.rate): the desk's own purchase. The shipment is claimed before the carrier is asked, under a key the carrier dedupes on, so a repeated call never buys twice: it answers the label already bought (`replayed: true`). Answers by `outcome`: `bought` (status, trackingId, `documents[].documentId` for shipping.document_link); `refused` (the carrier refused before acting, nothing was bought); `unknown` (the carrier never answered: a label MAY exist, never buy it again elsewhere; after 5 minutes call shipments.lookup_purchase or answer shipments.resolvePurchase); `undone` (bought, could not be recorded, cancelled at the carrier); `unrecorded` (bought and neither recorded nor cancelled: reconcile `handle` at the carrier). `refused` and `undone` say `claimHeld` when the shipment still holds the attempt, and every failure says what to do `next`. Refused before any carrier call with the codes of shipments.rate, `unknown_rate` (get rates again), `shipping_context_stale`, `shipping_option_changed`, `purchase_reconciliation_required`; for a DPD pickup point, DPD's own listing is read first: `point_not_listed`, `point_metadata_conflict` (invalid_input) and `point_lookup_failed` (conflict, try again: nothing was booked); `unknown_rate` and an inactive or unconnected account before the person is asked to confirm. Irreversible: the label is paid for at the carrier.\n\n**Operation id:** `shipments_buy_label` — the same operation is `app.shipments.buy_label({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_buy_label`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
                    "format": "floormode-id"
                  },
                  "rateId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A `rateId` of the shipment's rates (shipments.rate, shipments.get).",
                    "format": "floormode-id"
                  },
                  "servicePoint": {
                    "description": "The pickup point to send it to; absent, the order's own point. DPD books the shop DPD lists under this id, with DPD's address; an address you pass only says where to look, so pass the shop's own address. GLS cannot book a point on an order that ships to a pickup point yet.",
                    "type": "object",
                    "properties": {
                      "carrier": {
                        "type": "string",
                        "enum": [
                          "sendcloud",
                          "easypost",
                          "shipengine",
                          "freightview",
                          "uber_freight",
                          "dhl_parcel_de",
                          "ups",
                          "hermes",
                          "dpd_de",
                          "gls_de",
                          "post_at",
                          "fedex",
                          "usps",
                          "canada_post",
                          "purolator",
                          "ontrac",
                          "pitney_bowes",
                          "inpost",
                          "mondial_relay",
                          "colissimo",
                          "correos",
                          "packeta",
                          "postnl",
                          "internetmarke",
                          "the_courier_guy",
                          "fastway_za",
                          "pargo",
                          "aramex",
                          "royal_mail",
                          "evri",
                          "dpd_uk",
                          "amazon_shipping",
                          "dhl_ecommerce_uk",
                          "inpost_uk",
                          "sendle",
                          "auspost",
                          "aramex_au",
                          "couriersplease",
                          "nzpost",
                          "bring",
                          "postnord",
                          "dhl_express",
                          "dhl_ecommerce_americas",
                          "test_carrier"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "point",
                          "locker"
                        ]
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "company": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "address1": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "address2": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "city": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "province": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "zip": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phone": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "company",
                          "address1",
                          "address2",
                          "city",
                          "province",
                          "country",
                          "zip",
                          "phone"
                        ]
                      }
                    },
                    "required": [
                      "carrier",
                      "id",
                      "name",
                      "address"
                    ]
                  }
                },
                "required": [
                  "shipmentId",
                  "rateId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/customs": {
      "post": {
        "operationId": "shipments_set_customs",
        "summary": "shipments_set_customs",
        "description": "Set the customs declaration of a draft/rated shipment (SHP-007): the lines (`customsItems` replaces them; `refill: true` derives them again from the parcel's contents and the products' Shopify HS codes and origins), the IOSS number, the incoterm (DAP/DDP) and who pays duties. A rated shipment returns to `draft` with its rates dropped, so the declaration that is bought is the one that was rated: get rates again. While a required declaration has gaps (no line, a line without description, quantity, value or net weight above 0, an HS code that is not 6 to 13 digits, an origin that is not an ISO alpha-2 code) the rate route and shipments_claimPurchase refuse with `conflict` `code: customs_incomplete`; a carrier account that cannot reach the destination is refused with `code: carrier_cannot_reach`, one that cannot carry the parcel's dangerous goods with `code: carrier_cannot_carry_dg`. All before any carrier call; shipments.get publishes the same verdict (`labelRefusal`) and the route (`route`). The carrier generates the customs documents (CN23, invoice); they are stored with the label. Rejected once a label is purchased. On a cancelled order's shipment nothing is declared: the order's draft and rated shipments close instead, and the answer is `status: voided`.\n\n**Operation id:** `shipments_set_customs` — the same operation is `app.shipments.set_customs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_set_customs`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "document id of the shipment.",
                    "format": "floormode-id"
                  },
                  "customsItems": {
                    "description": "The declaration lines, one per item of the parcel: description, quantity, unit value and currency, net weight of one unit in grams, HS code (6 to 13 digits), ISO country of origin, and the item it came from (variantId). Replaces the stored lines.",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "hsCode": {
                          "type": "string",
                          "maxLength": 32,
                          "description": "Harmonized System tariff code: 6 to 13 digits."
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Unit value in `currency`."
                        },
                        "currency": {
                          "type": "string",
                          "minLength": 1
                        },
                        "netWeightGrams": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Net weight of ONE unit, in grams."
                        },
                        "originCountry": {
                          "type": "string",
                          "maxLength": 32,
                          "description": "ISO alpha-2 country of manufacture."
                        },
                        "variantId": {
                          "description": "The item this line came from, as shipments.get lists it; send it back, or the line counts as typed and loses its item.",
                          "type": "string",
                          "format": "floormode-id"
                        }
                      },
                      "required": [
                        "hsCode",
                        "description",
                        "quantity",
                        "value",
                        "currency",
                        "netWeightGrams",
                        "originCountry"
                      ]
                    }
                  },
                  "iossNumber": {
                    "description": "IOSS number, only for goods sent from outside the EU into it (≤ €150). No connected carrier sends it yet, so a rate or label request carrying one is refused.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "incoterm": {
                    "description": "DAP = recipient pays; DDP = seller prepays. Sent by EasyPost.",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "DAP",
                          "DDP"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dutyPayment": {
                    "description": "Who pays duties. No connected carrier sends it yet; a request carrying it is refused.",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "SENDER",
                          "RECEIVER",
                          "THIRD_PARTY"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "refill": {
                    "description": "Derive the lines again from the parcel's contents; excludes customsItems.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/discard": {
      "post": {
        "operationId": "shipments_discard_draft",
        "summary": "shipments_discard_draft",
        "description": "Discard a draft or rated shipment nobody bought: it becomes voided (nothing is refunded, no label existed) and its parcel can be drafted again with any carrier account. Refused once a purchase is claimed; void the label instead.\n\n**Operation id:** `shipments_discard_draft` — the same operation is `app.shipments.discard_draft({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_discard_draft`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "document id of the shipment.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/get": {
      "get": {
        "operationId": "shipments_get",
        "summary": "shipments_get",
        "description": "Get one shipment: its status and tracking id, its rates and chosen rate, its documents (labels, BOL, customs forms), its tracker and where it goes. `labelRefusal`: why no label can be rated or bought as it stands. `ratesStale`: the stored rates may not be bought, get rates again. `mappingChanged`: the checkout option's mapping moved since the default rate was decided; nothing is refused. `shipment.rateDecision` is that default: `defaultRateId`, its `basis` (`checkout_option`, `rule`, `cheapest`, `none`), `ruleName`, the checkout option (`optionTitle`, `optionRevision`) and a `fallback` when the mapped service did not decide (`reason`: `not_offered`, the carrier did not quote it; `other_account`, drafted on another account than the mapping). `shipment.dangerousGoods`: the parcel's dangerous goods as last derived (`strictest` class, `classes`, `unNumbers`, `items`), null when none is marked.\n\n**Operation id:** `shipments_get` — the same operation is `app.shipments.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": true,
            "description": "document id of the shipment.",
            "schema": {
              "type": "string",
              "description": "document id of the shipment.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shipments/lookup-purchase": {
      "post": {
        "operationId": "shipments_lookup_purchase",
        "summary": "shipments_lookup_purchase",
        "description": "Look a label purchase that did not finish (the shipment is `purchasing`) up at the carrier, by the reference the attempt recorded before paying: one free read, never a purchase. { outcome: \"recorded\" } when the carrier holds the label (it is recorded with its tracking, the shipment `purchased`), \"not_found\" with the `reference` (check the carrier, then shipments.resolvePurchase), \"no_reference\" when the carrier names no purchase before paying, or \"carrier_error\". A bought label and its tracking: shipments.get.\n\n**Operation id:** `shipments_lookup_purchase` — the same operation is `app.shipments.lookup_purchase({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_lookup_purchase`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/rate": {
      "post": {
        "operationId": "shipments_rate",
        "summary": "shipments_rate",
        "description": "Get the carrier's rates for a draft or rated shipment (make one with shipments.create_draft): the rates are stored on the shipment with the default the checkout option or the shipping rules chose (`decision.defaultRateId`), and the shipment is `rated`. Answers { outcome: \"rated\", rates, decision }, or { outcome: \"carrier_error\", message } when the carrier failed (nothing stored). Refused before any carrier call with `conflict` and `details.code`: `carrier_account_inactive`, `rates_unsupported`, `no_rates_offered`, `carrier_cannot_reach`, `customs_incomplete`, `carrier_cannot_carry_dg`, a cancelled or fulfilled order's code; `service_point_other_carrier` (invalid_input) for another carrier's pickup point; `point_other_network` (an order to another carrier's pickup point) and `gls_point_order_unverifiable` (GLS on an order that ships to a pickup point) (invalid_input). Next: shipments.buy_label with a `rateId`.\n\n**Operation id:** `shipments_rate` — the same operation is `app.shipments.rate({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_rate`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
                    "format": "floormode-id"
                  },
                  "servicePoint": {
                    "description": "A pickup point from shipments.service_points to rate the parcel to. DPD books the shop DPD lists under this id, with DPD's address; an address you pass only says where to look, so pass the shop's own address. GLS cannot book a point on an order that ships to a pickup point yet.",
                    "type": "object",
                    "properties": {
                      "carrier": {
                        "type": "string",
                        "enum": [
                          "sendcloud",
                          "easypost",
                          "shipengine",
                          "freightview",
                          "uber_freight",
                          "dhl_parcel_de",
                          "ups",
                          "hermes",
                          "dpd_de",
                          "gls_de",
                          "post_at",
                          "fedex",
                          "usps",
                          "canada_post",
                          "purolator",
                          "ontrac",
                          "pitney_bowes",
                          "inpost",
                          "mondial_relay",
                          "colissimo",
                          "correos",
                          "packeta",
                          "postnl",
                          "internetmarke",
                          "the_courier_guy",
                          "fastway_za",
                          "pargo",
                          "aramex",
                          "royal_mail",
                          "evri",
                          "dpd_uk",
                          "amazon_shipping",
                          "dhl_ecommerce_uk",
                          "inpost_uk",
                          "sendle",
                          "auspost",
                          "aramex_au",
                          "couriersplease",
                          "nzpost",
                          "bring",
                          "postnord",
                          "dhl_express",
                          "dhl_ecommerce_americas",
                          "test_carrier"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "point",
                          "locker"
                        ]
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "company": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "address1": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "address2": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "city": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "province": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "zip": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phone": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "company",
                          "address1",
                          "address2",
                          "city",
                          "province",
                          "country",
                          "zip",
                          "phone"
                        ]
                      }
                    },
                    "required": [
                      "carrier",
                      "id",
                      "name",
                      "address"
                    ]
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/refresh-tracking": {
      "post": {
        "operationId": "shipments_refresh_tracking",
        "summary": "shipments_refresh_tracking",
        "description": "Queue a manual tracking refresh for a purchased, in-transit, delivered or exception direct-carrier shipment. Requires an active connected carrier account and tracking number. Pending requests are deduplicated; refreshes are limited to one per minute. The durable result updates the canonical shipment tracker. A direct carrier whose tracking Floormode does not read (DPD Germany) answers `declined: \"tracking_not_connected\"` with its sentence and queues nothing.\n\n**Operation id:** `shipments_refresh_tracking` — the same operation is `app.shipments.refresh_tracking({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_refresh_tracking`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "A shipments id, e.g. \"shipments_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/resolve-purchase": {
      "post": {
        "operationId": "shipments_resolvePurchase",
        "summary": "shipments_resolvePurchase",
        "description": "Answer a label purchase that did not finish, after checking the carrier. A carrier that never answered leaves the shipment `purchasing`, because a label may exist; a direct carrier, a claim from before payloads were bound or an open `purchase_reconciliation_required` exception is never retried by itself. `resolution.outcome`: `no_label` (none was created, or it was cancelled at the carrier) makes the shipment `rated` again, to be bought once more (`voided` when Shopify cancelled its order meanwhile: it closes, and the answer's `status` says so); `label_exists` records the label with its `trackingId` (and optional `carrierShipmentId`) at the rate and cost the attempt was for, with no documents (print it from the carrier), and the shipment is `purchased`, its tracking going to the Shopify fulfillment as for any bought label. Either answer resolves the shipment's open purchase exceptions; an optional `note` (500 characters) lands on its timeline with the member who answered. Refused with `conflict`: `purchase_not_pending` (the shipment is not `purchasing`), `effect_in_flight` (the attempt is under 5 minutes old) or `purchase_retry_available` (buying again with the first rate settles it). shipments.get publishes when it is admitted (`purchaseResolution`). Irreversible: a wrong `no_label` may pay for two labels.\n\n**Operation id:** `shipments_resolvePurchase` — the same operation is `app.shipments.resolvePurchase({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_resolvePurchase`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "A shipments id, e.g. \"shipments_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "resolution": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "outcome": {
                            "type": "string",
                            "const": "no_label"
                          },
                          "note": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "outcome"
                        ],
                        "additionalProperties": false,
                        "description": "No label exists at the carrier: none was created, or it was cancelled there."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "outcome": {
                            "type": "string",
                            "const": "label_exists"
                          },
                          "trackingId": {
                            "description": "The label's tracking number at the carrier, if it has one.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "format": "floormode-id"
                          },
                          "carrierShipmentId": {
                            "description": "The carrier's own shipment or parcel id, when it shows one.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "format": "floormode-id"
                          },
                          "note": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "outcome"
                        ],
                        "additionalProperties": false,
                        "description": "A label exists at the carrier: it is recorded as this shipment's purchase."
                      }
                    ]
                  }
                },
                "required": [
                  "shipmentId",
                  "resolution"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipments/service-points": {
      "get": {
        "operationId": "shipments_service_points",
        "summary": "shipments_service_points",
        "description": "The pickup points and lockers of the shipment's carrier near the order's ship-to, or near the place you name (country, zip, city, street, or latitude + longitude; `type` point or locker; `limit` up to 20), nearest first, and the point the order itself names (`orderPoint`), with its `standing` for this carrier (door, own_named, own_unnamed, other_network) and `pickRefusal`, why no pick can be booked here (no search is run then). Answers { outcome: \"found\", orderPoint, standing, pickRefusal, points, capped } or { outcome: \"carrier_error\", message }. Refused with `service_points_unsupported` for a carrier Floormode cannot search. Pass a point to shipments.rate and shipments.buy_label as `servicePoint` to send the parcel there.\n\n**Operation id:** `shipments_service_points` — the same operation is `app.shipments.service_points({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_service_points`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": true,
            "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
            "schema": {
              "type": "string",
              "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
              "format": "floormode-id"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "street",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shipments/void-label": {
      "post": {
        "operationId": "shipments_void_label",
        "summary": "shipments_void_label",
        "description": "Void a bought label at its carrier. The carrier's answer is recorded: `voided` when it refunded the label at once, `refund_pending` when the refund is pending at the carrier. A label already voided answers `alreadyVoided: true` and the carrier is not asked again. { outcome: \"carrier_error\", message } when the carrier refused (nothing changed); { outcome: \"unknown\", handle, next } when it never answered (the label may be voided: check the carrier before using it); { outcome: \"unrecorded\", handle } when the carrier voided it and Floormode could not record it. Refused before the person is asked to confirm with `no_label_to_void`, `carrier_account_inactive`, `carrier_account_unusable` or `void_unsupported`. Irreversible: the label cannot be used after it.\n\n**Operation id:** `shipments_void_label` — the same operation is `app.shipments.void_label({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipments_void_label`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipments"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shipmentId": {
                    "type": "string",
                    "description": "The shipment (`shipments_create_draft`'s `shipmentId`, `shipments_list`).",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "shipmentId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipping-rules": {
      "get": {
        "operationId": "shipping_rules_list",
        "summary": "shipping_rules_list",
        "description": "List the tenant's shipping rules in cascade (position) order. Each rule has conditions (destinationCountry, shippingOption, weight, total, sku, channel, dangerousGoods), matchAll (AND/OR) and an action (assign_service pins a carrier/service, cheapest_rate takes the cheapest rate, downgrade_service the cheapest non-express rate). Applied when a shipment's rates are recorded, unless the parcel's checkout option is mapped to a service the carrier quoted: the first enabled rule that matches and yields a rate picks the default, the cheapest priced rate is the fallback. Answers `{ rows, capped, cursor: null }`: create refuses the 101st live rule, and `capped: true` means a cascade from before that ceiling is longer than the page — rate selection then offers no default when no listed rule matched.\n\n**Operation id:** `shipping_rules_list` — the same operation is `app.shipping.rules_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "shipping_rules_create",
        "summary": "shipping_rules_create",
        "description": "Create a shipping rule. It is added at the end of the cascade and enabled by default. An assign_service rule with no conditions is a preset (a saved carrier+service applied to every order).\n\n**Operation id:** `shipping_rules_create` — the same operation is `app.shipping.rules_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "destinationCountry",
                            "parcelShippingOption",
                            "parcelWeight",
                            "total",
                            "sku",
                            "channel",
                            "parcelDangerousGoods",
                            "tag"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false,
                      "description": "`neq` and `in` take a comma-separated list. For `shippingOption` (the customer's checkout option), `eq` / `neq` / `in` take ids from checkout_options_list and `contains` matches the title; `gt` / `lt` are refused, and a rule with this condition is skipped while the order's option is unknown. For `dangerousGoods` (the classes the order's or the parcel's items are marked with; `none` when it holds none), `eq` / `neq` / `in` take class keys (lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated, none); `contains`, `gt` and `lt` are refused. Shipping names the parcel's own facts parcelWeight (grams), parcelDangerousGoods and parcelShippingOption (the parcel's ONE checkout option); the order's are destinationCountry, total, sku, channel and tag. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                    }
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "action": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "assign_service"
                          },
                          "params": {
                            "type": "object",
                            "properties": {
                              "carrier": {
                                "type": "string"
                              },
                              "service": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "cheapest_rate"
                          },
                          "params": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "downgrade_service"
                          },
                          "params": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      }
                    ],
                    "description": "Discriminated on `type`: assign_service {carrier?, service?} (a preset when the rule has no conditions); cheapest_rate (the cheapest rate) / downgrade_service (the cheapest non-express rate) take {}. No action reads fulfillBy, a ship-by deadline."
                  },
                  "enabled": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "conditions",
                  "matchAll",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipping-rules/delete": {
      "post": {
        "operationId": "shipping_rules_delete",
        "summary": "shipping_rules_delete",
        "description": "Soft-delete a shipping rule; it stops being evaluated immediately.\n\n**Operation id:** `shipping_rules_delete` — the same operation is `app.shipping.rules_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A shippingRules id, e.g. \"shippingRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipping-rules/reorder": {
      "post": {
        "operationId": "shipping_rules_reorder",
        "summary": "shipping_rules_reorder",
        "description": "Move a shipping rule one slot up or down the cascade (rules evaluate in position order, lowest first, first match wins). Returns moved:false when already at the end.\n\n**Operation id:** `shipping_rules_reorder` — the same operation is `app.shipping.rules_reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A shippingRules id, e.g. \"shippingRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "ruleId",
                  "direction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipping-rules/test": {
      "get": {
        "operationId": "shipping_rules_test",
        "summary": "shipping_rules_test",
        "description": "Test the shipping rules on one shipment, applying nothing (B-RUL-1): the default the rate decision would store over the shipment's recorded rates — a mapped checkout option decides before any rule, then the first matching rule whose action finds a rate, then the cheapest (never past a capped list). `basis` is rates_needed while the shipment has no rate: the rules' verdicts only. Each rule lists every condition's verdict (pass, fail, unknown) and why it was skipped (shipping_option_unknown, skus_incomplete).\n\n**Operation id:** `shipping_rules_test` — the same operation is `app.shipping.rules_test({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_test`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": true,
            "description": "document id of the shipment.",
            "schema": {
              "type": "string",
              "description": "document id of the shipment.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shipping-rules/update": {
      "post": {
        "operationId": "shipping_rules_update",
        "summary": "shipping_rules_update",
        "description": "Update a shipping rule. Any field may be changed independently — pass only what you want to change (e.g. enabled to toggle the rule on or off).\n\n**Operation id:** `shipping_rules_update` — the same operation is `app.shipping.rules_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_rules_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping-rules"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "document id of the shipping rule.",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "destinationCountry",
                            "parcelShippingOption",
                            "parcelWeight",
                            "total",
                            "sku",
                            "channel",
                            "parcelDangerousGoods",
                            "tag"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false,
                      "description": "`neq` and `in` take a comma-separated list. For `shippingOption` (the customer's checkout option), `eq` / `neq` / `in` take ids from checkout_options_list and `contains` matches the title; `gt` / `lt` are refused, and a rule with this condition is skipped while the order's option is unknown. For `dangerousGoods` (the classes the order's or the parcel's items are marked with; `none` when it holds none), `eq` / `neq` / `in` take class keys (lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated, none); `contains`, `gt` and `lt` are refused. Shipping names the parcel's own facts parcelWeight (grams), parcelDangerousGoods and parcelShippingOption (the parcel's ONE checkout option); the order's are destinationCountry, total, sku, channel and tag. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                    }
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "action": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "assign_service"
                          },
                          "params": {
                            "type": "object",
                            "properties": {
                              "carrier": {
                                "type": "string"
                              },
                              "service": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "cheapest_rate"
                          },
                          "params": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "downgrade_service"
                          },
                          "params": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "params"
                        ]
                      }
                    ],
                    "description": "Discriminated on `type`: assign_service {carrier?, service?} (a preset when the rule has no conditions); cheapest_rate (the cheapest rate) / downgrade_service (the cheapest non-express rate) take {}. No action reads fulfillBy, a ship-by deadline."
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/shipping/documents/link": {
      "get": {
        "operationId": "shipping_document_link",
        "summary": "shipping_document_link",
        "description": "A download link for one stored shipping document — a label, a customs form, a manifest: `url` is absolute and signed, works without a session for 10 minutes (`expiresAt`) and answers the file as an attachment; fetch it, or hand it to the person. The file never travels in this answer. Refused with `document_expired` or `document_lost` when its bytes are gone, `document_unlinkable` for a carrier's copy whose order was erased.\n\n**Operation id:** `shipping_document_link` — the same operation is `app.shipping.document_link({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shipping_document_link`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shipping"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "required": true,
            "description": "A stored document: `documents[].documentId` of shipments.buy_label, `documents[]._id` of shipments.get, a manifest's `documentId`.",
            "schema": {
              "type": "string",
              "description": "A stored document: `documents[].documentId` of shipments.buy_label, `documents[]._id` of shipments.get, a manifest's `documentId`.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shopify-locations": {
      "get": {
        "operationId": "shopify_locations_list",
        "summary": "shopify_locations_list",
        "description": "List the mirrored Shopify locations of the authenticated tenant (max 100). This is the Shopify location MIRROR, not the internal topology tree: `/locations` and `locations_*` are the warehouse's bins/racks/zones.\n\n**Operation id:** `shopify_locations_list` — the same operation is `app.shopify.locations_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shopify_locations_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shopify-locations"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/shopify-locations/refresh": {
      "post": {
        "operationId": "shopify_locations_refresh",
        "summary": "shopify_locations_refresh",
        "description": "Read Shopify locations fresh and apply what Shopify says now. At most 50; their name, address, active and whether they fulfill online orders. Use it before warehouses_create_from_locations when a location changed minutes ago. Answers { read, locations }: read false means Shopify could not be reached and nothing changed.\n\n**Operation id:** `shopify_locations_refresh` — the same operation is `app.shopify.locations_refresh({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/shopify_locations_refresh`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "shopify-locations"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyLocationIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    },
                    "description": "Shopify's numeric location ids to read fresh (`shopifyLocationId` of shopify_locations_list or setup_status's candidates)."
                  }
                },
                "required": [
                  "shopifyLocationIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sku-slotting": {
      "get": {
        "operationId": "sku_slotting_list",
        "summary": "sku_slotting_list",
        "description": "List the per-SKU slotting records of a warehouse (max 200): the fixed home bin, the min/max replenishment thresholds, the computed abcClass and the last-reslot timestamp, hydrated with sku, variant title and home bin code.\n\n**Operation id:** `sku_slotting_list` — the same operation is `app.sku.slotting_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sku_slotting_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sku-slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "sku_slotting_set",
        "summary": "sku_slotting_set",
        "description": "Create or update a variant's per-SKU slotting record in a warehouse (idempotent on variant + warehouse). homeLocationId (null clears) must belong to the warehouse and feeds the directed-putaway home-first step; minQty/maxQty are the replenishment thresholds; abcClass (null clears) the velocity class. Omitted fields keep their stored value.\n\n**Operation id:** `sku_slotting_set` — the same operation is `app.sku.slotting_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sku_slotting_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sku-slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "homeLocationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "minQty": {
                    "type": "number",
                    "minimum": 0
                  },
                  "maxQty": {
                    "type": "number",
                    "minimum": 0
                  },
                  "abcClass": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "A",
                          "B",
                          "C"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "variantId",
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sku-slotting/delete": {
      "post": {
        "operationId": "sku_slotting_delete",
        "summary": "sku_slotting_delete",
        "description": "Delete a per-SKU slotting record by document id.\n\n**Operation id:** `sku_slotting_delete` — the same operation is `app.sku.slotting_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sku_slotting_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sku-slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "skuSlottingId": {
                    "type": "string",
                    "description": "A skuSlotting id, e.g. \"skuSlotting_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "skuSlottingId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sku-slotting/get": {
      "get": {
        "operationId": "sku_slotting_get",
        "summary": "sku_slotting_get",
        "description": "Get one variant's per-SKU slotting record in a warehouse, or null.\n\n**Operation id:** `sku_slotting_get` — the same operation is `app.sku.slotting_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sku_slotting_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sku-slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/slotting/abc": {
      "get": {
        "operationId": "slotting_abc_velocity",
        "summary": "slotting_abc_velocity",
        "description": "ABC velocity of a warehouse's SKUs (top 200 by pick volume) from the pick ledger over a window (default 90 days): each row carries sku, picks and the A/B/C class (A = top ~80% of picks). `capped` discloses a truncated ledger scan.\n\n**Operation id:** `slotting_abc_velocity` — the same operation is `app.slotting.abc_velocity({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_abc_velocity`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "required": false,
            "description": "Analysis window; defaults to 90, cut to the days the pick ledger keeps (history_status tier.days). The answer's windowDays is the window used.",
            "schema": {
              "description": "Analysis window; defaults to 90, cut to the days the pick ledger keeps (history_status tier.days). The answer's windowDays is the window used.",
              "type": "integer",
              "minimum": 1,
              "maximum": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/slotting/assign-abc": {
      "post": {
        "operationId": "slotting_assign_abc",
        "summary": "slotting_assign_abc",
        "description": "Compute ABC velocity and stamp the class onto the per-SKU records (creating a minimal row where none exists). Feeds the abcClass rule predicate + the T5 replenishment inputs. Bounded (top 1000 by pick volume) + cap-disclosed. Returns created/updated/unchanged counts.\n\n**Operation id:** `slotting_assign_abc` — the same operation is `app.slotting.assign_abc({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_assign_abc`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "windowDays": {
                    "description": "Analysis window; defaults to 90, cut to the days the pick ledger keeps (history_status tier.days). The answer's windowDays is the window used.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 400
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/slotting/reslot": {
      "get": {
        "operationId": "slotting_reslot_suggestions",
        "summary": "slotting_reslot_suggestions",
        "description": "Re-slotting suggestions (suggestion-only, WHT-014): SKUs whose current primary slot's golden-zone band diverges from the band their velocity deserves (an A-class SKU stuck in the far third). Each row carries the current bin, its pick-sequence band and the ideal band. Bounded + cap-disclosed. Materialize the top ones with slotting_create_reslot_tasks.\n\n**Operation id:** `slotting_reslot_suggestions` — the same operation is `app.slotting.reslot_suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_reslot_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "required": false,
            "description": "Analysis window; defaults to 90, cut to the days the pick ledger keeps (history_status tier.days). The answer's windowDays is the window used.",
            "schema": {
              "description": "Analysis window; defaults to 90, cut to the days the pick ledger keeps (history_status tier.days). The answer's windowDays is the window used.",
              "type": "integer",
              "minimum": 1,
              "maximum": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/slotting/reslot-tasks": {
      "post": {
        "operationId": "slotting_create_reslot_tasks",
        "summary": "slotting_create_reslot_tasks",
        "description": "Materialize re-slotting suggestions as move tasks (M10 T3) for human approval (WHT-014, max 50 variants). For each variant it finds the current primary slot, resolves where the slotting rules would place it and — when that differs — creates a deduped `move` task (refType slotting) from the current bin to the target. Suggestion-only: it creates review tasks, never moves stock. Variants with no slot / no target / an existing task are skipped.\n\n**Operation id:** `slotting_create_reslot_tasks` — the same operation is `app.slotting.create_reslot_tasks({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_create_reslot_tasks`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "document ids of the variants."
                  }
                },
                "required": [
                  "warehouseId",
                  "variantIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/slotting/rules": {
      "get": {
        "operationId": "slotting_rules_list",
        "summary": "slotting_rules_list",
        "description": "List a warehouse's slotting rules in cascade (position) order. Each is an ordered conditions→target row (first match wins at putaway): the conditions test the item in the one rule language (matchAll: all or any) and the target directs it (zoneId, locationTypeId or homeLocationId). An empty rule set ⇒ today's nearest-available directed putaway (no regression).\n\n**Operation id:** `slotting_rules_list` — the same operation is `app.slotting.rules_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "slotting_rules_create",
        "summary": "slotting_rules_create",
        "description": "Create a slotting rule in a warehouse (appended last in the cascade). mode is fixed (one pinned home) or dynamic (the ruled zone/type, ranked at putaway). Target references must belong to the warehouse; a rule with no condition is a catch-all default rule.\n\n**Operation id:** `slotting_rules_create` — the same operation is `app.slotting.rules_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "itemSku",
                            "itemProductType",
                            "itemVendor",
                            "itemDangerousGoods",
                            "unitWeight",
                            "largestDimension",
                            "abcClass"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "description": "The item's facts: itemSku, itemProductType, itemVendor (a blank is a known blank: `empty` holds, `eq` never), itemDangerousGoods (`eq yes` / `eq no`), unitWeight (grams), largestDimension (mm), abcClass (A, B, C). A weight, size or class the item does not have is unknown and matches no rule. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                  },
                  "matchAll": {
                    "type": "boolean",
                    "description": "true: every condition must hold; false: any one."
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "zoneId": {
                        "description": "document id of the target zone.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "locationTypeId": {
                        "description": "document id of the location type.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "homeLocationId": {
                        "description": "document id of a fixed home bin.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "description": "Where a matched SKU is directed; each field independently optional."
                  },
                  "enabled": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "name",
                  "conditions",
                  "matchAll",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/slotting/rules/delete": {
      "post": {
        "operationId": "slotting_rules_delete",
        "summary": "slotting_rules_delete",
        "description": "Soft-delete a slotting rule.\n\n**Operation id:** `slotting_rules_delete` — the same operation is `app.slotting.rules_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A slottingRules id, e.g. \"slottingRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/slotting/rules/reorder": {
      "post": {
        "operationId": "slotting_rules_reorder",
        "summary": "slotting_rules_reorder",
        "description": "Move a slotting rule one slot up or down its warehouse cascade by swapping positions (lower position is evaluated first).\n\n**Operation id:** `slotting_rules_reorder` — the same operation is `app.slotting.rules_reorder({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_reorder`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "description": "A slottingRules id, e.g. \"slottingRules_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "ruleId",
                  "direction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/slotting/rules/test": {
      "get": {
        "operationId": "slotting_rules_test",
        "summary": "slotting_rules_test",
        "description": "Test a warehouse's slotting rules on one item, applying nothing (B-RUL-1): the placement putaway would use (the first matching rule's zone, location type and home; a per-SKU home beats a rule's home) and every rule's conditions with their verdicts (pass, fail, unknown).\n\n**Operation id:** `slotting_rules_test` — the same operation is `app.slotting.rules_test({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_test`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the item (variant).",
            "schema": {
              "type": "string",
              "description": "document id of the item (variant).",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "document id of the warehouse.",
            "schema": {
              "type": "string",
              "description": "document id of the warehouse.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/slotting/rules/update": {
      "post": {
        "operationId": "slotting_rules_update",
        "summary": "slotting_rules_update",
        "description": "Update a slotting rule: name, enabled, conditions, matchAll or target (re-validated against the warehouse). Only the fields you pass change; naming none is refused.\n\n**Operation id:** `slotting_rules_update` — the same operation is `app.slotting.rules_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/slotting_rules_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "slotting"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "conditions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "itemSku",
                            "itemProductType",
                            "itemVendor",
                            "itemDangerousGoods",
                            "unitWeight",
                            "largestDimension",
                            "abcClass"
                          ]
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "contains",
                            "gt",
                            "lt",
                            "in",
                            "nin",
                            "gte",
                            "lte",
                            "all",
                            "starts_with",
                            "empty",
                            "not_empty",
                            "between"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "op",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "description": "The item's facts: itemSku, itemProductType, itemVendor (a blank is a known blank: `empty` holds, `eq` never), itemDangerousGoods (`eq yes` / `eq no`), unitWeight (grams), largestDimension (mm), abcClass (A, B, C). A weight, size or class the item does not have is unknown and matches no rule. Ops by field: `in` any of a comma list, `nin` none of it, `all` has all of it (a set) or every line is one of it (sku, productVendor, productType; false on an order with no line), `starts_with`, `empty` / `not_empty`, `gte` / `lte` and `between` (`<min>..<max>`, either bound blank, at least one written) on numbers. A field takes the ops its kind offers; the write names a refused one. A fact the order cannot tell (a line's product not synced yet, an address Shopify withholds) skips the rule, never guesses. `destinationPostcodePrefix` takes ONE country and its prefixes as `GB:HS,IV,KW,ZE` under `in` / `nin` / `empty` (`nin` holds for other countries too); its value is never shown in a run log or a preview."
                  },
                  "matchAll": {
                    "type": "boolean"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "zoneId": {
                        "description": "document id of the target zone.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "locationTypeId": {
                        "description": "document id of the location type.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "homeLocationId": {
                        "description": "document id of a fixed home bin.",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "floormode-id",
                            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "description": "Where a matched SKU is directed; each field independently optional."
                  }
                },
                "required": [
                  "ruleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/station-supplies": {
      "get": {
        "operationId": "station_supplies_list",
        "summary": "station_supplies_list",
        "description": "List a station's supply faces, or every face of a warehouse, or named faces (pass exactly one of stationId / warehouseId / stationSupplyIds, a supply-card sheet's worth), in material order, paged by cursor (no cap per station). A face is the bin a station of any kind takes one material from, with that station's own minQty / maxQty in the material's base unit (0 / 0 = take from here, never refill). Each row names its bin and material, onHand / available on the face, the bin's effective policy (the most demanding station's: min = the highest minQty, max = the highest maxQty of every station sharing the bin), sharedWith (the other stations on that bin, by code) and state (ok, below_min, refill_open, refill_blocked, inert; inert = the station is switched off or the bin archived / blocked, see binProblem; refill_open = a refill task for the bin and material is open; the state is the bin and material's, so stations sharing a bin read one).\n\n**Operation id:** `station_supplies_list` — the same operation is `app.station.supplies_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "document id of the station.",
            "schema": {
              "description": "document id of the station.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationSupplyIds",
            "in": "query",
            "required": false,
            "description": "document ids of station supply faces. Repeat `stationSupplyIds` for each value (`?stationSupplyIds=stationSupplies_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?stationSupplyIds=[\"stationSupplies_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "stationSupplies_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "description": "document ids of station supply faces.",
              "minItems": 1,
              "maxItems": 90,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A stationSupplies id, e.g. \"stationSupplies_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "the previous page's cursor.",
            "schema": {
              "description": "the previous page's cursor.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "station_supplies_set",
        "summary": "station_supplies_set",
        "description": "Create or update a station's supply face for one material (one face per material per station): the bin the station takes it from and the station's own minQty / maxQty, whole units in the material's base unit — either both 0 (take from here, never refill) or 0 < minQty <= maxQty. Any station kind; the station must be active. The bin is a storage bin of the station's warehouse (not a container, system location or archived bin) and not the material's home location; the material is an active Floormode material that is not lot or serial tracked, in any unit. Several stations may share a bin, each keeping its own policy; the answer names the others (sharedWith) and the bin's effective policy. Refusals are typed in details.code (station_inactive, not_a_bin, system_bin, bin_archived, bin_is_home, material_ineligible, other_warehouse).\n\n**Operation id:** `station_supplies_set` — the same operation is `app.station.supplies_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationId": {
                    "type": "string",
                    "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "variantId": {
                    "type": "string",
                    "description": "document id of the material (a Floormode item).",
                    "format": "floormode-id"
                  },
                  "binId": {
                    "type": "string",
                    "description": "document id of the supply bin.",
                    "format": "floormode-id"
                  },
                  "minQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "maxQty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "stationId",
                  "variantId",
                  "binId",
                  "minQty",
                  "maxQty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/station-supplies/empty": {
      "post": {
        "operationId": "station_supplies_signal_empty",
        "summary": "station_supplies_signal_empty",
        "description": "Say a station supply face is empty (a kanban 'empty' signal): writes its refill at once — a replenish task for the bin's effective max (case-rounded, capped by the bin's room and the storage source), at an urgent priority — or answers why not as outcome (requested, already_open, not_needed, unrefillable, face_full, take_only, inert; already_open = a refill for the bin and material is open, nothing written, an open routine one is raised to urgent once; unrefillable = none in storage, one alert; face_full = no room in the bin; take_only = the face is 0 / 0; inert = the station is off or the bin archived / blocked, see inertBecause). systemAvailable is what Floormode still records there. Pass a requestKey to replay a lost answer.\n\n**Operation id:** `station_supplies_signal_empty` — the same operation is `app.station.supplies_signal_empty({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_signal_empty`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationSupplyId": {
                    "type": "string",
                    "description": "document id of the station supply face.",
                    "format": "floormode-id"
                  },
                  "requestKey": {
                    "description": "one key per signal, kept across retries.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "stationSupplyId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/station-supplies/empty/undo": {
      "post": {
        "operationId": "station_supplies_signal_undo",
        "summary": "station_supplies_signal_undo",
        "description": "Undo one's own 'it's empty' signal: cancels the refill task it wrote while nobody has claimed it. Refused (details.code) refill_started once claimed, not_yours for a refill another person's signal or a pack's take wrote.\n\n**Operation id:** `station_supplies_signal_undo` — the same operation is `app.station.supplies_signal_undo({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_signal_undo`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "document id of the refill task.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/station-supplies/material": {
      "get": {
        "operationId": "station_supplies_material",
        "summary": "station_supplies_material",
        "description": "A material as a station supply sees it: its title, its working unit (min / max are in its base unit, shown in this one) and why it cannot be a supply (material_gone, not_floormode, archived, tracked), or null when it can. Null for an unknown item.\n\n**Operation id:** `station_supplies_material` — the same operation is `app.station.supplies_material({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_material`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the material.",
            "schema": {
              "type": "string",
              "description": "document id of the material.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/station-supplies/remove": {
      "post": {
        "operationId": "station_supplies_remove",
        "summary": "station_supplies_remove",
        "description": "Remove one station supply face, also of a switched-off station. Stock in the bin and an open refill task for it stay.\n\n**Operation id:** `station_supplies_remove` — the same operation is `app.station.supplies_remove({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/station_supplies_remove`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "station-supplies"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationSupplyId": {
                    "type": "string",
                    "description": "A stationSupplies id, e.g. \"stationSupplies_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "stationSupplyId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stations": {
      "get": {
        "operationId": "stations_list",
        "summary": "stations_list",
        "description": "List a warehouse's stations (max 200): the routing depots + fixed work points. Each has a kind (pack, receive, qc, count, ship, production, returns, dock), code, name, optional travel coordinates (x/y/z) and its active flag. Filter by warehouse and/or kind; inactive hidden unless includeInactive.\n\n**Operation id:** `stations_list` — the same operation is `app.stations.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pack",
                "receive",
                "qc",
                "count",
                "ship",
                "production",
                "returns",
                "dock"
              ]
            }
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "description": "Several kinds at once, e.g. receive and dock (a receipt's place). Repeat `kinds` for each value (`?kinds=pack&kinds=receive`), or pass a JSON array (`?kinds=[\"pack\",\"receive\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "pack",
              "receive"
            ],
            "schema": {
              "description": "Several kinds at once, e.g. receive and dock (a receipt's place).",
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pack",
                  "receive",
                  "qc",
                  "count",
                  "ship",
                  "production",
                  "returns",
                  "dock"
                ]
              }
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "stations_create",
        "summary": "stations_create",
        "description": "Create a station in a warehouse. kind is pack/receive/qc/count/ship/production/returns/dock; the code is uppercased and must be unique in the warehouse; name defaults to the code. The optional travel coordinates x/y/z are the routing depot — a pack station's coords feed the pick tour's end, a receiving station's feed putaway's start.\n\n**Operation id:** `stations_create` — the same operation is `app.stations.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "pack",
                      "receive",
                      "qc",
                      "count",
                      "ship",
                      "production",
                      "returns",
                      "dock"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "x": {
                    "type": "number"
                  },
                  "y": {
                    "type": "number"
                  },
                  "z": {
                    "type": "number"
                  },
                  "active": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  },
                  "direction": {
                    "description": "A dock door's direction: inbound (default) or both. Only a door takes one.",
                    "type": "string",
                    "enum": [
                      "inbound",
                      "both"
                    ]
                  },
                  "binCode": {
                    "description": "A dock door's bin code; the door's code when omitted. Only a door takes one.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  }
                },
                "required": [
                  "warehouseId",
                  "kind",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stations/assemblified-workstation": {
      "post": {
        "operationId": "stations_set_assemblified_workstation",
        "summary": "stations_set_assemblified_workstation",
        "description": "Map an active production station to an explicit Assemblified workstation ID. One mapping per warehouse, with compare-and-set protection.\n\n**Operation id:** `stations_set_assemblified_workstation` — the same operation is `app.stations.set_assemblified_workstation({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_set_assemblified_workstation`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationId": {
                    "type": "string",
                    "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "workstationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedWorkstationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "stationId",
                  "workstationId",
                  "expectedWorkstationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stations/delete": {
      "post": {
        "operationId": "stations_delete",
        "summary": "stations_delete",
        "description": "Delete a station. Every reference is cleared first (bounded): zones defaulting to it, worker profiles homed at it, tasks pinned to it, a receipt's receiving station and a pick batch's destination station — an in-flight batch's final leg then resolves as unplaced. The station's timeline records how many of each were cleared. Pack history keeps its parcels, photos and packing details with the station cleared, and the station's device health is removed with it.\n\n**Operation id:** `stations_delete` — the same operation is `app.stations.delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationId": {
                    "type": "string",
                    "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "stationId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stations/devices": {
      "get": {
        "operationId": "stations_devices_list",
        "summary": "stations_devices_list",
        "description": "List the active stations of every kind (max 200) with their device profile (label printer, document printer and its paper, scale, camera — the slots the station's kind offers; null = every step is manual), the health each device slot last reported (ready/problem/unknown, when, the floor device that reported it) and each printer's cached PrintNode state. Filter by warehouse or kind. No work figures per station.\n\n**Operation id:** `stations_devices_list` — the same operation is `app.stations.devices_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_devices_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Only stations of this kind.",
            "schema": {
              "description": "Only stations of this kind.",
              "type": "string",
              "enum": [
                "pack",
                "receive",
                "qc",
                "count",
                "ship",
                "production",
                "returns",
                "dock"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "stations_set_devices",
        "summary": "stations_set_devices",
        "description": "Replace a station's device profile: printer (the label printer, a PrintNode printer discovered under Carriers & packaging), documentPrinter (an A4 / Letter PrintNode printer for packing slips, customs papers and manifests, with its paper or null for the warehouse's), scale (a USB scale read in the PC's browser, or a discovered PrintNode scale), camera (the device's own). null clears it. A station names only the slots its kind offers (pack: all four; receive and qc: printer, scale, camera; count: printer, scale; ship: document printer, printer, scale; production: printer) — any other is refused (invalid_input, slot_not_offered). Pass the devicesRevision you read — a newer one is refused (conflict, revision_mismatch).\n\n**Operation id:** `stations_set_devices` — the same operation is `app.stations.set_devices({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_set_devices`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationId": {
                    "type": "string",
                    "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "devices": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "printer": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "driver": {
                                    "type": "string",
                                    "const": "printnode"
                                  },
                                  "providerPrinterId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64,
                                    "format": "floormode-id",
                                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                  },
                                  "computerId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "format": "floormode-id",
                                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  }
                                },
                                "required": [
                                  "driver",
                                  "providerPrinterId",
                                  "computerId",
                                  "label"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The label printer."
                          },
                          "documentPrinter": {
                            "description": "The A4 / Letter printer for packing slips, customs papers and manifests.",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "driver": {
                                    "type": "string",
                                    "const": "printnode"
                                  },
                                  "providerPrinterId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64,
                                    "format": "floormode-id",
                                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                  },
                                  "computerId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "format": "floormode-id",
                                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "sheet": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "a4",
                                          "letter"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The paper it holds; null: the warehouse's (Letter in the US, else A4)."
                                  }
                                },
                                "required": [
                                  "driver",
                                  "providerPrinterId",
                                  "computerId",
                                  "label",
                                  "sheet"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scale": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "driver": {
                                        "type": "string",
                                        "const": "browser_hid"
                                      }
                                    },
                                    "required": [
                                      "driver"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "driver": {
                                        "type": "string",
                                        "const": "printnode"
                                      },
                                      "computerId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "format": "floormode-id",
                                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                      },
                                      "deviceName": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "deviceNum": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 80
                                      }
                                    },
                                    "required": [
                                      "driver",
                                      "computerId",
                                      "deviceName",
                                      "deviceNum",
                                      "label"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "camera": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "driver": {
                                    "type": "string",
                                    "const": "browser"
                                  }
                                },
                                "required": [
                                  "driver"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scaleTestedAtMs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "printer",
                          "scale",
                          "camera",
                          "scaleTestedAtMs"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The station's devicesRevision the form was read at; a newer one is refused."
                  }
                },
                "required": [
                  "stationId",
                  "devices",
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stations/get": {
      "get": {
        "operationId": "stations_get",
        "summary": "stations_get",
        "description": "Get one station by document id, or null when unknown.\n\n**Operation id:** `stations_get` — the same operation is `app.stations.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stationId",
            "in": "query",
            "required": true,
            "description": "document id of the station.",
            "schema": {
              "type": "string",
              "description": "document id of the station.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stations/update": {
      "post": {
        "operationId": "stations_update",
        "summary": "stations_update",
        "description": "Update a station: kind, code (re-uppercased, must stay unique), name, the travel coordinates x/y/z (null clears a coordinate) and the active flag. Only the fields you pass change. A kind change is refused while a device is bound to a slot the new kind does not offer (conflict, incompatible_devices, naming the slots): remove it with stations_set_devices first.\n\n**Operation id:** `stations_update` — the same operation is `app.stations.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stations_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stations"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stationId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "pack",
                      "receive",
                      "qc",
                      "count",
                      "ship",
                      "production",
                      "returns",
                      "dock"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "x": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "y": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "z": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "inbound",
                      "both"
                    ]
                  },
                  "binCode": {
                    "description": "The bin code a station that becomes a dock door mints its bin under.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  }
                },
                "required": [
                  "stationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes": {
      "get": {
        "operationId": "stocktakes_list",
        "summary": "stocktakes_list",
        "description": "List the newest 20 stocktakes of one warehouse, or of every warehouse you can see. A counting stocktake's `progress` says its locations on sheets (`bins`) and those counted on sheets not cancelled (`binsCounted`); null in any other status.\n\n**Operation id:** `stocktakes_list` — the same operation is `app.stocktakes.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "stocktakes_create",
        "summary": "stocktakes_create",
        "description": "Start a stocktake (physical inventory) of one warehouse on `countDate` (YYYY-MM-DD, the warehouse's calendar day; at most a year ahead). Every location that holds stock or can hold it goes on count sheets of up to 200 locations, by group (shelves, reserve, held stock, goods in flow) and zone along the pick route; each sheet is an ordinary count (`blind` by default). With `observedSince` (YYYY-MM-DD, on or before `countDate`, at most a year before it) only the locations NOT counted since that day go on sheets: a location an approved count counted in full (every item, or confirmed empty) between that day and the count date's end is covered by it (preview: stocktakes_coverage; the counts themselves: counts_year_page). The sheets are cut in the background: `status` is `preparing` until they are ready (`stocktakes_get`). Calling it again while that warehouse's stocktake is still preparing asks for the cut again and answers it. Refusals (`details.code`): \"stocktake_open\" (one counting already, named), \"stocktake_empty\".\n\n**Operation id:** `stocktakes_create` — the same operation is `app.stocktakes.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "countDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "blind": {
                    "type": "boolean"
                  },
                  "observedSince": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "countDate"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/add-sheets": {
      "post": {
        "operationId": "stocktakes_add_sheets",
        "summary": "stocktakes_add_sheets",
        "description": "Put locations that are on no sheet of a counting stocktake on new count sheets of it (at most two hundred a call, from stocktakes_not_on_sheet), cut by group and zone in pick-route order like its first sheets. A location already on one of its sheets is skipped (`skipped`), and one call cuts at most 10 sheets and 1,000 lines (`left`: call again). Answers `refused` with `stocktake_sheet_cap` when the stocktake already holds 2,000 sheets. Refusals (`details.code`): \"stocktake_preparing\", \"stocktake_closed\", \"stocktake_location\" (a location of another warehouse, archived, or not countable).\n\n**Operation id:** `stocktakes_add_sheets` — the same operation is `app.stocktakes.add_sheets({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_add_sheets`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stocktakeId": {
                    "type": "string",
                    "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "binIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  }
                },
                "required": [
                  "stocktakeId",
                  "binIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/approve-clean": {
      "post": {
        "operationId": "stocktakes_approve_clean",
        "summary": "stocktakes_approve_clean",
        "description": "Approve the sheets of a stocktake that are in review and show no difference: each sheet's approval preview (the expectation brought forward to now, which counts_approve books against) is taken, and a sheet with no difference and nothing to recount is approved exactly as counts_approve approves it. A sheet with a difference stays in review (`needReview`) for its own counts_approve. One call examines at most 5,000 lines and a hundred sheets; `left` sheets remain after `cursor`: call again with it. Send a `requestKey`: a retry answers the first call's result. Answers `refused` with `stocktake_closed` on a signed-off or cancelled stocktake.\n\n**Operation id:** `stocktakes_approve_clean` — the same operation is `app.stocktakes.approve_clean({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_approve_clean`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stocktakeId": {
                    "type": "string",
                    "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Caller-minted key, one per logical request and kept across retries: the same key with the same arguments replays the first answer; with other arguments it is refused."
                  }
                },
                "required": [
                  "stocktakeId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/cancel": {
      "post": {
        "operationId": "stocktakes_cancel",
        "summary": "stocktakes_cancel",
        "description": "Cancel a stocktake. Its sheets not approved yet are cancelled with your `note` as their reason (two hundred at once, the rest in the background: `more`); approved sheets stay approved, their corrections are booked. Refused while a sheet is booking its approval (`details.code: \"stocktake_approving\"`).\n\n**Operation id:** `stocktakes_cancel` — the same operation is `app.stocktakes.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stocktakeId": {
                    "type": "string",
                    "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "stocktakeId",
                  "note"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/check-again": {
      "post": {
        "operationId": "stocktakes_check_again",
        "summary": "stocktakes_check_again",
        "description": "Count again the locations of a counting stocktake that are on no sheet (added since the cut, or past a cut that stopped at 2,000 sheets). It runs in the background; `stocktakes_get` shows the new count when it ends.\n\n**Operation id:** `stocktakes_check_again` — the same operation is `app.stocktakes.check_again({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_check_again`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stocktakeId": {
                    "type": "string",
                    "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "stocktakeId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/coverage": {
      "get": {
        "operationId": "stocktakes_coverage",
        "summary": "stocktakes_coverage",
        "description": "How many countable locations of a warehouse an approved count counted in full (every item counted, or confirmed empty) between `observedSince` and the end of `countDate`: the locations a stocktakes_create with `observedSince` leaves off its sheets. Reads at most 5,000 locations of the pick route; `capped` means the numbers are a floor. Refuses the date pairs stocktakes_create refuses.\n\n**Operation id:** `stocktakes_coverage` — the same operation is `app.stocktakes.coverage({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_coverage`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "observedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "countDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stocktakes/document-head": {
      "get": {
        "operationId": "stocktakes_document_head",
        "summary": "stocktakes_document_head",
        "description": "Read what a stocktake's documents print in their header: the store's name, the warehouse's name, its Shopify location's name and postal address (null when it maps none) and the warehouse's time zone and country, which its dates are written in.\n\n**Operation id:** `stocktakes_document_head` — the same operation is `app.stocktakes.document_head({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_document_head`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stocktakeId",
            "in": "query",
            "required": true,
            "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stocktakes/get": {
      "get": {
        "operationId": "stocktakes_get",
        "summary": "stocktakes_get",
        "description": "Get one stocktake: its row (count date, status, sheets, locations on its sheets, the last count of locations on no sheet with when it ran, sign-off or cancel), its progress from the sheets (sheets by status, locations done, lines counted, differences), how its preparation stands (`preparation`: running, or parked with the error) and a page of its sheets by number (`cursor` for the next).\n\n**Operation id:** `stocktakes_get` — the same operation is `app.stocktakes.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stocktakeId",
            "in": "query",
            "required": true,
            "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stocktakes/not-on-sheet": {
      "get": {
        "operationId": "stocktakes_not_on_sheet",
        "summary": "stocktakes_not_on_sheet",
        "description": "List the countable locations of a stocktake's warehouse that are on no sheet, in pick-route order: up to 50 a page (`cursor` for the next). Put them on new sheets of the stocktake with stocktakes_add_sheets.\n\n**Operation id:** `stocktakes_not_on_sheet` — the same operation is `app.stocktakes.not_on_sheet({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_not_on_sheet`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stocktakeId",
            "in": "query",
            "required": true,
            "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stocktakes/report": {
      "get": {
        "operationId": "stocktakes_report_page",
        "summary": "stocktakes_report_page",
        "description": "Read a stocktake's report, one sheet a page (`cursor` for the next): the sheet (group, zone, status, assignee, approved or cancelled by whom, when and why), every location on it (code as cut and now; counted, confirmed empty by whom and when, or not visited) and every line (item, lot, expected at the cut, expected when counted, counted, by whom and when, and the difference the approval booked). Every quantity is what was observed at its count time.\n\n**Operation id:** `stocktakes_report_page` — the same operation is `app.stocktakes.report_page({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_report_page`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stocktakeId",
            "in": "query",
            "required": true,
            "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stocktakes/season": {
      "get": {
        "operationId": "stocktakes_season",
        "summary": "stocktakes_season",
        "description": "Read the year-end stocktake season: inside the 30 days before and 31 days after the home store country's usual financial year end (30 June in Australia, 31 March in New Zealand and India, 31 December elsewhere), by each warehouse's own day, the year end and the active warehouses with no stocktake dated in the season. `season` is null outside it; `dismissed` when \"Not this year\" was chosen for that year end (`dismissedFor`, set with stocktakes_season_set).\n\n**Operation id:** `stocktakes_season` — the same operation is `app.stocktakes.season({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_season`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "stocktakes_season_set",
        "summary": "stocktakes_season_set",
        "description": "Put the Home card suggesting a year-end stocktake away for one year end (`dismissedFor`: the year end as YYYY-MM-DD, from stocktakes_season), or show it again (`null`). It comes back by itself at the next year end.\n\n**Operation id:** `stocktakes_season_set` — the same operation is `app.stocktakes.season_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_season_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dismissedFor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "dismissedFor"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/sign-off": {
      "post": {
        "operationId": "stocktakes_sign_off",
        "summary": "stocktakes_sign_off",
        "description": "Sign a stocktake off once every sheet is approved or cancelled. Its totals are frozen: sheets, locations counted and not counted (never zero), lines, the differences the approvals booked, and the last count of locations on no sheet. Refusals (`details.code`): \"stocktake_preparing\", \"stocktake_unfinished\" (how many sheets, and the first).\n\n**Operation id:** `stocktakes_sign_off` — the same operation is `app.stocktakes.sign_off({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_sign_off`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stocktakeId": {
                    "type": "string",
                    "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "stocktakeId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/stocktakes/sign-off-preview": {
      "get": {
        "operationId": "stocktakes_sign_off_preview",
        "summary": "stocktakes_sign_off_preview",
        "description": "What signing off a stocktake now would freeze: sheets approved and cancelled, locations counted and not, lines and differences (the bookings of approvals that stopped included), and the locations on no sheet. `totals` is null until every sheet is approved or cancelled and the locations on no sheet are counted. stocktakes_sign_off keeps exactly these numbers.\n\n**Operation id:** `stocktakes_sign_off_preview` — the same operation is `app.stocktakes.sign_off_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stocktakes_sign_off_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stocktakes"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "stocktakeId",
            "in": "query",
            "required": true,
            "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A stocktakes id, e.g. \"stocktakes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/store/facts": {
      "get": {
        "operationId": "store_facts_get",
        "summary": "store_facts_get",
        "description": "The home store's facts as Shopify states them: time zone, unit system, weight unit and country (each null until read). Set a warehouse's zone and units from them when setting a store up (warehouses_update).\n\n**Operation id:** `store_facts_get` — the same operation is `app.store.facts_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/store_facts_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "store"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores": {
      "get": {
        "operationId": "stores_list",
        "summary": "stores_list",
        "description": "The account's Shopify stores, home first: each store's id (the store reference lists and filters use — never its domain), its name, its badge colour index, its state (live, or leaving once it uninstalled) and whether it is the home store. One row for an account with one store.\n\n**Operation id:** `stores_list` — the same operation is `app.stores.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/overview": {
      "get": {
        "operationId": "stores_overview",
        "summary": "stores_overview",
        "description": "Settings › Stores: every store of the account, home first, with what its row says — its state (live or leaving), whether Floormode updates its stock numbers yet (`started`; the home store always), when it joined and who joined it (`joinedBy`: the name the join recorded, their person once they opened Floormode through it, and whether that person still needs a role), its own plan, and — once the account has two stores — whether its stock numbers drift from Floormode's at any warehouse (`drift`; they are compared every night). `connectBlock` names why another store cannot be connected now (ten stores, or a store still leaving). Needs stores.manage.\n\n**Operation id:** `stores_overview` — the same operation is `app.stores.overview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_overview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}": {
      "get": {
        "operationId": "stores_get",
        "summary": "stores_get",
        "description": "One store's page: the same facts as its `stores_overview` row, plus the main store's name and the account's plan, which sets every store's features and order allowance (a joined store's own plan only releases its new orders), what its open orders do if it leaves (`onLeave`: hold their stock for 14 days, or put it back at once) and, once it left, `leaving`: when it left, when its hold ends, the whole days left until then and how many orders still hold stock (counted up to five hundred, `heldCapped`). Needs stores.manage.\n\n**Operation id:** `stores_get` — the same operation is `app.stores.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}/drift": {
      "get": {
        "operationId": "stores_drift_get",
        "summary": "stores_drift_get",
        "description": "A store's stock-number drift at up to eight warehouses (`warehouseIds`, multi-store), `results` one per warehouse in the order asked: the open episode — how many items its Shopify shows differently from Floormode, up to three examples (the item, Shopify's number and Floormode's), every drifted product id (two hundred at most) and whether more drifted — and the warehouse's bins that hold those items, which a count (`counts_create`) covers. `episode` is null while none is open, and always for an account with one store. Needs stores.manage.\n\n**Operation id:** `stores_drift_get` — the same operation is `app.stores.drift_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_drift_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseIds",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `warehouseIds` for each value (`?warehouseIds=warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?warehouseIds=[\"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}/held-orders": {
      "get": {
        "operationId": "stores_held_orders",
        "summary": "stores_held_orders",
        "description": "A store that left the account (multi-store): its open orders that still hold stock for their customer, 25 a page — each with its name, when it was placed, the units its reservations hold and where they are (`packed` with its pack job, `picking`, or `shelf`). They stay workable until the hold ends. Empty for a store that is still connected. Needs stores.manage.\n\n**Operation id:** `stores_held_orders` — the same operation is `app.stores.held_orders({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_held_orders`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}/link-suggestions": {
      "get": {
        "operationId": "item_links_suggestions",
        "summary": "item_links_suggestions",
        "description": "Product links (multi-store): what the matcher made of a joined store's unlinked products, one class a page at a time — matched (one product of another store answers to its SKU or barcode), check (a candidate to decide on, with the reason) or unmatched — each with the product it would link to, and the exact count of every class. Needs stores.manage.\n\n**Operation id:** `item_links_suggestions` — the same operation is `app.item.links_suggestions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/item_links_suggestions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores (catalog)"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "class",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "matched",
                "check",
                "unmatched"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}/links": {
      "get": {
        "operationId": "item_links_list",
        "summary": "item_links_list",
        "description": "Product links (multi-store): a store's linked products, newest first — each with the product of another store that holds its stock, when it was linked and who linked it (null when Floormode linked an exact new match). `source: auto` lists Floormode's links alone. Needs stores.manage.\n\n**Operation id:** `item_links_list` — the same operation is `app.item.links_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/item_links_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores (catalog)"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "auto",
                "all"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/stores/{storeId}/start-preview": {
      "get": {
        "operationId": "stores_start_preview",
        "summary": "stores_start_preview",
        "description": "A joined store's start preview (multi-store): what pressing Start would write to its Shopify — how many of its products' numbers stay, go down, go up and go to 0, how many are left alone, the up to one hundred biggest changes (those going to 0 first, each with its warehouse, the store's number now and after), whether the preview still holds (`fresh`: no link, bring-in or location changed since), the products brought in on their own stock, and the stock update running now. Needs stores.manage.\n\n**Operation id:** `stores_start_preview` — the same operation is `app.stores.start_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/stores_start_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "stores"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sync/catch-up": {
      "post": {
        "operationId": "sync_catchUpNow",
        "summary": "sync_catchUpNow",
        "description": "Catch up with Shopify now: re-read the orders, products, stock and native transfers that changed since the last nightly catch-up, for every store of the account, and apply what moved. It runs in the background a moment after the call; requests within five minutes are one catch-up. Floormode also catches up every night by itself.\n\n**Operation id:** `sync_catchUpNow` — the same operation is `app.sync.catchUpNow({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sync_catchUpNow`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sync/import": {
      "post": {
        "operationId": "sync_import_start",
        "summary": "sync_import_start",
        "description": "Run the store import again (products, locations, stock levels and orders from Shopify). An import whose page stalled is continued (healed: true) rather than restarted; one that stopped moving or failed is replaced by a fresh one. An import still running is refused (conflict). The answer only means queued: read progress and the verdict with sync_job_get({ jobId }).\n\n**Operation id:** `sync_import_start` — the same operation is `app.sync.import_start({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sync_import_start`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sync/ingest/dead": {
      "get": {
        "operationId": "ingest_dead_list",
        "summary": "ingest_dead_list",
        "description": "Dead-lettered inbound deliveries, newest first: topic, resource, dedupe key, last error and whether a stored apply plan makes the row replayable. A disclosed page (`rows`/`capped`/`cursor`): pass the answered `cursor` for the next page (`before` = the last row's createdAt is the legacy continuation).\n\n**Operation id:** `ingest_dead_list` — the same operation is `app.ingest.dead_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/ingest_dead_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows per page (max 50).",
            "schema": {
              "default": 50,
              "description": "Rows per page (max 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Return rows created strictly before this epoch-ms stamp (legacy cursor).",
            "schema": {
              "description": "Return rows created strictly before this epoch-ms stamp (legacy cursor).",
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `cursor` the previous page answered with (keyset continuation).",
            "schema": {
              "description": "The `cursor` the previous page answered with (keyset continuation).",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sync/ingest/health": {
      "get": {
        "operationId": "ingest_health",
        "summary": "ingest_health",
        "description": "Inbound sync health (the ingest spine): exact counters per staged-delivery status (queued, processing, retrying, dead, applied/ignored in the last 24h), the oldest still-open delivery, the newest applied one and how many of the receipts the spine itself opened (source shopify_webhook, backfill_page or opening_page — never the carrier-tracking door's) failed in the last 24h. What the Settings → Apps & API inbound tiles render. Also returns the 25 oldest unresolved inventory-relevant receipts across all time, with exact delivery references and staged-queue linkage; capped is explicit. These use the same predicate that blocks inventory verification.\n\n**Operation id:** `ingest_health` — the same operation is `app.ingest.health({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/ingest_health`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sync/ingest/recover-source": {
      "post": {
        "operationId": "ingest_recoverSource",
        "summary": "ingest_recoverSource",
        "description": "Audited authoritative refetch of a bodyless dead Shopify reverse-fulfillment disposition or fulfillment-order hold delivery, including a failed Shopify receipt with no staged row. Select exactly one ingestId or failedReceiptId. Requires its verified resource GID and delivery evidence. Retains the original failure and dedupe key; only the ingest drain records the eventual apply outcome.\n\n**Operation id:** `ingest_recoverSource` — the same operation is `app.ingest.recoverSource({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/ingest_recoverSource`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ingestId": {
                    "type": "string",
                    "description": "A ingestQueue id, e.g. \"ingestQueue_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "failedReceiptId": {
                    "type": "string",
                    "description": "A webhookEvents id, e.g. \"webhookEvents_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "resourceId": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^gid:\\/\\/shopify\\/(?:ReverseFulfillmentOrder|FulfillmentOrder)\\/[1-9]\\d*$",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "evidenceReference": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "verifiedSource": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "resourceId",
                  "evidenceReference",
                  "verifiedSource"
                ],
                "oneOf": [
                  {
                    "required": [
                      "ingestId"
                    ]
                  },
                  {
                    "required": [
                      "failedReceiptId"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sync/ingest/replay": {
      "post": {
        "operationId": "ingest_replay",
        "summary": "ingest_replay",
        "description": "Manually redrive one dead inbound delivery: resets the row to queued with a fresh attempt budget and arms the drain. Refuses rows without a stored apply plan (those heal via Shopify's redelivery of the same webhook) and rows that are not dead.\n\n**Operation id:** `ingest_replay` — the same operation is `app.ingest.replay({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/ingest_replay`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ingestId": {
                    "type": "string",
                    "description": "document id of the dead ingest row.",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ingestId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/sync/jobs/get": {
      "get": {
        "operationId": "sync_job_get",
        "summary": "sync_job_get",
        "description": "One sync job by id — the row sync_import_start returns the id of. Status (running, done, failed), current phase/page and the applied counts; success is only ever this row saying done, never the accepted response that started the job. Returns null for an unknown id.\n\n**Operation id:** `sync_job_get` — the same operation is `app.sync.job_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sync_job_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "jobId",
            "in": "query",
            "required": true,
            "description": "document id of the sync job.",
            "schema": {
              "type": "string",
              "description": "document id of the sync job.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sync/jobs/latest": {
      "get": {
        "operationId": "sync_jobs_latest",
        "summary": "sync_jobs_latest",
        "description": "Progress of the newest sync job — the install backfill (PLT-002) or an opening-stock import: status (running, done, failed), the phase currently running and the applied counts. Returns null when the shop never ran one.\n\n**Operation id:** `sync_jobs_latest` — the same operation is `app.sync.jobs_latest({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sync_jobs_latest`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Job kind; defaults to backfill.",
            "schema": {
              "description": "Job kind; defaults to backfill.",
              "type": "string",
              "enum": [
                "backfill",
                "opening_import",
                "store_publication"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/sync/last-night": {
      "get": {
        "operationId": "sync_last_night",
        "summary": "sync_last_night",
        "description": "What the newest completed nightly catch-up brought up to date, summed over the account's stores: orders, fulfillments, stock levels and products Shopify had changed that Floormode did not hold yet, waiting updates it sent, and the checks Shopify refused or that did not finish. `night` is null when no night ran in the last week (a night runs only after a day with changes); `running` while tonight's catch-up is under way.\n\n**Operation id:** `sync_last_night` — the same operation is `app.sync.last_night({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/sync_last_night`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "sync"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks": {
      "get": {
        "operationId": "tasks_list",
        "summary": "tasks_list",
        "description": "List tasks a page at a time (`rows`/`capped`/`cursor`, max 100), oldest first (`created:asc`, the default) or newest first. Scope: EXACTLY ONE of `warehouseId`, `zoneId` (the zone's own tasks), `stationId` (the station's warehouse) or `assignedTo` (a worker's plate); none or two are refused. Filters are server predicates: `types` and `statuses` as sets (open = pending, claimed, assigned, inProgress; pending unassigned tasks are the claimable pool), `assignment` (`mine` = the caller's own, `unassigned` = nobody's), `floorOnly` (no pick task minted on an allocation), `returnToShelfOnly`, `binMovesOnly`. `openCount` is the scope's exact number of open tasks of the read's kind (`floorOnly`, `returnToShelfOnly`, `binMovesOnly`), every type without one, on every page. Breaking since 2026-10-07: the single-valued `type` / `status` and `openOnly` are refused; pass the sets.\n\n**Operation id:** `tasks_list` — the same operation is `app.tasks.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Only this warehouse's tasks.",
            "schema": {
              "description": "Only this warehouse's tasks.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "Only this zone's tasks; implies the zone's warehouse.",
            "schema": {
              "description": "Only this zone's tasks; implies the zone's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "stationId",
            "in": "query",
            "required": false,
            "description": "Narrows to the station's warehouse.",
            "schema": {
              "description": "Narrows to the station's warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "assignedTo",
            "in": "query",
            "required": false,
            "description": "One worker's plate (their user id); the one scope that needs no warehouse.",
            "schema": {
              "description": "One worker's plate (their user id); the one scope that needs no warehouse.",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Any of these task types; absent = every type. Repeat `types` for each value (`?types=receive&types=putaway`), or pass a JSON array (`?types=[\"receive\",\"putaway\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "receive",
              "putaway"
            ],
            "schema": {
              "description": "Any of these task types; absent = every type.",
              "minItems": 1,
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "receive",
                  "putaway",
                  "pick",
                  "pack",
                  "count",
                  "replenish",
                  "move"
                ]
              }
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of these statuses; absent = every status. The open set is pending, claimed, assigned, inProgress. Repeat `statuses` for each value (`?statuses=pending&statuses=claimed`), or pass a JSON array (`?statuses=[\"pending\",\"claimed\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "pending",
              "claimed"
            ],
            "schema": {
              "description": "Any of these statuses; absent = every status. The open set is pending, claimed, assigned, inProgress.",
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pending",
                  "claimed",
                  "assigned",
                  "inProgress",
                  "done",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "assignment",
            "in": "query",
            "required": false,
            "description": "`mine` = the caller's own tasks; `unassigned` = nobody's (the claimable pool).",
            "schema": {
              "description": "`mine` = the caller's own tasks; `unassigned` = nobody's (the claimable pool).",
              "type": "string",
              "enum": [
                "mine",
                "unassigned"
              ]
            }
          },
          {
            "name": "floorOnly",
            "in": "query",
            "required": false,
            "description": "Leave out the pick tasks that belong to the pick queue. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Leave out the pick tasks that belong to the pick queue.",
              "type": "boolean"
            }
          },
          {
            "name": "returnToShelfOnly",
            "in": "query",
            "required": false,
            "description": "Only cancelled-pick goods waiting for physical return to a bin. Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only cancelled-pick goods waiting for physical return to a bin.",
              "type": "boolean"
            }
          },
          {
            "name": "binMovesOnly",
            "in": "query",
            "required": false,
            "description": "Only tasks that move goods out of a named bin of the warehouse (put away, replenish, move, return to shelf). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Only tasks that move goods out of a named bin of the warehouse (put away, replenish, move, return to shelf).",
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:asc` (oldest first, the default) or `created:desc`.",
            "schema": {
              "description": "`created:asc` (oldest first, the default) or `created:desc`.",
              "type": "string",
              "enum": [
                "created:asc",
                "created:desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Tasks per page (max 100).",
            "schema": {
              "description": "Tasks per page (max 100).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/auto-assign-pick": {
      "post": {
        "operationId": "tasks_auto_assign_pick",
        "summary": "tasks_auto_assign_pick",
        "description": "Auto order→picker assignment (WHT-013): create the pick task for a pickable fulfillment order and push it to the least-loaded eligible worker (least_loaded default, or round_robin), or leave it in the pool when nobody is eligible. Idempotent — a live task for the same allocation is returned instead of a duplicate. Returns null when the FO is not pickable (not fully allocated / held / already in pick work).\n\n**Operation id:** `tasks_auto_assign_pick` — the same operation is `app.tasks.auto_assign_pick({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_auto_assign_pick`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "foDocId": {
                    "type": "string",
                    "description": "document id of the fulfillment order.",
                    "format": "floormode-id"
                  },
                  "strategy": {
                    "description": "Defaults to least_loaded.",
                    "type": "string",
                    "enum": [
                      "least_loaded",
                      "round_robin"
                    ]
                  }
                },
                "required": [
                  "foDocId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/cancel": {
      "post": {
        "operationId": "tasks_cancel",
        "summary": "tasks_cancel",
        "description": "Cancel a task (overlay closed without doing the work). Rejected once terminal.\n\n**Operation id:** `tasks_cancel` — the same operation is `app.tasks.cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/claim": {
      "post": {
        "operationId": "tasks_claim",
        "summary": "tasks_claim",
        "description": "A worker pulls the top eligible pending task from a warehouse's claimable pool (assignedTo null + status pending), scoped by the caller's worker profile (assigned zones + canDo + skills), ordered by priority then FIFO. Optionally restrict to one task type, or to one of the queue's lists (`work`: `orders` = pick tasks on an order, `floor` = every other task). Returns the claimed task, or null when nothing is eligible.\n\n**Operation id:** `tasks_claim` — the same operation is `app.tasks.claim({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_claim`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "receive",
                      "putaway",
                      "pick",
                      "pack",
                      "count",
                      "replenish",
                      "move"
                    ]
                  },
                  "types": {
                    "description": "Claim only one of these task types: the list's own type filter.",
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "receive",
                        "putaway",
                        "pick",
                        "pack",
                        "count",
                        "replenish",
                        "move"
                      ]
                    }
                  },
                  "work": {
                    "description": "Claim only from one of the queue's lists: `orders` (pick tasks on an order) or `floor` (every other task).",
                    "type": "string",
                    "enum": [
                      "orders",
                      "floor"
                    ]
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/complete": {
      "post": {
        "operationId": "tasks_complete",
        "summary": "tasks_complete",
        "description": "Complete a task: records completedAt and actualDuration (completedAt − startedAt, null when never started) for productivity. Returns the actualDuration.\n\n**Operation id:** `tasks_complete` — the same operation is `app.tasks.complete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_complete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/get": {
      "get": {
        "operationId": "tasks_get",
        "summary": "tasks_get",
        "description": "Get one task by document id, or null when unknown.\n\n**Operation id:** `tasks_get` — the same operation is `app.tasks.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "document id of the task.",
            "schema": {
              "type": "string",
              "description": "document id of the task.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/move": {
      "get": {
        "operationId": "tasks_move_get",
        "summary": "tasks_move_get",
        "description": "Get a putaway, replenish or move task as Floor Mode works it (take from → bring to): the source bin, the item, the lot it names (or the source's lots when it holds only lotted units), the planned destination, units planned, moved and left, unreserved units at the source, and the task's own movements. A return to shelf answers `{ variant: \"return\" }` (read it with tasks_return_to_shelf_get). Null for an unknown task or one with no bin move.\n\n**Operation id:** `tasks_move_get` — the same operation is `app.tasks.move_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_move_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "tasks_move",
        "summary": "tasks_move",
        "description": "Move a putaway, replenish or move task's goods from its source bin to a scanned shelf bin, in one stock movement. Requires the source, item and destination scans (and the lot where the task names one or the source holds only lotted units). Send either `scannedCode` or `variantId` (an item no code finds, named). A destination other than the task's planned bin is refused (`not_planned_bin`) unless `retarget` is true, and must be a sellable shelf bin. Partial moves leave the rest on the task; the task completes when every unit moved. Idempotency keys bind source, destination, item, lot and quantity. Never takes another order's reserved units. With `retarget`, `plannedBinFull: true` says the planned bin was full though the system shows room: that bin gets a count (`plannedBinCount`) unless the warehouse turned event counts off. A return to shelf uses tasks_return_to_shelf.\n\n**Operation id:** `tasks_move` — the same operation is `app.tasks.move({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_move`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "scannedFromBin": {
                    "type": "string",
                    "minLength": 1
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string",
                    "minLength": 1
                  },
                  "variantId": {
                    "description": "The item named instead of scanned (one with no usable code).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "scannedLotNumber": {
                    "type": "string"
                  },
                  "scannedToBin": {
                    "type": "string",
                    "minLength": 1
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "retarget": {
                    "description": "Move to the scanned bin although the task planned another.",
                    "type": "boolean"
                  },
                  "plannedBinFull": {
                    "description": "With retarget: the planned bin was full. It gets a count.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "taskId",
                  "scannedFromBin",
                  "scannedToBin",
                  "qty",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/move/scan": {
      "get": {
        "operationId": "tasks_move_scan",
        "summary": "tasks_move_scan",
        "description": "Resolve a source, item or destination label in a move task's warehouse. Recognizes the task's item even after catalog deletion; unrelated deleted items stay excluded.\n\n**Operation id:** `tasks_move_scan` — the same operation is `app.tasks.move_scan({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_move_scan`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/move/source-empty": {
      "post": {
        "operationId": "tasks_move_source_empty",
        "summary": "tasks_move_source_empty",
        "description": "A lead's \"Source bin is empty\" on a replenish or move task: the goods are not in the task's source bin. The bin is flagged as a problem and gets a count (unless the warehouse turned event counts off), and the task closes — done when some units already moved, cancelled when none did. A putaway off the receiving dock and a return to shelf are refused.\n\n**Operation id:** `tasks_move_source_empty` — the same operation is `app.tasks.move_source_empty({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_move_source_empty`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/move/suggest": {
      "get": {
        "operationId": "tasks_move_suggest",
        "summary": "tasks_move_suggest",
        "description": "The bin the warehouse's putaway strategy proposes for a move task's goods (never its source bin): `seed` is the booking key the caller will send, so a spread warehouse proposes the same bin for a retry; `excludeBinIds` skips bins the stock door refused.\n\n**Operation id:** `tasks_move_suggest` — the same operation is `app.tasks.move_suggest({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_move_suggest`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "excludeBinIds",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `excludeBinIds` for each value (`?excludeBinIds=bins_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?excludeBinIds=[\"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "bins_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/putaway-tour": {
      "get": {
        "operationId": "tasks_putaway_tour",
        "summary": "tasks_putaway_tour",
        "description": "A warehouse's open dock putaways as one tour (WMS BN-23): the receipt putaway tasks a dock flow owes that the caller may walk (nobody's, or their own), in pick-route order of each task's planned bin (a task with no planned bin last), with the planned bin's code and the units left. `afterTaskId` starts the route at that task's bin, wraps round to the bins before it and leaves the task out: what comes next after it. `zoneId` keeps only the stops in that zone (the task's own zone, else its planned bin's); when the scanned window holds none of them while more wait beyond it, the warehouse's stops answer with `widened: \"zone\"`. `fromStationId` (a dock door) walks only the putaways out of its bin, in pick order from the route's first stop, naming the door (`fromCode`); the door never widens to other doors. The route sorts a bounded scan of the oldest open putaways: `stops` counts the walkable ones in it, `stopsCapped` says the scan stopped at its bound (more open putaways wait), and `rows` is the route's first page: `capped` is true when `stops` exceeds that page OR `stopsCapped` is set, so it may be true with no further walkable stop; `cursor` is always null (the tour has one page). Book each with tasks_move.\n\n**Operation id:** `tasks_putaway_tour` — the same operation is `app.tasks.putaway_tour({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_putaway_tour`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "afterTaskId",
            "in": "query",
            "required": false,
            "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "fromStationId",
            "in": "query",
            "required": false,
            "description": "A dock door: only the putaways out of its bin, one seek (WMS W4a).",
            "schema": {
              "description": "A dock door: only the putaways out of its bin, one seek (WMS W4a).",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/return-to-shelf": {
      "get": {
        "operationId": "tasks_return_to_shelf_get",
        "summary": "tasks_return_to_shelf_get",
        "description": "Get a cancelled pick's physical return task, source bin, item, lot, remaining and unreserved quantities, and bounded putaway history. Null for unknown or non-return tasks. Goods stay in packing until the worker confirms a move.\n\n**Operation id:** `tasks_return_to_shelf_get` — the same operation is `app.tasks.return_to_shelf_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_return_to_shelf_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "tasks_return_to_shelf",
        "summary": "tasks_return_to_shelf",
        "description": "Confirm a physical return of cancelled-picked goods from packing to a scanned active sellable shelf bin. Requires source, item, destination and tracked-lot scans. Send either `scannedCode` or `variantId`: an item with no usable code (none of its barcode, alias barcodes or SKU resolves to it for this task) is named by its variant and must be the task's item, exactly as a scan of it; an item with a usable code is refused when named (send its code). Supports partial returns; task completes only when all units moved. Idempotency keys bind destination, item, lot and quantity. Never consumes another order's reserved stock. Generic task Complete and Cancel cannot discard this obligation.\n\n**Operation id:** `tasks_return_to_shelf` — the same operation is `app.tasks.return_to_shelf({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_return_to_shelf`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "scannedFromBin": {
                    "type": "string",
                    "minLength": 1
                  },
                  "scannedCode": {
                    "description": "Item barcode or sku.",
                    "type": "string",
                    "minLength": 1
                  },
                  "variantId": {
                    "description": "The item named instead of scanned (one with no usable code).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "scannedLotNumber": {
                    "type": "string"
                  },
                  "scannedToBin": {
                    "type": "string",
                    "minLength": 1
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "method": {
                    "description": "How the item was confirmed (scan, camera, typed, tap; desk for a desk caller). Omitted: scan with a code, tap without, desk for a desk caller. paper is refused.",
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for a tap where the warehouse confirms by scan only.",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "taskId",
                  "scannedFromBin",
                  "scannedToBin",
                  "qty",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tasks/return-to-shelf/scan": {
      "get": {
        "operationId": "tasks_return_to_shelf_scan",
        "summary": "tasks_return_to_shelf_scan",
        "description": "Resolve a source, item or destination label in a physical return task's warehouse. Recognizes its known stock item even after catalog deletion; unrelated deleted items stay excluded.\n\n**Operation id:** `tasks_return_to_shelf_scan` — the same operation is `app.tasks.return_to_shelf_scan({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_return_to_shelf_scan`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tasks/start": {
      "post": {
        "operationId": "tasks_start",
        "summary": "tasks_start",
        "description": "Mark a task in progress (stamps startedAt once). Rejected once done/cancelled.\n\n**Operation id:** `tasks_start` — the same operation is `app.tasks.start({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tasks_start`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tasks"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "A tasks id, e.g. \"tasks_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/tenant": {
      "get": {
        "operationId": "tenant_current",
        "summary": "tenant_current",
        "description": "Return the authenticated tenant identity (id, source, actor).\n\n**Operation id:** `tenant_current` — the same operation is `app.tenant.current({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/tenant_current`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tenant"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/trackers/get": {
      "get": {
        "operationId": "trackers_get",
        "summary": "trackers_get",
        "description": "Get the canonical tracker of one shipment: current status + statusDetail and the bounded checkpoint history. Returns null before the first tracking event.\n\n**Operation id:** `trackers_get` — the same operation is `app.trackers.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/trackers_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "trackers"
        ],
        "x-topic": "shipping",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "shipmentId",
            "in": "query",
            "required": true,
            "description": "document id of the shipment.",
            "schema": {
              "type": "string",
              "description": "document id of the shipment.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/tracking-brand/logo": {
      "get": {
        "operationId": "trackingBrand_logo_get",
        "summary": "trackingBrand_logo_get",
        "description": "Read the managed tracking logo's revision and dimensions without image bytes.\n\n**Operation id:** `trackingBrand_logo_get` — the same operation is `app.trackingBrand.logo_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/trackingBrand_logo_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "tracking-brand"
        ],
        "x-topic": "customers",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/user-prefs": {
      "get": {
        "operationId": "user_prefs_list",
        "summary": "user_prefs_list",
        "description": "List the calling user's preferences as a page (max 100; `capped` says more exist).\n\n**Operation id:** `user_prefs_list` — the same operation is `app.user.prefs_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/user_prefs_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "user-prefs"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "user_prefs_set",
        "summary": "user_prefs_set",
        "description": "Set one preference of the calling user; the value must be valid JSON.\n\n**Operation id:** `user_prefs_set` — the same operation is `app.user.prefs_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/user_prefs_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "user-prefs"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "valueJson": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "A JSON document, at most 4000 characters."
                  }
                },
                "required": [
                  "key",
                  "valueJson"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/user-prefs/batch": {
      "post": {
        "operationId": "user_prefs_set_many",
        "summary": "user_prefs_set_many",
        "description": "Set up to 10 preferences of the calling user in ONE transaction (each value must be valid JSON, each key at most once); answers every row as stored.\n\n**Operation id:** `user_prefs_set_many` — the same operation is `app.user.prefs_set_many({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/user_prefs_set_many`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "user-prefs"
        ],
        "x-topic": "account",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "valueJson": {
                          "type": "string",
                          "maxLength": 4000,
                          "description": "A JSON document, at most 4000 characters."
                        }
                      },
                      "required": [
                        "key",
                        "valueJson"
                      ]
                    }
                  }
                },
                "required": [
                  "entries"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/user-prefs/get": {
      "get": {
        "operationId": "user_prefs_get",
        "summary": "user_prefs_get",
        "description": "Read one preference of the calling user as a JSON string, or null. The user comes from the token — preferences of other users are not reachable.\n\n**Operation id:** `user_prefs_get` — the same operation is `app.user.prefs_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/user_prefs_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "user-prefs"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/values/suggest": {
      "get": {
        "operationId": "values_suggest",
        "summary": "values_suggest",
        "description": "Known values for a field, to suggest instead of guessing: `order_tag` = the tags on the newest 1000 orders, most recently used first; `product_type` = the types of the first 1000 live products by title, alphabetical; `order_priority` = the priorities the automation rules set, then those on the newest 1000 orders; `sku` = live items' SKUs in SKU order from `prefix`, 200 items at most. Up to 50 distinct values (case-insensitive), narrowed by `prefix`; `capped` = more may exist beyond the page or the window. Who reads a facet: `order_tag` orders.view or automation.manage; `product_type` inventory.view or automation.manage; `order_priority` orders.view or automation.manage or settings.manage or fulfillment.plan; `sku` inventory.view or automation.manage or settings.manage or fulfillment.plan; `order_source` orders.view or automation.manage; `box_group` inventory.view or settings.manage; `keep_apart_group` inventory.view; `order_attribute_key` settings.manage. Derived on every read, never stored.\n\n**Operation id:** `values_suggest` — the same operation is `app.values.suggest({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/values_suggest`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "values"
        ],
        "x-topic": "account",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "facet",
            "in": "query",
            "required": true,
            "description": "`order_tag` / `order_source` / `order_attribute_key`: the newest orders' tags / sources / field names. `product_type`: live products' types. `order_priority`: what rules set. `sku`: live items' SKUs; others: groups.",
            "schema": {
              "type": "string",
              "enum": [
                "order_tag",
                "product_type",
                "order_priority",
                "sku",
                "order_source",
                "box_group",
                "keep_apart_group",
                "order_attribute_key"
              ],
              "description": "`order_tag` / `order_source` / `order_attribute_key`: the newest orders' tags / sources / field names. `product_type`: live products' types. `order_priority`: what rules set. `sku`: live items' SKUs; others: groups."
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "required": false,
            "description": "Only values starting with this text, compared the way rules compare tags.",
            "schema": {
              "description": "Only values starting with this text, compared the way rules compare tags.",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/barcode-aliases": {
      "get": {
        "operationId": "variants_barcode_aliases",
        "summary": "variants_barcode_aliases",
        "description": "Read exact supplemental scan identifiers with channel/merchant/peer ownership, primary barcode and revision. Merchant aliases are locally managed and never overwrite source catalog data.\n\n**Operation id:** `variants_barcode_aliases` — the same operation is `app.variants.barcode_aliases({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_barcode_aliases`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A variantBarcodes id, e.g. \"variantBarcodes_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variantBarcodes id, e.g. \"variantBarcodes_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "variants_set_barcode_aliases",
        "summary": "variants_set_barcode_aliases",
        "description": "Replace up to 50 merchant-owned barcode aliases with compare-and-set protection. Refuses duplicate identifiers or collisions with another active item/location, or a live cart's code or slot code (cart_code_taken). Source-owned aliases and the primary barcode remain under their source's ownership. packQuantities (optional, beside aliases) sets how many units one scan of a saved code counts as (2–9999, null for one): a supplier carton books that many at once on Receive, Quick stock and Count; omitted, every quantity stays as it is; refused on a serial or measured item and on a code the item also holds as its barcode, SKU or a source code.\n\n**Operation id:** `variants_set_barcode_aliases` — the same operation is `app.variants.set_barcode_aliases({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_set_barcode_aliases`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "aliases": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "packQuantities": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "barcode": {
                          "type": "string",
                          "minLength": 1
                        },
                        "packQty": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 9999
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "barcode",
                        "packQty"
                      ]
                    }
                  },
                  "expectedRevision": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "variantId",
                  "aliases",
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/by-ids": {
      "post": {
        "operationId": "variants_by_ids",
        "summary": "variants_by_ids",
        "description": "Resolve up to 200 variants by document id to their label data (sku, barcode, variant title, product title). Unknown or foreign ids are skipped. Deleted variants remain available, marked `removed`, unless liveOnly is true.\n\n**Operation id:** `variants_by_ids` — the same operation is `app.variants.by_ids({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_by_ids`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "document ids of the variants."
                  },
                  "liveOnly": {
                    "description": "Exclude deleted variants for operational selection.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/confirm-mode": {
      "get": {
        "operationId": "variants_get_confirm_mode",
        "summary": "variants_get_confirm_mode",
        "description": "Read how Floor Mode may confirm one item: confirmMode (default or no_scan), hasCode (it has a barcode, a SKU or an alias a scan finds) and liveVariants (its product's live variants). Null for an unknown or deleted item.\n\n**Operation id:** `variants_get_confirm_mode` — the same operation is `app.variants.get_confirm_mode({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_get_confirm_mode`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "variants_set_confirm_mode",
        "summary": "variants_set_confirm_mode",
        "description": "Sets how Floor Mode may confirm items: no_scan lets the item step be confirmed by eye (a tap) under every warehouse setting, for items without a barcode or checked by eye — the bin is still scanned; default follows the warehouse. Target every live variant of a product (`{productId}`) or up to 200 items (`{variantIds}`). Kept through product syncs. Answers how many items changed.\n\n**Operation id:** `variants_set_confirm_mode` — the same operation is `app.variants.set_confirm_mode({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_set_confirm_mode`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "productId": {
                            "type": "string",
                            "description": "A products id, e.g. \"products_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                            "format": "floormode-id"
                          }
                        },
                        "required": [
                          "productId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "variantIds": {
                            "minItems": 1,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                              "format": "floormode-id"
                            }
                          }
                        },
                        "required": [
                          "variantIds"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "confirmMode": {
                    "type": "string",
                    "enum": [
                      "default",
                      "no_scan"
                    ],
                    "description": "\"no_scan\": the floor may confirm the item by eye, without a scan; \"default\": as the warehouse says."
                  }
                },
                "required": [
                  "target",
                  "confirmMode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/confirm-mode/import": {
      "post": {
        "operationId": "variants_import_confirm_mode",
        "summary": "variants_import_confirm_mode",
        "description": "Imports the Scanning column: one row per SKU with confirmMode no_scan (the floor may confirm the item by eye, without a scan; the bin is still scanned) or default (as the warehouse says), at most 500 rows per call. Each SKU must name one live item: a row naming none or several is reported in skipped (unknown_sku, ambiguous_sku) and changes nothing. Later rows win for the same item. Answers how many items changed and how many were already in their mode. Bound to requestKey: the same rows under the same key answer the first result again (replayed: true) and write nothing.\n\n**Operation id:** `variants_import_confirm_mode` — the same operation is `app.variants.import_confirm_mode({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_import_confirm_mode`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "minLength": 1
                        },
                        "confirmMode": {
                          "type": "string",
                          "enum": [
                            "default",
                            "no_scan"
                          ],
                          "description": "\"no_scan\": the floor may confirm the item by eye, without a scan; \"default\": as the warehouse says."
                        }
                      },
                      "required": [
                        "sku",
                        "confirmMode"
                      ]
                    }
                  }
                },
                "required": [
                  "requestKey",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/customs": {
      "get": {
        "operationId": "variants_get_customs",
        "summary": "variants_get_customs",
        "description": "Read the customs facts Shopify holds for one variant (B5): hsCode (base HS code), originCountry (ISO alpha-2), countryCodes (one { country, code } per country that issued a tariff number, at most 25; complete false when Shopify holds more), syncedAtMs (when Floormode last read the codes, null before the first read) and adminUrl (the variant in Shopify admin, the one place to edit them). Read-only. Returns null for an unknown, deleted or local item.\n\n**Operation id:** `variants_get_customs` — the same operation is `app.variants.get_customs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_get_customs`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/dangerous-goods": {
      "post": {
        "operationId": "variants_bulk_set_dangerous_goods",
        "summary": "variants_bulk_set_dangerous_goods",
        "description": "Mark up to 200 items as one dangerous-goods class (roadmap B4): `dangerousGoods` (none, lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated) and its `unNumber` (a lithium class takes UN3481 / UN3480 when omitted; a limited quantity or a fully regulated class needs one: refused `un_number_invalid`). A linked listing marks the stock item it sells. Restricts shipping: a marked item's orders get labels only from carriers that carry its class. Kept through product syncs. Answers how many items changed, how many already held it, and the ids that name no live item (`unknown_item`). Pass a `requestKey` to make a retry answer the first result.\n\n**Operation id:** `variants_bulk_set_dangerous_goods` — the same operation is `app.variants.bulk_set_dangerous_goods({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_bulk_set_dangerous_goods`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "dangerousGoods": {
                    "type": "string",
                    "enum": [
                      "none",
                      "lithium_in_equipment",
                      "lithium_with_equipment",
                      "lithium_alone",
                      "limited_quantity",
                      "regulated"
                    ]
                  },
                  "unNumber": {
                    "description": "Four digits (UN3481 or 3481). A lithium class takes UN3481 / UN3480 when omitted and only its own numbers; a limited quantity or a fully regulated class needs one.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "variantIds",
                  "dangerousGoods"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/dimensions": {
      "get": {
        "operationId": "variants_get_dimensions",
        "summary": "variants_get_dimensions",
        "description": "Read the volumetric dimensions and the handling of one variant (length/width/height in mm, weight in g, units on a full pallet, stackable, oversized, its dangerous-goods class and UN number), its carton (`cartonQty`, the smallest pack quantity above 1 its codes carry, read-only) and whether the account has a pallet-capacity location (`palletPositions`). Null fields are unset. Returns null for an unknown variant.\n\n**Operation id:** `variants_get_dimensions` — the same operation is `app.variants.get_dimensions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_get_dimensions`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "variants_set_dimensions",
        "summary": "variants_set_dimensions",
        "description": "Set the volumetric dimensions and the handling of one variant (WHT-004a, roadmap B4): lengthMm, widthMm, heightMm, weightG, unitsPerPallet (units on a full pallet, a whole number of 1 or more: a pallet position's limit), stackable, oversized, and its dangerous goods: `dangerousGoods` (none, lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity, regulated) with its `unNumber` (four digits; a lithium class takes UN3481 / UN3480 when omitted and accepts only its own numbers, a limited quantity or a fully regulated item needs one: refused `un_number_invalid`). A marked item's orders get labels only from carriers that carry its class. Pass null to clear a measure, omit a field to leave it unchanged. Consumed by the capacity engine and the label doors. `expectedRevision` (variants_get_dimensions' `revision`) refuses a save after another change, a listing relinked to another stock item too: `dimensions_changed`, nothing written. The answer's `suspect` names a size that looks like a unit slip (size_unit_slip: no material's density, mm ↔ cm).\n\n**Operation id:** `variants_set_dimensions` — the same operation is `app.variants.set_dimensions({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_set_dimensions`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "lengthMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "widthMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "heightMm": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "weightG": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unitsPerPallet": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stackable": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "oversized": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dangerousGoods": {
                    "type": "string",
                    "enum": [
                      "none",
                      "lithium_in_equipment",
                      "lithium_with_equipment",
                      "lithium_alone",
                      "limited_quantity",
                      "regulated"
                    ]
                  },
                  "unNumber": {
                    "description": "Four digits (UN3481 or 3481). A lithium class takes UN3481 / UN3480 when omitted and only its own numbers; a limited quantity or a fully regulated class needs one.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parcelRule": {
                    "type": "string",
                    "enum": [
                      "with_others",
                      "own_parcel",
                      "own_packaging"
                    ]
                  },
                  "fragile": {
                    "type": "boolean"
                  },
                  "boxGroup": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "keepApart": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pickOrder": {
                    "type": "string",
                    "enum": [
                      "first",
                      "normal",
                      "last"
                    ]
                  },
                  "expectedRevision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "variantId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/home-bin": {
      "get": {
        "operationId": "variants_get_home_bin",
        "summary": "variants_get_home_bin",
        "description": "Read the per-SKU fixed home location (WHT-006): {homeBinId, homeBinCode}, both null when the SKU is dynamically slotted. Returns null for an unknown variant.\n\n**Operation id:** `variants_get_home_bin` — the same operation is `app.variants.get_home_bin({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_get_home_bin`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "document id of the variant.",
            "schema": {
              "type": "string",
              "description": "document id of the variant.",
              "format": "floormode-id"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Narrows to one warehouse; omitted, the first pinned home wins.",
            "schema": {
              "description": "Narrows to one warehouse; omitted, the first pinned home wins.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/import-handling": {
      "post": {
        "operationId": "variants_import_handling",
        "summary": "variants_import_handling",
        "description": "The handling import (roadmap B4): up to 500 rows, each naming an item by `sku` (else `barcode`) with its dangerous-goods class — a key, a label or an alias such as Gefahrgut or LQ — and its `unNumber`. A row that names no item or several, a class outside the vocabulary, a UN number its class refuses, or a second class for an item already in the sheet is reported per row and skipped. Answers how many items changed and how many already held their class. Pass a `requestKey` to make a resent sheet answer the first result.\n\n**Operation id:** `variants_import_handling` — the same operation is `app.variants.import_handling({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_import_handling`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rows": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "barcode": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "dangerousGoods": {
                          "description": "The class: none, lithium_in_equipment, lithium_with_equipment, lithium_alone, limited_quantity or regulated, or its label.",
                          "type": "string",
                          "maxLength": 80
                        },
                        "unNumber": {
                          "description": "Four digits (UN3481 or 3481). A lithium class takes UN3481 / UN3480 when omitted and only its own numbers; a limited quantity or a fully regulated class needs one.",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parcelRule": {
                          "description": "with_others, own_parcel or own_packaging, or its label.",
                          "type": "string",
                          "maxLength": 80
                        },
                        "fragile": {
                          "description": "yes or no.",
                          "type": "string",
                          "maxLength": 10
                        },
                        "boxGroup": {
                          "description": "A box group name; blank clears it.",
                          "type": "string",
                          "maxLength": 80
                        },
                        "keepApart": {
                          "description": "A keep-apart group; blank clears it.",
                          "type": "string",
                          "maxLength": 80
                        },
                        "pickOrder": {
                          "description": "first, normal or last, or its label.",
                          "type": "string",
                          "maxLength": 40
                        }
                      }
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/packing": {
      "post": {
        "operationId": "variants_bulk_set_handling",
        "summary": "variants_bulk_set_handling",
        "description": "Set the packing preferences of up to 200 items (WMS BN-64): `parcelRule` (with_others, own_parcel, own_packaging: packs with the others, each unit its own boxed parcel, or each unit ready to ship in its own carton with no box), `fragile` (a box only, never a mailer or envelope), `boxGroup` (only boxes of that group are suggested), `keepApart` (units of different groups never share a parcel) and `pickOrder` (first, normal, last). A field left out keeps its value; a null group clears it. A linked listing sets the stock item it sells. A parcel already cut keeps its plan; the next order's first parcel follows. Answers how many items changed, how many already held it, and the ids that name no live item (`unknown_item`). Pass a `requestKey` to make a retry answer the first result.\n\n**Operation id:** `variants_bulk_set_handling` — the same operation is `app.variants.bulk_set_handling({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_bulk_set_handling`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "patch": {
                    "type": "object",
                    "properties": {
                      "parcelRule": {
                        "type": "string",
                        "enum": [
                          "with_others",
                          "own_parcel",
                          "own_packaging"
                        ]
                      },
                      "fragile": {
                        "type": "boolean"
                      },
                      "boxGroup": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "keepApart": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pickOrder": {
                        "type": "string",
                        "enum": [
                          "first",
                          "normal",
                          "last"
                        ]
                      }
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "variantIds",
                  "patch"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/search": {
      "get": {
        "operationId": "variants_search",
        "summary": "variants_search",
        "description": "Search variants by sku, barcode, variant title or product name (max 50 rows); a product found by its name lists each of its live variants. Prefix matches rank before substring matches; an empty query returns the first variants. Backs the variant pickers of the adjust/move dialogs.\n\n**Operation id:** `variants_search` — the same operation is `app.variants.search({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_search`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Sku, barcode, variant title or product name fragment.",
            "schema": {
              "description": "Sku, barcode, variant title or product name fragment.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only variants of active products (order editing).",
            "schema": {
              "description": "Only variants of active products (order editing).",
              "type": "string",
              "const": "active"
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "required": false,
            "description": "Only this store's variants (order editing: the order's `store`).",
            "schema": {
              "description": "Only this store's variants (order editing: the order's `store`).",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "withRemovedStock",
            "in": "query",
            "required": false,
            "description": "Also variants Shopify deleted that a bin still holds, by their exact sku or barcode, marked `removed` (the adjust dialog). Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "description": "Also variants Shopify deleted that a bin still holds, by their exact sku or barcode, marked `removed` (the adjust dialog).",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/tracking": {
      "get": {
        "operationId": "variants_get_tracking",
        "summary": "variants_get_tracking",
        "description": "Read one item's tracking (roadmap D/E E3a): trackingMode, expiryKind, expiryRequired, serialCapture, trackingChangedAtMs and trackingChangedByName (null while it never changed), and the revision a form binds to. Null for an unknown or deleted item.\n\n**Operation id:** `variants_get_tracking` — the same operation is `app.variants.get_tracking({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_get_tracking`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantId",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "variants_set_tracking",
        "summary": "variants_set_tracking",
        "description": "Set what up to 100 items track (roadmap D/E E3a): mode none | lot | serial, and for lots expiryKind (best_before | use_by | expiry | none: the wording of the lot's date) and expiryRequired (a lot without a date is then refused at receipt; forced false when expiryKind is none); for serials serialCapture (pack | receive). An omitted field keeps each item's own value. A lot item asks for its lot at every receipt; an item that tracks none takes no new lot but may still name the lots it holds. Stock already without (or with) a lot is never refused — read variants_tracking_impact first. A serial item with serialCapture pack owes one serial per unit at packing (packing_record_serial); with serialCapture receive, one per unit at receiving (receiving_record_line serials), and packing then accepts only those. A switch away from serial is refused while a unit with a serial is in stock, packed or returned (`details.code: \"serial_units_held\"`); a switch to serialCapture receive while units on hand have no serial unit is refused with how many lack one (`details.code: \"serial_stock_unrecorded\"`, `onHand`, `recorded`). A bundle is refused (`details.code: \"bundle_parent\"`; its components hold the stock), and any refusal refuses the whole call. SIDE EFFECTS: stamps who changed it and when, and records `variant_tracking_changed` on each changed item. Answers {updated, unchanged}.\n\n**Operation id:** `variants_set_tracking` — the same operation is `app.variants.set_tracking({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_set_tracking`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variantIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "none",
                      "lot",
                      "serial"
                    ]
                  },
                  "expiryKind": {
                    "type": "string",
                    "enum": [
                      "best_before",
                      "use_by",
                      "expiry",
                      "none"
                    ]
                  },
                  "expiryRequired": {
                    "type": "boolean"
                  },
                  "serialCapture": {
                    "type": "string",
                    "enum": [
                      "pack",
                      "receive"
                    ]
                  }
                },
                "required": [
                  "variantIds",
                  "mode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/variants/tracking-impact": {
      "get": {
        "operationId": "variants_tracking_impact",
        "summary": "variants_tracking_impact",
        "description": "What switching up to 100 items to a tracking mode leaves behind: switching to lot, each item's units on hand without a lot (units: \"without_lot\"); switching away, those with one (\"with_lot\") — the exact sum per item and up to 5 of its bins (binsCapped when it holds more), only for items with such units; alreadyInMode counts the items the switch leaves unchanged. Read-only.\n\n**Operation id:** `variants_tracking_impact` — the same operation is `app.variants.tracking_impact({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_tracking_impact`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "variantIds",
            "in": "query",
            "required": true,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `variantIds` for each value (`?variantIds=variants_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?variantIds=[\"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "variants_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "minItems": 1,
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "lot",
                "serial"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/variants/tracking-in-use": {
      "get": {
        "operationId": "variants_tracking_in_use",
        "summary": "variants_tracking_in_use",
        "description": "Whether any item tracks lots ({lot}) or serials ({serial}) — what a form that takes a lot before it knows the item (a new receipt's lines) asks. Read-only.\n\n**Operation id:** `variants_tracking_in_use` — the same operation is `app.variants.tracking_in_use({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/variants_tracking_in_use`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "variants"
        ],
        "x-topic": "catalog",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers": {
      "get": {
        "operationId": "warehouse_transfers_list",
        "summary": "warehouse_transfers_list",
        "description": "List physical warehouse transfers with source, staging, transit and received totals.\n\n**Operation id:** `warehouse_transfers_list` — the same operation is `app.warehouse.transfers_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "With warehouseId: from, to, or either (the default).",
            "schema": {
              "description": "With warehouseId: from, to, or either (the default).",
              "type": "string",
              "enum": [
                "from",
                "to",
                "either"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any of these physical statuses; empty or absent = every status. Repeat `status` for each value (`?status=draft&status=ready`), or pass a JSON array (`?status=[\"draft\",\"ready\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "draft",
              "ready"
            ],
            "schema": {
              "description": "Any of these physical statuses; empty or absent = every status.",
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "draft",
                  "ready",
                  "in_progress",
                  "completed",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "channelState",
            "in": "query",
            "required": false,
            "description": "Any of these channel states; empty or absent = every state. Repeat `channelState` for each value (`?channelState=not_required&channelState=pending`), or pass a JSON array (`?channelState=[\"not_required\",\"pending\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "not_required",
              "pending"
            ],
            "schema": {
              "description": "Any of these channel states; empty or absent = every state.",
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "not_required",
                  "pending",
                  "confirmed",
                  "refused",
                  "ambiguous"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default), `created:asc` (oldest first), `updated:desc` (recently changed) or `updated:asc` (longest unchanged). A cursor belongs to the sort it was returned under.",
            "schema": {
              "description": "`created:desc` (newest first, the default), `created:asc` (oldest first), `updated:desc` (recently changed) or `updated:asc` (longest unchanged). A cursor belongs to the sort it was returned under.",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc",
                "updated:desc",
                "updated:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The previous page's cursor, under the same sort.",
            "schema": {
              "description": "The previous page's cursor, under the same sort.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "warehouse_transfers_create",
        "summary": "warehouse_transfers_create",
        "description": "Create an immutable-adapter physical warehouse transfer draft.\n\n**Operation id:** `warehouse_transfers_create` — the same operation is `app.warehouse.transfers_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requireSourceAvailability": {
                    "type": "boolean"
                  },
                  "fromWarehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toWarehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "adapter": {
                    "type": "string",
                    "enum": [
                      "local",
                      "shopify_native",
                      "logistified"
                    ]
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 2147483647
                        }
                      },
                      "required": [
                        "variantId",
                        "quantity"
                      ]
                    }
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "fromWarehouseId",
                  "toWarehouseId",
                  "adapter",
                  "lines",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/options": {
      "get": {
        "operationId": "warehouse_transfers_options",
        "summary": "warehouse_transfers_options",
        "description": "Find backend-verified warehouse pairs and item adapter eligibility for transfer drafts.\n\n**Operation id:** `warehouse_transfers_options` — the same operation is `app.warehouse.transfers_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "fromWarehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "toWarehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                },
                {
                  "type": "string",
                  "maxLength": 512
                }
              ]
            }
          },
          {
            "name": "selectedVariantIds",
            "in": "query",
            "required": false,
            "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\". Repeat `selectedVariantIds` for each value (`?selectedVariantIds=variants_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?selectedVariantIds=[\"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "variants_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}": {
      "get": {
        "operationId": "warehouse_transfers_get",
        "summary": "warehouse_transfers_get",
        "description": "Read a transfer with exact bin/lot slices, shipments, receipts and permitted floor actions.\n\n**Operation id:** `warehouse_transfers_get` — the same operation is `app.warehouse.transfers_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/cancel": {
      "post": {
        "operationId": "warehouse_transfers_cancel",
        "summary": "warehouse_transfers_cancel",
        "description": "Cancel only the unshipped transfer remainder; staged goods must first return to source and transit is preserved.\n\n**Operation id:** `warehouse_transfers_cancel` — the same operation is `app.warehouse.transfers_cancel({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_cancel`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/destination-options": {
      "get": {
        "operationId": "warehouse_transfers_destination_options",
        "summary": "warehouse_transfers_destination_options",
        "description": "Read eligible destination leaves for this transfer adapter.\n\n**Operation id:** `warehouse_transfers_destination_options` — the same operation is `app.warehouse.transfers_destination_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_destination_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/dispatch": {
      "post": {
        "operationId": "warehouse_transfers_dispatch",
        "summary": "warehouse_transfers_dispatch",
        "description": "Dispatch exact staged slices into immutable shipment transit and create the destination expected receipt.\n\n**Operation id:** `warehouse_transfers_dispatch` — the same operation is `app.warehouse.transfers_dispatch({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_dispatch`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "slices": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sliceId": {
                          "type": "string",
                          "description": "A warehouseTransferSlices id, e.g. \"warehouseTransferSlices_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 2147483647
                        }
                      },
                      "required": [
                        "sliceId",
                        "quantity"
                      ]
                    }
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "slices"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/edit": {
      "post": {
        "operationId": "warehouse_transfers_edit",
        "summary": "warehouse_transfers_edit",
        "description": "Edit quantities and note of an unprepared transfer draft with revision protection.\n\n**Operation id:** `warehouse_transfers_edit` — the same operation is `app.warehouse.transfers_edit({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_edit`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 2147483647
                        }
                      },
                      "required": [
                        "variantId",
                        "quantity"
                      ]
                    }
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "expectedRevision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/external-receipts": {
      "get": {
        "operationId": "warehouse_transfers_external_receipts",
        "summary": "warehouse_transfers_external_receipts",
        "description": "Read exact external destination arrivals with separate per-receipt provider publication evidence and source lot provenance.\n\n**Operation id:** `warehouse_transfers_external_receipts` — the same operation is `app.warehouse.transfers_external_receipts({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_external_receipts`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "shipmentId",
            "in": "query",
            "required": false,
            "description": "A warehouseTransferShipments id, e.g. \"warehouseTransferShipments_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouseTransferShipments id, e.g. \"warehouseTransferShipments_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A warehouseTransferExternalReceipts id, e.g. \"warehouseTransferExternalReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouseTransferExternalReceipts id, e.g. \"warehouseTransferExternalReceipts_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/native-proofs": {
      "get": {
        "operationId": "warehouse_transfers_native_proofs",
        "summary": "warehouse_transfers_native_proofs",
        "description": "Read retained exact native transfer command acknowledgements, independent of transport retention. These are document ownership proofs, not inventory adjustment groups.\n\n**Operation id:** `warehouse_transfers_native_proofs` — the same operation is `app.warehouse.transfers_native_proofs({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_native_proofs`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A warehouseTransferNativeProofs id, e.g. \"warehouseTransferNativeProofs_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouseTransferNativeProofs id, e.g. \"warehouseTransferNativeProofs_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/pick": {
      "post": {
        "operationId": "warehouse_transfers_pick",
        "summary": "warehouse_transfers_pick",
        "description": "Scan exact item, lot and locations to carry reserved goods into transfer staging. Send either `scannedCode` or `variantId` (an item with no usable code — none of its barcode, alias barcodes or SKU resolves to it in the source warehouse, where this leg scans — named; it must be the line's item, and an item with a usable code there is refused: send its code).\n\n**Operation id:** `warehouse_transfers_pick` — the same operation is `app.warehouse.transfers_pick({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_pick`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sliceId": {
                    "type": "string",
                    "description": "A warehouseTransferSlices id, e.g. \"warehouseTransferSlices_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 2147483647
                  },
                  "scannedLotNumber": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "scannedCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "type": "string",
                    "description": "A floorApprovals id, e.g. \"floorApprovals_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedSourceBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "scannedStagingBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "sliceId",
                  "quantity",
                  "scannedSourceBinCode",
                  "scannedStagingBinCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/prepare": {
      "post": {
        "operationId": "warehouse_transfers_prepare",
        "summary": "warehouse_transfers_prepare",
        "description": "Reserve exact source bin and lot slices for the complete transfer demand.\n\n**Operation id:** `warehouse_transfers_prepare` — the same operation is `app.warehouse.transfers_prepare({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_prepare`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "selections": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "lineId": {
                          "type": "string",
                          "description": "A warehouseTransferLines id, e.g. \"warehouseTransferLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "fromBinId": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        },
                        "lotId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "A lots id, e.g. \"lots_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                              "format": "floormode-id"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 2147483647
                        },
                        "stagingBinId": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "required": [
                        "lineId",
                        "fromBinId",
                        "lotId",
                        "quantity"
                      ]
                    }
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "selections"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/receive": {
      "post": {
        "operationId": "warehouse_transfers_receive",
        "summary": "warehouse_transfers_receive",
        "description": "Receive exact shipment units into a scanned destination bin, preserving lot, transit and carried cost. Send either `scannedCode` or `variantId` (an item with no usable code — none of its barcode, alias barcodes or SKU resolves to it in the destination warehouse, where this leg scans — named; it must be the line's item, and an item with a usable code there is refused: send its code).\n\n**Operation id:** `warehouse_transfers_receive` — the same operation is `app.warehouse.transfers_receive({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_receive`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "shipmentLineId": {
                    "type": "string",
                    "description": "A warehouseTransferShipmentLines id, e.g. \"warehouseTransferShipmentLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "toBinId": {
                    "type": "string",
                    "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 2147483647
                  },
                  "scannedLotNumber": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "scannedCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "type": "string",
                    "description": "A floorApprovals id, e.g. \"floorApprovals_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedDestinationBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "shipmentLineId",
                  "toBinId",
                  "quantity",
                  "scannedDestinationBinCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/return-to-source": {
      "post": {
        "operationId": "warehouse_transfers_return_to_source",
        "summary": "warehouse_transfers_return_to_source",
        "description": "Scan staged transfer goods back into their original source location, preserving reservation ownership. Send either `scannedCode` or `variantId` (an item with no usable code — none of its barcode, alias barcodes or SKU resolves to it in the source warehouse, where this leg scans — named; it must be the line's item, and an item with a usable code there is refused: send its code).\n\n**Operation id:** `warehouse_transfers_return_to_source` — the same operation is `app.warehouse.transfers_return_to_source({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_return_to_source`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "mutation",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sliceId": {
                    "type": "string",
                    "description": "A warehouseTransferSlices id, e.g. \"warehouseTransferSlices_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "quantity": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 2147483647
                  },
                  "scannedLotNumber": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "scannedCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "variantId": {
                    "type": "string",
                    "description": "A variants id, e.g. \"variants_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "scan",
                      "camera",
                      "typed",
                      "photo",
                      "tap",
                      "paper",
                      "desk"
                    ]
                  },
                  "approvalId": {
                    "type": "string",
                    "description": "A floorApprovals id, e.g. \"floorApprovals_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "scannedSourceBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "scannedStagingBinCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "expectedRevision",
                  "idempotencyKey",
                  "sliceId",
                  "quantity",
                  "scannedSourceBinCode",
                  "scannedStagingBinCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouse-transfers/{transferId}/source-options": {
      "get": {
        "operationId": "warehouse_transfers_source_options",
        "summary": "warehouse_transfers_source_options",
        "description": "Read exact source bin and lot quantities and dedicated transfer staging for up to 10 lines of one transfer (`lineIds`); `results` answers each line in the order asked.\n\n**Operation id:** `warehouse_transfers_source_options` — the same operation is `app.warehouse.transfers_source_options({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouse_transfers_source_options`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouse-transfers"
        ],
        "x-topic": "inventory",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A warehouseTransfers id, e.g. \"warehouseTransfers_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "lineIds",
            "in": "query",
            "required": true,
            "description": "The lines to answer, up to 10, answered in order. Repeat `lineIds` for each value (`?lineIds=warehouseTransferLines_01ARZ3NDEKTSV4RRFFQ69G5FAV`), or pass a JSON array (`?lineIds=[\"warehouseTransferLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "warehouseTransferLines_01ARZ3NDEKTSV4RRFFQ69G5FAV"
            ],
            "schema": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "description": "A warehouseTransferLines id, e.g. \"warehouseTransferLines_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                "format": "floormode-id"
              },
              "description": "The lines to answer, up to 10, answered in order."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses": {
      "get": {
        "operationId": "warehouses_list",
        "summary": "warehouses_list",
        "description": "List warehouses with their settings, name-ordered pages of 100; optionally resolve one exact warehouse.\n\n**Operation id:** `warehouses_list` — the same operation is `app.warehouses.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "warehouses_create",
        "summary": "warehouses_create",
        "description": "Create a warehouse. Optionally link a mirrored Shopify location and set the stock settings (allowNegative, overReceiptTolerancePct). `inventoryWriter` is NOT settable here: a new warehouse always starts as a non-writer in cutover state `bootstrap`, and only the writer cutover ('Go live') can make it write Shopify availability — a payload carrying the flag is refused.\n\n**Operation id:** `warehouses_create` — the same operation is `app.warehouses.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Display name of the warehouse."
                  },
                  "shopifyLocationId": {
                    "description": "Numeric Shopify location id to map, or null.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  },
                  "settings": {
                    "description": "Merged over {allowNegative: false, overReceiptTolerancePct: 0, inventoryWriter: false, writerState: 'bootstrap'}.",
                    "type": "object",
                    "properties": {
                      "allowNegative": {
                        "type": "boolean"
                      },
                      "overReceiptTolerancePct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100,
                        "description": "Over-receipt tolerance in percent of the expected quantity (0–100)."
                      },
                      "allowOversell": {
                        "description": "Accept backorders/preorders: a shortfall becomes a backorder (default false).",
                        "type": "boolean"
                      },
                      "trackLots": {
                        "description": "Retired: replaced by each item's tracking mode (variants_set_tracking). Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "putawayStrategy": {
                        "description": "How new stock is placed: \"together\" (next to the same product, else the emptiest bin; the default) or \"spread\" (prefer bins that do not hold the product yet).",
                        "type": "string",
                        "enum": [
                          "together",
                          "spread"
                        ]
                      },
                      "floorConfirm": {
                        "description": "How Floor Mode workers confirm a bin or an item: \"scan\" (a scan or a typed code is required), \"scan_or_tap\" (the default: a device without a scanner may confirm by tapping) or \"tap\" (no scanners: every step has a confirm button, scans still work).",
                        "type": "string",
                        "enum": [
                          "scan",
                          "scan_or_tap",
                          "tap"
                        ]
                      },
                      "codePhotoReader": {
                        "description": "Read codes from a photo (default false, AI lane P-G): when a bin or item barcode can't be scanned, Floor Mode offers \"Take a photo\" and reads the printed code from a crop of the label (not stored). The person confirms the code; it is booked as a typed code (method photo) and held to the same rules, and a product name only identifies.",
                        "type": "boolean"
                      },
                      "countPhoto": {
                        "description": "Count from a photo (default \"off\", AI lane U6): while counting, Floor Mode may photograph the bin (not stored) and a model counts boxes of one item, 1–12. \"check\": the photo only agrees with the count the person entered, or says \"Count by hand\", never a number (a blind count always runs it). \"suggest\": an open count's quantity is filled with the photo's count, never below the expected quantity. A person always books the count.",
                        "type": "string",
                        "enum": [
                          "off",
                          "check",
                          "suggest"
                        ]
                      },
                      "paperPickRecord": {
                        "description": "Paper pick lists are the record (default false): the desk may book a batch walked from a printed list as picked (picking_confirm_as_listed), marked as confirmed on paper.",
                        "type": "boolean"
                      },
                      "fefoEnabled": {
                        "description": "Allocate first-expiring-first-out instead of first-in-first-out (default true). FEFO orders dated lots only; stock without a dated lot keeps the pick route.",
                        "type": "boolean"
                      },
                      "nearExpiryDays": {
                        "description": "How many days ahead a lot counts as near-expiry (1–3650). Defaults to 30.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3650
                      },
                      "qcAtPack": {
                        "description": "Retired: replaced by packChecklist.qc.mode. Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "captureOnFulfill": {
                        "description": "Capture an authorized payment when the order is fulfilled.",
                        "type": "boolean"
                      },
                      "requireLabelBeforeFulfil": {
                        "description": "Retired: replaced by packChecklist.label.mode. Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "packChecklist": {
                        "description": "The pack checklist: the steps a parcel walks at the pack station (photo, weigh, check, label) and how strongly each is asked for. Absent on a new warehouse: the plan of the first warehouse, else Just pack (scan and fulfil).",
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "preset": {
                            "type": "string",
                            "enum": [
                              "just_pack",
                              "pack_label",
                              "weigh_label",
                              "proof_photo",
                              "custom"
                            ],
                            "description": "Display only: recomputed from the step modes on every save."
                          },
                          "photo": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ]
                              },
                              "retentionDays": {
                                "type": "number",
                                "enum": [
                                  30,
                                  90,
                                  180,
                                  365
                                ],
                                "description": "How many days a pack photo is kept (30, 90, 180 or 365)."
                              },
                              "check": {
                                "description": "\"show\" (also when absent: on by default): Cloudflare Workers AI compares each saved pack photo with the parcel's items and the pack station shows the answer as advice (never a block; sizes and similar variants are not checked). \"off\": no photo is read. A new warehouse starts with the default.",
                                "type": "string",
                                "enum": [
                                  "off",
                                  "show"
                                ]
                              }
                            },
                            "required": [
                              "mode",
                              "retentionDays"
                            ]
                          },
                          "weigh": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ]
                              },
                              "tolerancePct": {
                                "type": "integer",
                                "minimum": 5,
                                "maximum": 50,
                                "description": "How far a weight may be off the expected one, in whole percent (5–50)."
                              },
                              "offPolicy": {
                                "type": "string",
                                "enum": [
                                  "warn",
                                  "lead"
                                ],
                                "description": "What a weight outside the tolerance does: \"warn\" (it is saved and shown)."
                              }
                            },
                            "required": [
                              "mode",
                              "tolerancePct",
                              "offPolicy"
                            ]
                          },
                          "qc": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "required"
                                ]
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          "label": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ],
                                "description": "\"required\": no fulfil without a label of the parcel or a tracking number; \"optional\": Fulfil + print buys one when the shipping rules resolve a service, and fulfils without one otherwise; \"off\": the pack station buys none."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          "printOnLastScan": {
                            "description": "Print the label when the last item is scanned, at Floormode's pack stations: the station verifies the parcel and presses Fulfil + print once every required step is met. The scan itself starts nothing (packing_scan_item answers as always). Off when absent.",
                            "type": "boolean"
                          },
                          "sort": {
                            "description": "Sort to orders at the pack station (WMS BN-09): a batch pick's units are scanned at the pack station and each goes to the slot of the order that needs it (packing_sort_scan). Absent: offered for single-item batches, on numbered slots.",
                            "type": "object",
                            "properties": {
                              "offer": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "singles",
                                  "every"
                                ],
                                "description": "\"singles\" (the default): a batch whose orders are one item each; \"every\": every batch pick; \"off\": only when a packer opens it."
                              },
                              "wall": {
                                "description": "The sort wall's slot labels in order (at most 20, 3–12 characters each), each also the code a scan confirms the placement with. Absent: the slots are numbered 1, 2, 3 ….",
                                "minItems": 1,
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 3,
                                  "maxLength": 12
                                }
                              }
                            },
                            "required": [
                              "offer"
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "preset",
                          "photo",
                          "weigh",
                          "qc",
                          "label"
                        ]
                      },
                      "countCadence": {
                        "description": "Scheduled cycle counts by velocity class (default off; A every 7, B every 30, C every 90 days). On, a daily pass creates a count task for every stocked bin whose last approved count is older than its class allows; a bin never counted is due on one day of its class's period, so the first round is spread over it.",
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Create cycle counts on this schedule (default off)."
                          },
                          "days": {
                            "type": "object",
                            "properties": {
                              "A": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              },
                              "B": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              },
                              "C": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              }
                            },
                            "required": [
                              "A",
                              "B",
                              "C"
                            ],
                            "description": "Days between counts of a bin, per velocity class A, B and C (1 to 365)."
                          }
                        },
                        "required": [
                          "enabled",
                          "days"
                        ]
                      },
                      "countVarianceGuard": {
                        "description": "Which count differences need an explicit acceptance before the approval books them (default 20 % and 0 units): a counted line off by more than pct percent of the expected quantity AND by more than minUnits units. Sent whole.",
                        "type": "object",
                        "properties": {
                          "pct": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "minUnits": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          }
                        },
                        "required": [
                          "pct",
                          "minUnits"
                        ]
                      },
                      "timeZone": {
                        "description": "The warehouse's IANA time zone (e.g. \"America/New_York\"): its days for shifts and the time clock. Required before the time clock or the first shift pattern is switched on.",
                        "type": "string",
                        "maxLength": 64
                      },
                      "timeZoneSource": {
                        "description": "Where timeZone comes from: \"store\" (the home store's time zone, followed when it changes) or \"warehouse\" (stated for this warehouse). Omitted: a timeZone that differs from the stored one is the warehouse's own, an unchanged one keeps its source. \"store\" alone copies the store's current zone; \"store\" with a different timeZone is refused.",
                        "type": "string",
                        "enum": [
                          "store",
                          "warehouse"
                        ]
                      },
                      "unitSystem": {
                        "description": "How this warehouse measures: \"metric\" (g, mm) or \"imperial\" (oz, lb, in). Stored weights and lengths stay in grams and millimetres. Absent on a new warehouse: the home store's (followed, unitSystemSource \"store\"); unknown: metric.",
                        "type": "string",
                        "enum": [
                          "metric",
                          "imperial"
                        ]
                      },
                      "unitSystemSource": {
                        "description": "Where unitSystem comes from: \"store\" (the home store's, followed when it changes) or \"warehouse\" (stated for this warehouse), by the same rule as timeZoneSource.",
                        "type": "string",
                        "enum": [
                          "store",
                          "warehouse"
                        ]
                      },
                      "timeClock": {
                        "description": "The time clock: \"off\" (the default) or \"on\", which needs a timeZone.",
                        "type": "string",
                        "enum": [
                          "off",
                          "on"
                        ]
                      },
                      "gatedFloorActions": {
                        "description": "The floor exceptions that need a lead's PIN in this warehouse. Defaults to all of them.",
                        "maxItems": 9,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "short_line",
                            "mark_damaged",
                            "close_receipt_short",
                            "accept_count_difference",
                            "confirm_without_scan",
                            "move_allocated",
                            "retarget_move",
                            "release_other",
                            "handover_started"
                          ]
                        }
                      },
                      "planArrivals": {
                        "description": "Plan when deliveries arrive and at which dock door (WMS W4a, default off). On: a receipt carries an arrival time, door and reference, and the floor checks a delivery in at its door; receiving never waits for a check-in (the first booking stamps the arrival). Off: receiving_set_arrival and receiving_check_in answer arrivals_off.",
                        "type": "boolean"
                      },
                      "receivingFlow": {
                        "description": "How manual receipts and Logistified purchase orders are received: \"direct\" (the default: straight to a shelf bin), \"dock\" (into DOCK-01, put away later as a floor task) or \"dock_inspect\" (into QC-IN-01 for inspection first). Transfers and finished goods are always received directly. Turning a dock flow on is refused while the warehouse holds a bin of its own coded DOCK-01 or QC-IN-01 (reserved_code_taken).",
                        "type": "string",
                        "enum": [
                          "direct",
                          "dock",
                          "dock_inspect"
                        ]
                      },
                      "crossDock": {
                        "description": "Straight to packing (default false): when a receipt booked straight to a shelf makes a waiting order whole, the order's units go to packing in the same booking instead of waiting on the shelf for a pick (receiving_record_line answers toPacking). Only while the receiving flow is \"direct\"; a dock flow keeps the value and ignores it.",
                        "type": "boolean"
                      },
                      "lotLabelReader": {
                        "description": "Read lot labels from a photo (default false): on the floor's receive screen a lot item's lot field offers a camera button; the label photo is read by Cloudflare Workers AI (not stored) and fills the lot number and its date where they are empty. The booking validates them as always.",
                        "type": "boolean"
                      },
                      "returnGradeBins": {
                        "description": "Where each return grade's units go in this warehouse when the receiver scans no bin (WMS BN-24a): grade key → bin id, e.g. {\"b\": \"<bin id>\"}. A restocking grade names a sellable bin, a grade held from sale a quarantine bin. Absent: B-stock goes to BSTK-01, other held grades to QUAR-01, restocked ones to the suggested bin.",
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "a",
                            "b",
                            "g3",
                            "g4",
                            "g5",
                            "g6",
                            "g7",
                            "g8"
                          ]
                        },
                        "additionalProperties": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        }
                      },
                      "purchasePrices": {
                        "description": "The purchase-price warning: when a receipt's cost is applied, each item whose cost lies more than tolerancePct from the price its Logistified purchase order agreed is flagged on the receipt. It warns and never refuses. Absent: warn beyond 5 %.",
                        "type": "object",
                        "properties": {
                          "warn": {
                            "type": "boolean",
                            "description": "Flag a receipt whose applied cost deviates from its PO price (default true)."
                          },
                          "tolerancePct": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "How many percent either way a cost may lie from the PO price (default 5)."
                          }
                        },
                        "required": [
                          "warn",
                          "tolerancePct"
                        ]
                      },
                      "inspection": {
                        "description": "The inspection rules of a dock_inspect warehouse: whether a failed unit needs a photo and the warehouse's own fail reasons. Absent: a photo on every fail, no own reasons.",
                        "type": "object",
                        "properties": {
                          "photoOnFail": {
                            "type": "boolean",
                            "description": "A failed inspection needs a photo of the goods (default true)."
                          },
                          "customReasons": {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9_]{0,39}$",
                                  "description": "The reason's key, stored on the inspection."
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 40
                                }
                              },
                              "required": [
                                "key",
                                "label"
                              ]
                            },
                            "description": "The warehouse's own reasons a unit fails inspection, at most 8."
                          },
                          "reasonAssist": {
                            "description": "The floor suggests why a unit failed from its photo (Cloudflare Workers AI reads it without storing it; the inspection photo itself is kept as evidence per photoOnFail, which this needs). Default false.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "photoOnFail",
                          "customReasons"
                        ]
                      },
                      "dispatch": {
                        "description": "The packing calendar delivery dates count in (when they are on): how many packing days before the customer's delivery day an order is packed, the days of the week this warehouse packs on and the days it is closed. Defaults to 1 day before, Monday to Friday, no closed days.",
                        "type": "object",
                        "properties": {
                          "packDaysBefore": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 7,
                            "description": "Packing days before the delivery day (0–7); 0 packs on the delivery day itself."
                          },
                          "packingWeekdays": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "number",
                              "enum": [
                                1,
                                2,
                                3,
                                4,
                                5,
                                6,
                                7
                              ]
                            },
                            "description": "The ISO days of the week this warehouse packs on, 1 = Monday … 7 = Sunday."
                          },
                          "closedDays": {
                            "maxItems": 60,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "description": "Days (YYYY-MM-DD) the warehouse does not pack although the weekday says so; at most 60."
                          }
                        },
                        "required": [
                          "packDaysBefore",
                          "packingWeekdays",
                          "closedDays"
                        ]
                      },
                      "collectionLeadMinutes": {
                        "description": "Orders in by this many minutes before each collection (WMS BN-15a, 0..720; absent = 0): an order that arrives later is scheduled for the next collection. An order-admission buffer, never a second truck time; the collection times themselves are collection_times_save's.",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 720
                      },
                      "routePolicy": {
                        "description": "How pick lists walk (B9, default \"walk\"): \"walk\" = the Layout list's order; \"map\" = a pick list (or, with pick classes, each class of it) whose bins all have an accepted walk point walks them nearest first, storey by storey, any other the Layout list. \"map\" is refused until the warehouse has an accepted walk point (locations_walk_points_accept). Counts and putaway walk the Layout list either way.",
                        "type": "string",
                        "enum": [
                          "walk",
                          "map"
                        ]
                      },
                      "pickOnPackDay": {
                        "description": "Picking waits for the pack day (default false): while delivery dates are on, an order with a requested delivery day is not ready to pick in this warehouse before its pack day, unless someone let it through early (orders_set_pick_early).",
                        "type": "boolean"
                      },
                      "returnLabelReader": {
                        "description": "Read return labels with the camera (default true, owner 2026-11-09): when a returns parcel's barcode can't be read, Cloudflare Workers AI reads the tracking number from a photo of the barcode area; false turns it off for this warehouse.",
                        "type": "boolean"
                      },
                      "useCarts": {
                        "description": "Carts and totes with a code (default false): a picker scans a cart or tote to start a pick list sized by it (carts_list), a cart's slot scan books each pick, and the cart's scan hands the list over. Off stops new cart starts; lists already on a cart finish.",
                        "type": "boolean"
                      },
                      "eventCounts": {
                        "description": "Event counts (default true): a short pick, a move whose source bin was empty, or a planned bin the floor reports full opens a count of that bin in the same write (countTasks.trigger), unless the bin is already in a count that is not finished.",
                        "type": "boolean"
                      },
                      "askBinEmpty": {
                        "description": "Ask whether a bin is empty (default false): when a pick leaves a bin with nothing in it, picking_record_pick answers binEmptied and the floor asks; a no opens a count (counts_report_bin_not_empty).",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "allowNegative",
                      "overReceiptTolerancePct"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/assign-building": {
      "post": {
        "operationId": "warehouses_building_assign",
        "summary": "warehouses_building_assign",
        "description": "Assign a physical entity to a storey and explicit walk-up point. Moving a container clears descendant approaches atomically.\n\n**Operation id:** `warehouses_building_assign` — the same operation is `app.warehouses.building_assign({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_building_assign`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "placement": {
                    "type": "object",
                    "properties": {
                      "entity": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "bin"
                              },
                              "id": {
                                "type": "string",
                                "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "station"
                              },
                              "id": {
                                "type": "string",
                                "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          }
                        ]
                      },
                      "storeyId": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      "approach": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "x": {
                                "type": "number",
                                "minimum": -100000,
                                "maximum": 100000
                              },
                              "y": {
                                "type": "number",
                                "minimum": -100000,
                                "maximum": 100000
                              }
                            },
                            "required": [
                              "x",
                              "y"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity",
                      "storeyId",
                      "approach"
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "expectedRevision",
                  "placement"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/autoprovision": {
      "post": {
        "operationId": "warehouses_autoprovision",
        "summary": "warehouses_autoprovision",
        "description": "Create one warehouse per active, non-fulfillment-service Shopify location that no warehouse is linked to yet (name = location name, availability writer OFF, cutover state `bootstrap`). Idempotent — existing warehouses and manual mappings are never touched; the install backfill runs the same provisioning automatically when its locations phase completes.\n\n**Operation id:** `warehouses_autoprovision` — the same operation is `app.warehouses.autoprovision({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_autoprovision`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/building": {
      "get": {
        "operationId": "warehouses_building_get",
        "summary": "warehouses_building_get",
        "description": "Read the versioned warehouse building, storeys, connectors and explicit approach points.\n\n**Operation id:** `warehouses_building_get` — the same operation is `app.warehouses.building_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_building_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/cutover-history": {
      "get": {
        "operationId": "warehouses_cutover_history",
        "summary": "warehouses_cutover_history",
        "description": "The last three go-live (writer cutover) attempts of one warehouse, newest first: who ran it, when, whether it activated or was blocked (`kind`), the mismatch count and whether mismatches were forced — plus, while the warehouse is not a live writer, its outstanding requirement (`kind: required`; `requiredBy` names what raised it, e.g. a Logistified receiving-ownership proposal that waits on this warehouse's Go live).\n\n**Operation id:** `warehouses_cutover_history` — the same operation is `app.warehouses.cutover_history({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_cutover_history`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/floor-plan": {
      "get": {
        "operationId": "warehouses_get_floor_plan",
        "summary": "warehouses_get_floor_plan",
        "description": "Read one storey plan and its building revision.\n\n**Operation id:** `warehouses_get_floor_plan` — the same operation is `app.warehouses.get_floor_plan({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_get_floor_plan`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "storeyId",
            "in": "query",
            "required": true,
            "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,64}$",
              "format": "floormode-id",
              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/from-locations": {
      "post": {
        "operationId": "warehouses_create_from_locations",
        "summary": "warehouses_create_from_locations",
        "description": "Make warehouses from Shopify locations, named after them, in one transaction (at most 20): a location that is unknown, inactive, run by a fulfillment service or already a warehouse refuses the whole batch. The setup guide's one submit; nothing is imported here, each warehouse's Stock step does that.\n\n**Operation id:** `warehouses_create_from_locations` — the same operation is `app.warehouses.create_from_locations({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_create_from_locations`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopifyLocationIds": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    },
                    "description": "Shopify location ids (numeric or GID) that become warehouses."
                  }
                },
                "required": [
                  "shopifyLocationIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/go-live": {
      "post": {
        "operationId": "warehouses_go_live",
        "summary": "warehouses_go_live",
        "description": "Go live for a warehouse. From now on Floormode keeps its Shopify stock numbers. A check compares Shopify with Floormode first; it runs in the background in rounds, so the answer is usually { state: 'verifying' }, and the outcome is the newest attempt of warehouses_cutover_history (activated, or blocked with the differences). A warehouse already live, or one that must wait for Floormode's own first-day work, answers { state: 'answered', report } at once. Two steps when the only differences are counts made in Floormode after the import: the blocked attempt says canUseCounts and names countedDigest; call again with that countedDigest to set Shopify to your counts — refused (blocked again, nothing set) when the counted list changed since. Poll warehouses_cutover_history, not this operation. Irreversible: going live cannot be undone.\n\n**Operation id:** `warehouses_go_live` — the same operation is `app.warehouses.go_live({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_go_live`.\n\n**Kind:** mutation — writes in steps the Worker runs after the access check, each committed on its own: a refusal may follow a step that already committed, so read the state before calling again.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "countedDigest": {
                    "default": null,
                    "description": "The countedDigest of the blocked attempt whose counted list you confirm; omit for a plain check.",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/overview-bins": {
      "get": {
        "operationId": "warehouses_overview_bins",
        "summary": "warehouses_overview_bins",
        "description": "A cursor page of active leaf bins in one warehouse with exact on-hand units and unit-capacity utilization. Counts describe this page, not warehouse totals. Unconfigured unit capacity is null; expected inbound never counts as on-hand. An approachSet value means this bin has its own walk-up point; storeyId includes inherited assignments.\n\n**Operation id:** `warehouses_overview_bins` — the same operation is `app.warehouses.overview_bins({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_overview_bins`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 60,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/route-preview": {
      "get": {
        "operationId": "warehouses_route_preview",
        "summary": "warehouses_route_preview",
        "description": "Preview a bounded physically validated walking path or an explicit unresolved route.\n\n**Operation id:** `warehouses_route_preview` — the same operation is `app.warehouses.route_preview({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_route_preview`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "y": {
                      "type": "number",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "storeyId": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  },
                  "required": [
                    "x",
                    "y",
                    "storeyId"
                  ]
                },
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "bin"
                        },
                        "id": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "station"
                        },
                        "id": {
                          "type": "string",
                          "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "y": {
                      "type": "number",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "storeyId": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                      "format": "floormode-id",
                      "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                    }
                  },
                  "required": [
                    "x",
                    "y",
                    "storeyId"
                  ]
                },
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "bin"
                        },
                        "id": {
                          "type": "string",
                          "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "station"
                        },
                        "id": {
                          "type": "string",
                          "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "name": "profile",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "walk",
                "cart"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/set-building": {
      "post": {
        "operationId": "warehouses_building_set",
        "summary": "warehouses_building_set",
        "description": "Replace the building using its expected revision. Changes never alter physical stock.\n\n**Operation id:** `warehouses_building_set` — the same operation is `app.warehouses.building_set({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_building_set`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "building": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "number",
                        "const": 2
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "nextStoreySeq": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      "storeys": {
                        "minItems": 1,
                        "maxItems": 8,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "order": {
                              "type": "integer",
                              "minimum": -100,
                              "maximum": 100
                            },
                            "seq": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "metresPerUnit": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "plan": {
                              "type": "object",
                              "properties": {
                                "version": {
                                  "type": "number",
                                  "const": 1
                                },
                                "gridSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000
                                },
                                "wallThickness": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 200
                                },
                                "floors": {
                                  "maxItems": 500,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "x": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      },
                                      "y": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      },
                                      "w": {
                                        "type": "number",
                                        "exclusiveMinimum": 0,
                                        "maximum": 100000
                                      },
                                      "h": {
                                        "type": "number",
                                        "exclusiveMinimum": 0,
                                        "maximum": 100000
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "x",
                                      "y",
                                      "w",
                                      "h"
                                    ]
                                  }
                                },
                                "walls": {
                                  "maxItems": 500,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "x1": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      },
                                      "y1": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      },
                                      "x2": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      },
                                      "y2": {
                                        "type": "number",
                                        "minimum": -100000,
                                        "maximum": 100000
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "x1",
                                      "y1",
                                      "x2",
                                      "y2"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "version",
                                "gridSize",
                                "wallThickness",
                                "floors",
                                "walls"
                              ]
                            },
                            "fixtures": {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                                  },
                                  "x": {
                                    "type": "number",
                                    "minimum": -100000,
                                    "maximum": 100000
                                  },
                                  "y": {
                                    "type": "number",
                                    "minimum": -100000,
                                    "maximum": 100000
                                  },
                                  "w": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 100000
                                  },
                                  "h": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 100000
                                  }
                                },
                                "required": [
                                  "id",
                                  "x",
                                  "y",
                                  "w",
                                  "h"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "order",
                            "metresPerUnit",
                            "plan",
                            "fixtures"
                          ]
                        }
                      },
                      "connectors": {
                        "maxItems": 32,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "stairs",
                                "lift"
                              ]
                            },
                            "from": {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "number",
                                  "minimum": -100000,
                                  "maximum": 100000
                                },
                                "y": {
                                  "type": "number",
                                  "minimum": -100000,
                                  "maximum": 100000
                                },
                                "storeyId": {
                                  "type": "string",
                                  "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "storeyId"
                              ]
                            },
                            "to": {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "number",
                                  "minimum": -100000,
                                  "maximum": 100000
                                },
                                "y": {
                                  "type": "number",
                                  "minimum": -100000,
                                  "maximum": 100000
                                },
                                "storeyId": {
                                  "type": "string",
                                  "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                                  "format": "floormode-id",
                                  "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "storeyId"
                              ]
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "both",
                                "forward"
                              ]
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "traversalSeconds": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 3600
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "kind",
                            "from",
                            "to",
                            "direction",
                            "enabled",
                            "traversalSeconds"
                          ]
                        }
                      },
                      "placements": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "entity": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "bin"
                                    },
                                    "id": {
                                      "type": "string",
                                      "description": "A bins id, e.g. \"bins_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "station"
                                    },
                                    "id": {
                                      "type": "string",
                                      "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\"."
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id"
                                  ]
                                }
                              ]
                            },
                            "storeyId": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                              "format": "floormode-id",
                              "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                            },
                            "approach": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "x": {
                                      "type": "number",
                                      "minimum": -100000,
                                      "maximum": 100000
                                    },
                                    "y": {
                                      "type": "number",
                                      "minimum": -100000,
                                      "maximum": 100000
                                    }
                                  },
                                  "required": [
                                    "x",
                                    "y"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity",
                            "storeyId",
                            "approach"
                          ]
                        }
                      }
                    },
                    "required": [
                      "version",
                      "revision",
                      "storeys",
                      "connectors",
                      "placements"
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "expectedRevision",
                  "building"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/set-floor-plan": {
      "post": {
        "operationId": "warehouses_set_floor_plan",
        "summary": "warehouses_set_floor_plan",
        "description": "Replace one storey plan using the expected building revision.\n\n**Operation id:** `warehouses_set_floor_plan` — the same operation is `app.warehouses.set_floor_plan({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_set_floor_plan`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "storeyId": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]{1,64}$",
                    "format": "floormode-id",
                    "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "plan": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "number",
                        "const": 1
                      },
                      "gridSize": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 1000
                      },
                      "wallThickness": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 200
                      },
                      "floors": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "x": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            },
                            "y": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            },
                            "w": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "maximum": 100000
                            },
                            "h": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "maximum": 100000
                            }
                          },
                          "required": [
                            "id",
                            "x",
                            "y",
                            "w",
                            "h"
                          ]
                        }
                      },
                      "walls": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "x1": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            },
                            "y1": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            },
                            "x2": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            },
                            "y2": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            }
                          },
                          "required": [
                            "id",
                            "x1",
                            "y1",
                            "x2",
                            "y2"
                          ]
                        }
                      }
                    },
                    "required": [
                      "version",
                      "gridSize",
                      "wallThickness",
                      "floors",
                      "walls"
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "storeyId",
                  "expectedRevision",
                  "plan"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/warehouses/setup": {
      "get": {
        "operationId": "warehouses_setup",
        "summary": "warehouses_setup",
        "description": "One warehouse's setup, detected from its data: its steps (bins, stock, live), the next step, its Shopify location and whether units still sit in the unassigned bin. The warehouse page's setup strip; `setup_status` lists the same for every warehouse in setup.\n\n**Operation id:** `warehouses_setup` — the same operation is `app.warehouses.setup({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_setup`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/warehouses/update": {
      "post": {
        "operationId": "warehouses_update",
        "summary": "warehouses_update",
        "description": "Update name, Shopify location mapping, active flag or settings of a warehouse. `settings.inventoryWriter` turns the Shopify availability push (OMS-032) on for this warehouse — only one system may write a location's inventory, and turning it ON is refused until the warehouse has passed the writer cutover (the 'Go live' verification against live Shopify quantities); turning it OFF demotes the cutover state so re-enabling verifies again. `settings.countCadence` schedules cycle counts by velocity class (off by default); turning it on creates the due counts at once and then daily.\n\n**Operation id:** `warehouses_update` — the same operation is `app.warehouses.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/warehouses_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "warehouses"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "document id of the warehouse.",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shopifyLocationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "floormode-id",
                        "description": "Opaque identifier string — a table-prefixed ULID such as `orders_01ARZ…`, or the channel's own id where the operation says so. Never parse it; pass it back verbatim."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "allowNegative": {
                        "type": "boolean"
                      },
                      "overReceiptTolerancePct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100,
                        "description": "Over-receipt tolerance in percent of the expected quantity (0–100)."
                      },
                      "inventoryWriter": {
                        "description": "Push this warehouse's sellable available to Shopify (default false). Turning it ON is refused until the warehouse has passed the writer cutover (warehouses_applyCutover).",
                        "type": "boolean"
                      },
                      "allowOversell": {
                        "description": "Accept backorders/preorders: a shortfall becomes a backorder (default false).",
                        "type": "boolean"
                      },
                      "trackLots": {
                        "description": "Retired: replaced by each item's tracking mode (variants_set_tracking). Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "putawayStrategy": {
                        "description": "How new stock is placed: \"together\" (next to the same product, else the emptiest bin; the default) or \"spread\" (prefer bins that do not hold the product yet).",
                        "type": "string",
                        "enum": [
                          "together",
                          "spread"
                        ]
                      },
                      "floorConfirm": {
                        "description": "How Floor Mode workers confirm a bin or an item: \"scan\" (a scan or a typed code is required), \"scan_or_tap\" (the default: a device without a scanner may confirm by tapping) or \"tap\" (no scanners: every step has a confirm button, scans still work).",
                        "type": "string",
                        "enum": [
                          "scan",
                          "scan_or_tap",
                          "tap"
                        ]
                      },
                      "codePhotoReader": {
                        "description": "Read codes from a photo (default false, AI lane P-G): when a bin or item barcode can't be scanned, Floor Mode offers \"Take a photo\" and reads the printed code from a crop of the label (not stored). The person confirms the code; it is booked as a typed code (method photo) and held to the same rules, and a product name only identifies.",
                        "type": "boolean"
                      },
                      "countPhoto": {
                        "description": "Count from a photo (default \"off\", AI lane U6): while counting, Floor Mode may photograph the bin (not stored) and a model counts boxes of one item, 1–12. \"check\": the photo only agrees with the count the person entered, or says \"Count by hand\", never a number (a blind count always runs it). \"suggest\": an open count's quantity is filled with the photo's count, never below the expected quantity. A person always books the count.",
                        "type": "string",
                        "enum": [
                          "off",
                          "check",
                          "suggest"
                        ]
                      },
                      "paperPickRecord": {
                        "description": "Paper pick lists are the record (default false): the desk may book a batch walked from a printed list as picked (picking_confirm_as_listed), marked as confirmed on paper.",
                        "type": "boolean"
                      },
                      "fefoEnabled": {
                        "description": "Allocate first-expiring-first-out instead of first-in-first-out (default true). FEFO orders dated lots only; stock without a dated lot keeps the pick route.",
                        "type": "boolean"
                      },
                      "nearExpiryDays": {
                        "description": "How many days ahead a lot counts as near-expiry (1–3650). Defaults to 30.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3650
                      },
                      "qcAtPack": {
                        "description": "Retired: replaced by packChecklist.qc.mode. Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "captureOnFulfill": {
                        "description": "Capture an authorized payment when the order is fulfilled.",
                        "type": "boolean"
                      },
                      "requireLabelBeforeFulfil": {
                        "description": "Retired: replaced by packChecklist.label.mode. Sending it is refused.",
                        "not": {
                          "description": "Any JSON value. This field's zod schema (a transform, a refinement or a custom type) has no exact JSON Schema equivalent, so nothing is asserted about it here — the server still validates it against the operation's own schema and answers 400 with the issue list."
                        }
                      },
                      "packChecklist": {
                        "description": "The pack checklist: the steps a parcel walks at the pack station (photo, weigh, check, label) and how strongly each is asked for. Absent on a new warehouse: the plan of the first warehouse, else Just pack (scan and fulfil).",
                        "type": "object",
                        "properties": {
                          "v": {
                            "type": "number",
                            "const": 1
                          },
                          "preset": {
                            "type": "string",
                            "enum": [
                              "just_pack",
                              "pack_label",
                              "weigh_label",
                              "proof_photo",
                              "custom"
                            ],
                            "description": "Display only: recomputed from the step modes on every save."
                          },
                          "photo": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ]
                              },
                              "retentionDays": {
                                "type": "number",
                                "enum": [
                                  30,
                                  90,
                                  180,
                                  365
                                ],
                                "description": "How many days a pack photo is kept (30, 90, 180 or 365)."
                              },
                              "check": {
                                "description": "\"show\" (also when absent: on by default): Cloudflare Workers AI compares each saved pack photo with the parcel's items and the pack station shows the answer as advice (never a block; sizes and similar variants are not checked). \"off\": no photo is read. A new warehouse starts with the default.",
                                "type": "string",
                                "enum": [
                                  "off",
                                  "show"
                                ]
                              }
                            },
                            "required": [
                              "mode",
                              "retentionDays"
                            ]
                          },
                          "weigh": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ]
                              },
                              "tolerancePct": {
                                "type": "integer",
                                "minimum": 5,
                                "maximum": 50,
                                "description": "How far a weight may be off the expected one, in whole percent (5–50)."
                              },
                              "offPolicy": {
                                "type": "string",
                                "enum": [
                                  "warn",
                                  "lead"
                                ],
                                "description": "What a weight outside the tolerance does: \"warn\" (it is saved and shown)."
                              }
                            },
                            "required": [
                              "mode",
                              "tolerancePct",
                              "offPolicy"
                            ]
                          },
                          "qc": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "required"
                                ]
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          "label": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "optional",
                                  "required"
                                ],
                                "description": "\"required\": no fulfil without a label of the parcel or a tracking number; \"optional\": Fulfil + print buys one when the shipping rules resolve a service, and fulfils without one otherwise; \"off\": the pack station buys none."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          "printOnLastScan": {
                            "description": "Print the label when the last item is scanned, at Floormode's pack stations: the station verifies the parcel and presses Fulfil + print once every required step is met. The scan itself starts nothing (packing_scan_item answers as always). Off when absent.",
                            "type": "boolean"
                          },
                          "sort": {
                            "description": "Sort to orders at the pack station (WMS BN-09): a batch pick's units are scanned at the pack station and each goes to the slot of the order that needs it (packing_sort_scan). Absent: offered for single-item batches, on numbered slots.",
                            "type": "object",
                            "properties": {
                              "offer": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "singles",
                                  "every"
                                ],
                                "description": "\"singles\" (the default): a batch whose orders are one item each; \"every\": every batch pick; \"off\": only when a packer opens it."
                              },
                              "wall": {
                                "description": "The sort wall's slot labels in order (at most 20, 3–12 characters each), each also the code a scan confirms the placement with. Absent: the slots are numbered 1, 2, 3 ….",
                                "minItems": 1,
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 3,
                                  "maxLength": 12
                                }
                              }
                            },
                            "required": [
                              "offer"
                            ]
                          }
                        },
                        "required": [
                          "v",
                          "preset",
                          "photo",
                          "weigh",
                          "qc",
                          "label"
                        ]
                      },
                      "countCadence": {
                        "description": "Scheduled cycle counts by velocity class (default off; A every 7, B every 30, C every 90 days). On, a daily pass creates a count task for every stocked bin whose last approved count is older than its class allows; a bin never counted is due on one day of its class's period, so the first round is spread over it.",
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Create cycle counts on this schedule (default off)."
                          },
                          "days": {
                            "type": "object",
                            "properties": {
                              "A": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              },
                              "B": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              },
                              "C": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 365
                              }
                            },
                            "required": [
                              "A",
                              "B",
                              "C"
                            ],
                            "description": "Days between counts of a bin, per velocity class A, B and C (1 to 365)."
                          }
                        },
                        "required": [
                          "enabled",
                          "days"
                        ]
                      },
                      "countVarianceGuard": {
                        "description": "Which count differences need an explicit acceptance before the approval books them (default 20 % and 0 units): a counted line off by more than pct percent of the expected quantity AND by more than minUnits units. Sent whole.",
                        "type": "object",
                        "properties": {
                          "pct": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "minUnits": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          }
                        },
                        "required": [
                          "pct",
                          "minUnits"
                        ]
                      },
                      "timeZone": {
                        "description": "The warehouse's IANA time zone (e.g. \"America/New_York\"): its days for shifts and the time clock. Required before the time clock or the first shift pattern is switched on.",
                        "type": "string",
                        "maxLength": 64
                      },
                      "timeZoneSource": {
                        "description": "Where timeZone comes from: \"store\" (the home store's time zone, followed when it changes) or \"warehouse\" (stated for this warehouse). Omitted: a timeZone that differs from the stored one is the warehouse's own, an unchanged one keeps its source. \"store\" alone copies the store's current zone; \"store\" with a different timeZone is refused.",
                        "type": "string",
                        "enum": [
                          "store",
                          "warehouse"
                        ]
                      },
                      "unitSystem": {
                        "description": "How this warehouse measures: \"metric\" (g, mm) or \"imperial\" (oz, lb, in). Stored weights and lengths stay in grams and millimetres. Absent on a new warehouse: the home store's (followed, unitSystemSource \"store\"); unknown: metric.",
                        "type": "string",
                        "enum": [
                          "metric",
                          "imperial"
                        ]
                      },
                      "unitSystemSource": {
                        "description": "Where unitSystem comes from: \"store\" (the home store's, followed when it changes) or \"warehouse\" (stated for this warehouse), by the same rule as timeZoneSource.",
                        "type": "string",
                        "enum": [
                          "store",
                          "warehouse"
                        ]
                      },
                      "timeClock": {
                        "description": "The time clock: \"off\" (the default) or \"on\", which needs a timeZone.",
                        "type": "string",
                        "enum": [
                          "off",
                          "on"
                        ]
                      },
                      "gatedFloorActions": {
                        "description": "The floor exceptions that need a lead's PIN in this warehouse. Defaults to all of them.",
                        "maxItems": 9,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "short_line",
                            "mark_damaged",
                            "close_receipt_short",
                            "accept_count_difference",
                            "confirm_without_scan",
                            "move_allocated",
                            "retarget_move",
                            "release_other",
                            "handover_started"
                          ]
                        }
                      },
                      "planArrivals": {
                        "description": "Plan when deliveries arrive and at which dock door (WMS W4a, default off). On: a receipt carries an arrival time, door and reference, and the floor checks a delivery in at its door; receiving never waits for a check-in (the first booking stamps the arrival). Off: receiving_set_arrival and receiving_check_in answer arrivals_off.",
                        "type": "boolean"
                      },
                      "receivingFlow": {
                        "description": "How manual receipts and Logistified purchase orders are received: \"direct\" (the default: straight to a shelf bin), \"dock\" (into DOCK-01, put away later as a floor task) or \"dock_inspect\" (into QC-IN-01 for inspection first). Transfers and finished goods are always received directly. Turning a dock flow on is refused while the warehouse holds a bin of its own coded DOCK-01 or QC-IN-01 (reserved_code_taken).",
                        "type": "string",
                        "enum": [
                          "direct",
                          "dock",
                          "dock_inspect"
                        ]
                      },
                      "crossDock": {
                        "description": "Straight to packing (default false): when a receipt booked straight to a shelf makes a waiting order whole, the order's units go to packing in the same booking instead of waiting on the shelf for a pick (receiving_record_line answers toPacking). Only while the receiving flow is \"direct\"; a dock flow keeps the value and ignores it.",
                        "type": "boolean"
                      },
                      "lotLabelReader": {
                        "description": "Read lot labels from a photo (default false): on the floor's receive screen a lot item's lot field offers a camera button; the label photo is read by Cloudflare Workers AI (not stored) and fills the lot number and its date where they are empty. The booking validates them as always.",
                        "type": "boolean"
                      },
                      "returnGradeBins": {
                        "description": "Where each return grade's units go in this warehouse when the receiver scans no bin (WMS BN-24a): grade key → bin id, e.g. {\"b\": \"<bin id>\"}. A restocking grade names a sellable bin, a grade held from sale a quarantine bin. Absent: B-stock goes to BSTK-01, other held grades to QUAR-01, restocked ones to the suggested bin.",
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "enum": [
                            "a",
                            "b",
                            "g3",
                            "g4",
                            "g5",
                            "g6",
                            "g7",
                            "g8"
                          ]
                        },
                        "additionalProperties": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        }
                      },
                      "purchasePrices": {
                        "description": "The purchase-price warning: when a receipt's cost is applied, each item whose cost lies more than tolerancePct from the price its Logistified purchase order agreed is flagged on the receipt. It warns and never refuses. Absent: warn beyond 5 %.",
                        "type": "object",
                        "properties": {
                          "warn": {
                            "type": "boolean",
                            "description": "Flag a receipt whose applied cost deviates from its PO price (default true)."
                          },
                          "tolerancePct": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "How many percent either way a cost may lie from the PO price (default 5)."
                          }
                        },
                        "required": [
                          "warn",
                          "tolerancePct"
                        ]
                      },
                      "inspection": {
                        "description": "The inspection rules of a dock_inspect warehouse: whether a failed unit needs a photo and the warehouse's own fail reasons. Absent: a photo on every fail, no own reasons.",
                        "type": "object",
                        "properties": {
                          "photoOnFail": {
                            "type": "boolean",
                            "description": "A failed inspection needs a photo of the goods (default true)."
                          },
                          "customReasons": {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9_]{0,39}$",
                                  "description": "The reason's key, stored on the inspection."
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 40
                                }
                              },
                              "required": [
                                "key",
                                "label"
                              ]
                            },
                            "description": "The warehouse's own reasons a unit fails inspection, at most 8."
                          },
                          "reasonAssist": {
                            "description": "The floor suggests why a unit failed from its photo (Cloudflare Workers AI reads it without storing it; the inspection photo itself is kept as evidence per photoOnFail, which this needs). Default false.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "photoOnFail",
                          "customReasons"
                        ]
                      },
                      "dispatch": {
                        "description": "The packing calendar delivery dates count in (when they are on): how many packing days before the customer's delivery day an order is packed, the days of the week this warehouse packs on and the days it is closed. Defaults to 1 day before, Monday to Friday, no closed days.",
                        "type": "object",
                        "properties": {
                          "packDaysBefore": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 7,
                            "description": "Packing days before the delivery day (0–7); 0 packs on the delivery day itself."
                          },
                          "packingWeekdays": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "number",
                              "enum": [
                                1,
                                2,
                                3,
                                4,
                                5,
                                6,
                                7
                              ]
                            },
                            "description": "The ISO days of the week this warehouse packs on, 1 = Monday … 7 = Sunday."
                          },
                          "closedDays": {
                            "maxItems": 60,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "description": "Days (YYYY-MM-DD) the warehouse does not pack although the weekday says so; at most 60."
                          }
                        },
                        "required": [
                          "packDaysBefore",
                          "packingWeekdays",
                          "closedDays"
                        ]
                      },
                      "collectionLeadMinutes": {
                        "description": "Orders in by this many minutes before each collection (WMS BN-15a, 0..720; absent = 0): an order that arrives later is scheduled for the next collection. An order-admission buffer, never a second truck time; the collection times themselves are collection_times_save's.",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 720
                      },
                      "routePolicy": {
                        "description": "How pick lists walk (B9, default \"walk\"): \"walk\" = the Layout list's order; \"map\" = a pick list (or, with pick classes, each class of it) whose bins all have an accepted walk point walks them nearest first, storey by storey, any other the Layout list. \"map\" is refused until the warehouse has an accepted walk point (locations_walk_points_accept). Counts and putaway walk the Layout list either way.",
                        "type": "string",
                        "enum": [
                          "walk",
                          "map"
                        ]
                      },
                      "pickOnPackDay": {
                        "description": "Picking waits for the pack day (default false): while delivery dates are on, an order with a requested delivery day is not ready to pick in this warehouse before its pack day, unless someone let it through early (orders_set_pick_early).",
                        "type": "boolean"
                      },
                      "returnLabelReader": {
                        "description": "Read return labels with the camera (default true, owner 2026-11-09): when a returns parcel's barcode can't be read, Cloudflare Workers AI reads the tracking number from a photo of the barcode area; false turns it off for this warehouse.",
                        "type": "boolean"
                      },
                      "useCarts": {
                        "description": "Carts and totes with a code (default false): a picker scans a cart or tote to start a pick list sized by it (carts_list), a cart's slot scan books each pick, and the cart's scan hands the list over. Off stops new cart starts; lists already on a cart finish.",
                        "type": "boolean"
                      },
                      "eventCounts": {
                        "description": "Event counts (default true): a short pick, a move whose source bin was empty, or a planned bin the floor reports full opens a count of that bin in the same write (countTasks.trigger), unless the bin is already in a count that is not finished.",
                        "type": "boolean"
                      },
                      "askBinEmpty": {
                        "description": "Ask whether a bin is empty (default false): when a pick leaves a bin with nothing in it, picking_record_pick answers binEmptied and the floor asks; a no opens a count (counts_report_bin_not_empty).",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "allowNegative",
                      "overReceiptTolerancePct"
                    ]
                  },
                  "latitude": {
                    "description": "Geo latitude for distributed order routing (OMS-078); null clears it.",
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "longitude": {
                    "description": "Geo longitude for distributed order routing (OMS-078); null clears it.",
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves": {
      "get": {
        "operationId": "waves_list",
        "summary": "waves_list",
        "description": "Waves, a disclosed page at a time (`rows`/`capped`/`cursor`, max 100), newest first (`created:desc`, the default) or oldest first, each with its attached orders and their planned units. Filters are server predicates: `warehouseId` (the scope) and `statuses` (any of planned, released, closed). `plannedCount` is the scope's exact planned total on page one. Breaking since 2026-10-07: the former single-valued `status` is refused; pass `statuses: [\"planned\"]`.\n\n**Operation id:** `waves_list` — the same operation is `app.waves.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "Only this warehouse's waves; absent = every warehouse.",
            "schema": {
              "description": "Only this warehouse's waves; absent = every warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "description": "Any of planned, released, closed; absent = every status. Repeat `statuses` for each value (`?statuses=planned&statuses=released`), or pass a JSON array (`?statuses=[\"planned\",\"released\"]`).",
            "style": "form",
            "explode": true,
            "example": [
              "planned",
              "released"
            ],
            "schema": {
              "description": "Any of planned, released, closed; absent = every status.",
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "planned",
                  "released",
                  "closed"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
            "schema": {
              "description": "`created:desc` (newest first, the default) or `created:asc` (oldest first).",
              "type": "string",
              "enum": [
                "created:desc",
                "created:asc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the previous page.",
            "schema": {
              "description": "Opaque cursor returned by the previous page.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Waves per page (max 100).",
            "schema": {
              "description": "Waves per page (max 100).",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "waves_create",
        "summary": "waves_create",
        "description": "Create a planned wave in a warehouse. `cutoffAt` (epoch ms, in the future) is the carrier cutoff: the wave goes to picking by itself at that instant if it is still planned, through the same release rules as waves_release (plan allowance included; a refusal stays on the wave's timeline and the wave stays planned). carrierFilter is advisory planning metadata. The wave starts `planned` — its tasks are held out of the claimable pool until it is released.\n\n**Operation id:** `waves_create` — the same operation is `app.waves.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cutoffAt": {
                    "description": "Epoch ms the wave goes to picking by itself; must be in the future.",
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carrierFilter": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "warehouseId",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/assign": {
      "post": {
        "operationId": "waves_assign",
        "summary": "waves_assign",
        "description": "Attach pickable fulfillment orders to a wave: a HELD pick task per FO, carrying the wave id, kept out of the claimable pool until release (WHT-015). Idempotent per allocation and only for pickable FOs (short/held/already-in-pick are skipped). An FO that already has an unclaimed pick task (continuous release) has that task attached to the wave instead — counted as `attached`, not `created`. Returns created/attached/skipped counts (`waveFull` of the skipped: the wave already holds its task bound) and the affected task ids; the skipped FO ids are on the wave timeline.\n\n**Operation id:** `waves_assign` — the same operation is `app.waves.assign({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_assign`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "waveId": {
                    "type": "string",
                    "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "foDocIds": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A fulfillmentOrders id, e.g. \"fulfillmentOrders_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    },
                    "description": "document ids of the fulfillment orders (max 200)."
                  }
                },
                "required": [
                  "waveId",
                  "foDocIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/close": {
      "post": {
        "operationId": "waves_close",
        "summary": "waves_close",
        "description": "Close a wave: no more work is pulled into it, and every task it still held that is not done or cancelled is unlinked (waveId cleared) and becomes continuous work — a closed wave holds nothing back. Order admission runs first for the affected tasks. Closing an already closed wave repairs anything left held and answers `unlinkedTasks: 0` when nothing was.\n\n**Operation id:** `waves_close` — the same operation is `app.waves.close({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_close`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "waveId": {
                    "type": "string",
                    "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "waveId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/cutoff": {
      "post": {
        "operationId": "waves_set_cutoff",
        "summary": "waves_set_cutoff",
        "description": "Move or clear the automatic release of a planned wave. `cutoffAt` (epoch ms, in the future) arms the release for that instant; null clears it, and the wave then waits for waves_release. Refused once the wave was released or closed.\n\n**Operation id:** `waves_set_cutoff` — the same operation is `app.waves.set_cutoff({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_set_cutoff`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "waveId": {
                    "type": "string",
                    "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "cutoffAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Epoch ms the wave goes to picking by itself; null for none."
                  }
                },
                "required": [
                  "waveId",
                  "cutoffAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/delete": {
      "post": {
        "operationId": "waves_delete",
        "summary": "waves_delete",
        "description": "Delete a wave. Its tasks are unlinked (waveId cleared) rather than cancelled — a held task becomes continuous (claimable), a worked task keeps its history. Returns the number of tasks unlinked.\n\n**Operation id:** `waves_delete` — the same operation is `app.waves.delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "waveId": {
                    "type": "string",
                    "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "waveId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/get": {
      "get": {
        "operationId": "waves_get",
        "summary": "waves_get",
        "description": "Get one wave with its task count and open-task count, or null when unknown.\n\n**Operation id:** `waves_get` — the same operation is `app.waves.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "waveId",
            "in": "query",
            "required": true,
            "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/waves/release": {
      "post": {
        "operationId": "waves_release",
        "summary": "waves_release",
        "description": "Release a wave: its held tasks become claimable. Returns the wave status and the number of tasks in the wave. Idempotent; rejected once the wave is closed.\n\n**Operation id:** `waves_release` — the same operation is `app.waves.release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "waveId": {
                    "type": "string",
                    "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "waveId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/waves/tasks": {
      "get": {
        "operationId": "waves_tasks",
        "summary": "waves_tasks",
        "description": "The tasks belonging to a wave (bounded).\n\n**Operation id:** `waves_tasks` — the same operation is `app.waves.tasks({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/waves_tasks`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "waves"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "waveId",
            "in": "query",
            "required": true,
            "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A waves id, e.g. \"waves_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "webhook_subscriptions_list",
        "summary": "webhook_subscriptions_list",
        "description": "List the outgoing webhook endpoints (at most 10): address, events, filters, the switch and why Floormode switched it off, whether a signing secret is set and the previous one's overlap, the last attempt, whether events are owed, the parked events and the oldest event still kept. The secret itself is never returned.\n\n**Operation id:** `webhook_subscriptions_list` — the same operation is `app.webhook.subscriptions_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "webhook_subscriptions_create",
        "summary": "webhook_subscriptions_create",
        "description": "Register an HTTPS endpoint for the given events, optionally only for some warehouses, stores or alert types. The address must be public (https on the standard port, no private, local or loopback hosts, no credentials). Answers the endpoint and its signing secret (`whsec_…`, Standard Webhooks); the secret is shown in this answer only. The endpoint receives events published from now on.\n\n**Operation id:** `webhook_subscriptions_create` — the same operation is `app.webhook.subscriptions_create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 49,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "shipment.label_purchased",
                        "pack_job.completed",
                        "order.fulfilled",
                        "shipment.delivered",
                        "shipment.exception_reported",
                        "count.variance_found",
                        "hold.applied",
                        "lot.blocked",
                        "lot.unblocked",
                        "order.address_changed",
                        "return.requested",
                        "return.received",
                        "order.created",
                        "order.allocated",
                        "order.completed",
                        "shipment.label_voided",
                        "shipment.transit_started",
                        "alert.raised",
                        "alert.resolved",
                        "automation.rule_matched",
                        "order.deadline_missed",
                        "order.warehouse_assigned",
                        "order.deallocated",
                        "order.backordered",
                        "order.backorder_resolved",
                        "order.cancelled",
                        "hold.released",
                        "wave.released",
                        "wave.closed",
                        "pick_batch.started",
                        "pick_batch.completed",
                        "pick_line.shorted",
                        "manifest.closed",
                        "receipt.completed",
                        "receipt.cancelled",
                        "count.approved",
                        "stocktake.signed_off",
                        "stock.adjusted",
                        "stock.on_hand_changed",
                        "adjustment_request.submitted",
                        "bin.blocked",
                        "bin.unblocked",
                        "lot.expired",
                        "return.approved",
                        "return.denied",
                        "return.refunded",
                        "transfer.started",
                        "transfer.completed",
                        "replenishment.completed"
                      ]
                    }
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "warehouseIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "storeIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "alertTypes": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "automation_rule",
                            "backorder",
                            "backorder_restocked",
                            "barcode_aliases_refused",
                            "checkout_options_cap_reached",
                            "count_variance",
                            "external_fulfillment_unbooked",
                            "fo_close_deferred",
                            "fulfillment_cancel_restocked",
                            "handback_overdue",
                            "integration_key_reuse",
                            "inventory_writer_drift",
                            "inventory_writer_drift_cleared",
                            "inventory_writer_gap",
                            "landed_cost_refused",
                            "local_snapshot_skipped",
                            "lot_blocked",
                            "lot_expiry_tightened",
                            "near_expiry",
                            "order_action_attention",
                            "order_edit_mirror_refresh_dead",
                            "order_refresh_dead",
                            "oversell_risk",
                            "pack_ship_skipped",
                            "packaging_short",
                            "payment_auth_window",
                            "peer_capability_revoked",
                            "peer_reachable",
                            "peer_unreachable",
                            "pick_lines_dropped",
                            "pick_release_skipped",
                            "po_push_confirmation_overflow",
                            "receipt_price_deviation",
                            "refund_failure",
                            "refund_restock_unreceived",
                            "refund_stock_unbooked",
                            "reorder_suggested",
                            "return_label_unprintable",
                            "shipment_weight_estimated",
                            "sibling_report_refused",
                            "sla_breach",
                            "source_lines_exceeded",
                            "station_supply_unrefillable",
                            "stock_release_clamped",
                            "sync_failure",
                            "token_refresh_refused",
                            "token_refresh_unresolved",
                            "transfer_source_effect_refused",
                            "wave_auto_release_refused",
                            "webhook_endpoint_off"
                          ]
                        }
                      }
                    }
                  }
                },
                "required": [
                  "url",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/delete": {
      "post": {
        "operationId": "webhook_subscriptions_delete",
        "summary": "webhook_subscriptions_delete",
        "description": "Delete an endpoint: nothing more is sent to it, its owed events are dropped, its failure records leave with their 30 days.\n\n**Operation id:** `webhook_subscriptions_delete` — the same operation is `app.webhook.subscriptions_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "subscriptionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/deliveries": {
      "get": {
        "operationId": "webhook_deliveries_list",
        "summary": "webhook_deliveries_list",
        "description": "One endpoint's deliveries, newest first: each event of the log it subscribed to (pending, retrying, delivered or failed, with the last HTTP status, duration and attempts), the periods the log lost before they were delivered, and its newest samples. Response bodies are never stored. A page reads at most 5,000 log rows: `capped` says it stopped early, `cursor` continues further back.\n\n**Operation id:** `webhook_deliveries_list` — the same operation is `app.webhook.deliveries_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_deliveries_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "query",
            "required": true,
            "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "retrying",
                "delivered",
                "failed",
                "gap"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/webhooks/deliveries/resend": {
      "post": {
        "operationId": "webhook_deliveries_resend",
        "summary": "webhook_deliveries_resend",
        "description": "Send a failed delivery again with the same body and id (receivers deduplicate on `webhook-id`), for 30 days after it failed. Refused unless the endpoint is on and has a secret.\n\n**Operation id:** `webhook_deliveries_resend` — the same operation is `app.webhook.deliveries_resend({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_deliveries_resend`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deliveryId": {
                    "type": "string",
                    "description": "A webhookDeliveries id, e.g. \"webhookDeliveries_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "deliveryId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/get": {
      "get": {
        "operationId": "webhook_subscriptions_get",
        "summary": "webhook_subscriptions_get",
        "description": "One webhook endpoint, as webhook_subscriptions_list answers each.\n\n**Operation id:** `webhook_subscriptions_get` — the same operation is `app.webhook.subscriptions_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "query",
            "required": true,
            "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/webhooks/pause": {
      "post": {
        "operationId": "webhook_subscriptions_pause",
        "summary": "webhook_subscriptions_pause",
        "description": "Switch an endpoint off. Nothing is sent while it is off; switching it on asks where to start (webhook_subscriptions_resume).\n\n**Operation id:** `webhook_subscriptions_pause` — the same operation is `app.webhook.subscriptions_pause({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_pause`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "subscriptionId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/replay": {
      "post": {
        "operationId": "webhook_subscriptions_replay",
        "summary": "webhook_subscriptions_replay",
        "description": "Send an endpoint every matching event again from `fromMs` on, oldest first, with the same ids (receivers deduplicate on `webhook-id`). The log keeps 5 days: an older `fromMs` starts at the oldest kept event, and the answer says so.\n\n**Operation id:** `webhook_subscriptions_replay` — the same operation is `app.webhook.subscriptions_replay({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_replay`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "fromMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "subscriptionId",
                  "fromMs"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/resume": {
      "post": {
        "operationId": "webhook_subscriptions_resume",
        "summary": "webhook_subscriptions_resume",
        "description": "Switch an endpoint on, after the merchant or Floormode switched it off. `from: now` sends only new events; `from: kept` first sends every matching event the log still keeps (5 days) after where the endpoint stopped, oldest first. Its failure count starts over.\n\n**Operation id:** `webhook_subscriptions_resume` — the same operation is `app.webhook.subscriptions_resume({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_resume`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "from": {
                    "type": "string",
                    "enum": [
                      "now",
                      "kept"
                    ]
                  }
                },
                "required": [
                  "subscriptionId",
                  "from"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/rotate-secret": {
      "post": {
        "operationId": "webhook_subscriptions_rotate_secret",
        "summary": "webhook_subscriptions_rotate_secret",
        "description": "Make a new signing secret, shown in this answer only. For 24 hours every request carries both signatures, so a receiver can switch over; a second rotation inside that overlap is refused unless `dropPrevious` stops the oldest secret at once.\n\n**Operation id:** `webhook_subscriptions_rotate_secret` — the same operation is `app.webhook.subscriptions_rotate_secret({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_rotate_secret`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "dropPrevious": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "subscriptionId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/test": {
      "post": {
        "operationId": "webhook_subscriptions_test",
        "summary": "webhook_subscriptions_test",
        "description": "Send a sample to an endpoint that is on: the catalogue's sample of `event` with `\"test\": true`, or a `webhook.test` body when no event is named. Answers the delivery id; its outcome is in webhook_deliveries_list's `samples`.\n\n**Operation id:** `webhook_subscriptions_test` — the same operation is `app.webhook.subscriptions_test({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_test`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "shipment.label_purchased",
                      "pack_job.completed",
                      "order.fulfilled",
                      "shipment.delivered",
                      "shipment.exception_reported",
                      "count.variance_found",
                      "hold.applied",
                      "lot.blocked",
                      "lot.unblocked",
                      "order.address_changed",
                      "return.requested",
                      "return.received",
                      "order.created",
                      "order.allocated",
                      "order.completed",
                      "shipment.label_voided",
                      "shipment.transit_started",
                      "alert.raised",
                      "alert.resolved",
                      "automation.rule_matched",
                      "order.deadline_missed",
                      "order.warehouse_assigned",
                      "order.deallocated",
                      "order.backordered",
                      "order.backorder_resolved",
                      "order.cancelled",
                      "hold.released",
                      "wave.released",
                      "wave.closed",
                      "pick_batch.started",
                      "pick_batch.completed",
                      "pick_line.shorted",
                      "manifest.closed",
                      "receipt.completed",
                      "receipt.cancelled",
                      "count.approved",
                      "stocktake.signed_off",
                      "stock.adjusted",
                      "stock.on_hand_changed",
                      "adjustment_request.submitted",
                      "bin.blocked",
                      "bin.unblocked",
                      "lot.expired",
                      "return.approved",
                      "return.denied",
                      "return.refunded",
                      "transfer.started",
                      "transfer.completed",
                      "replenishment.completed"
                    ]
                  }
                },
                "required": [
                  "subscriptionId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/webhooks/update": {
      "post": {
        "operationId": "webhook_subscriptions_update",
        "summary": "webhook_subscriptions_update",
        "description": "Change an endpoint's address, events or filters. A new address is checked like a new endpoint. New events or filters start the endpoint at the newest event: older events are never judged by the new ones (use webhook_subscriptions_replay for them).\n\n**Operation id:** `webhook_subscriptions_update` — the same operation is `app.webhook.subscriptions_update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/webhook_subscriptions_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "webhooks"
        ],
        "x-topic": "integrations",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "description": "A webhookSubscriptions id, e.g. \"webhookSubscriptions_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 49,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "shipment.label_purchased",
                        "pack_job.completed",
                        "order.fulfilled",
                        "shipment.delivered",
                        "shipment.exception_reported",
                        "count.variance_found",
                        "hold.applied",
                        "lot.blocked",
                        "lot.unblocked",
                        "order.address_changed",
                        "return.requested",
                        "return.received",
                        "order.created",
                        "order.allocated",
                        "order.completed",
                        "shipment.label_voided",
                        "shipment.transit_started",
                        "alert.raised",
                        "alert.resolved",
                        "automation.rule_matched",
                        "order.deadline_missed",
                        "order.warehouse_assigned",
                        "order.deallocated",
                        "order.backordered",
                        "order.backorder_resolved",
                        "order.cancelled",
                        "hold.released",
                        "wave.released",
                        "wave.closed",
                        "pick_batch.started",
                        "pick_batch.completed",
                        "pick_line.shorted",
                        "manifest.closed",
                        "receipt.completed",
                        "receipt.cancelled",
                        "count.approved",
                        "stocktake.signed_off",
                        "stock.adjusted",
                        "stock.on_hand_changed",
                        "adjustment_request.submitted",
                        "bin.blocked",
                        "bin.unblocked",
                        "lot.expired",
                        "return.approved",
                        "return.denied",
                        "return.refunded",
                        "transfer.started",
                        "transfer.completed",
                        "replenishment.completed"
                      ]
                    }
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "warehouseIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "storeIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A channelInstallations id, e.g. \"channelInstallations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                          "format": "floormode-id"
                        }
                      },
                      "alertTypes": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "automation_rule",
                            "backorder",
                            "backorder_restocked",
                            "barcode_aliases_refused",
                            "checkout_options_cap_reached",
                            "count_variance",
                            "external_fulfillment_unbooked",
                            "fo_close_deferred",
                            "fulfillment_cancel_restocked",
                            "handback_overdue",
                            "integration_key_reuse",
                            "inventory_writer_drift",
                            "inventory_writer_drift_cleared",
                            "inventory_writer_gap",
                            "landed_cost_refused",
                            "local_snapshot_skipped",
                            "lot_blocked",
                            "lot_expiry_tightened",
                            "near_expiry",
                            "order_action_attention",
                            "order_edit_mirror_refresh_dead",
                            "order_refresh_dead",
                            "oversell_risk",
                            "pack_ship_skipped",
                            "packaging_short",
                            "payment_auth_window",
                            "peer_capability_revoked",
                            "peer_reachable",
                            "peer_unreachable",
                            "pick_lines_dropped",
                            "pick_release_skipped",
                            "po_push_confirmation_overflow",
                            "receipt_price_deviation",
                            "refund_failure",
                            "refund_restock_unreceived",
                            "refund_stock_unbooked",
                            "reorder_suggested",
                            "return_label_unprintable",
                            "shipment_weight_estimated",
                            "sibling_report_refused",
                            "sla_breach",
                            "source_lines_exceeded",
                            "station_supply_unrefillable",
                            "stock_release_clamped",
                            "sync_failure",
                            "token_refresh_refused",
                            "token_refresh_unresolved",
                            "transfer_source_effect_refused",
                            "wave_auto_release_refused",
                            "webhook_endpoint_off"
                          ]
                        }
                      }
                    }
                  }
                },
                "required": [
                  "subscriptionId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/work/assign": {
      "post": {
        "operationId": "work_assign",
        "summary": "work_assign",
        "description": "Give a piece of floor work to a person, or take it yourself — the one assignment door (people Round 6). `ref` names the work: a task, a pickBatch, a countTask or a receipt (a packJob is taken by scanning it at a pack station, never handed out: pack_job_self_only). personId is a person (people_list). Taking unassigned work for yourself needs the work type's floor permission; giving it to anyone else, or taking work someone holds, needs fulfillment.assign, and started work also `force` (it starts over with its new holder). The person must be active, have the work's warehouse, and their role (narrowed by their worker profile's canDo) must do the work type: refused not_eligible with details.reason inactive | warehouse | task_type. Finished or cancelled work is work_closed; started work without force is already_started. Replaces tasks_assign, tasks_reassign and tasks_release.\n\n**Operation id:** `work_assign` — the same operation is `app.work.assign({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/work_assign`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "work"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "task",
                          "pickBatch",
                          "packJob",
                          "countTask",
                          "receipt"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ]
                  },
                  "personId": {
                    "description": "The person (people_list); omitted = the caller (Take).",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "force": {
                    "description": "Also move started work (fulfillment.assign).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "ref"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/work/release": {
      "post": {
        "operationId": "work_release",
        "summary": "work_release",
        "description": "Put a piece of floor work back in the pool (people Round 6). Your own unstarted work goes back under its floor permission; anyone else's, started work, or a pack job needs fulfillment.assign. On a floor device, releasing someone else's work is a gated floor exception (release_other) that takes a lead's approvalId.\n\n**Operation id:** `work_release` — the same operation is `app.work.release({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/work_release`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "work"
        ],
        "x-topic": "fulfillment",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "task",
                          "pickBatch",
                          "packJob",
                          "countTask",
                          "receipt"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ]
                  },
                  "approvalId": {
                    "description": "A lead's single-use grant for release_other (a floor device).",
                    "type": "string",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "ref"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/worker-profiles": {
      "get": {
        "operationId": "worker_profiles_list",
        "summary": "worker_profiles_list",
        "description": "List the worker profiles of a warehouse (max 200): each binds a person (userId) to their assigned zones, home station, the task types they can do and their skill tags. This is what the auto-assignment filters the claimable pool by. Inactive hidden unless includeInactive. pickDefault is the person's default pick profile and lock as the floor applies them now: null and unlocked once the profile is archived, or while the plan does not allow it (lockPaused: plan).\n\n**Operation id:** `worker_profiles_list` — the same operation is `app.worker.profiles_list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/worker_profiles_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "worker-profiles"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "worker_profiles_upsert",
        "summary": "worker_profiles_upsert",
        "description": "Create or replace a worker's profile in a warehouse (idempotent on tenant + userId + warehouse). userId defaults to the calling user. assignedZoneIds and assignedStationId must belong to the warehouse; canDo is the task types (receive, putaway, pick, pack, count, replenish, move); skills are free-form tags. pickProfileId is the person's default pick profile here (a live profile of this warehouse, null for any; an archived one is refused) and pickProfileLocked keeps them to it on the floor (it needs a default; clearing the default clears it). Omitted fields keep their stored value on an update. userId must be an active person (people_list), else not_found. A person kept to listed warehouses is never given a warehouse here (warehouse_not_granted: people_update gives warehouses); nobody changes their own canDo (own_role_or_scope); a task type needs the floor permission the caller holds (exceeds_own_permissions).\n\n**Operation id:** `worker_profiles_upsert` — the same operation is `app.worker.profiles_upsert({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/worker_profiles_upsert`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "worker-profiles"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "userId": {
                    "description": "The person (people_list); defaults to the calling user.",
                    "type": "string",
                    "format": "floormode-id"
                  },
                  "assignedZoneIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                      "format": "floormode-id"
                    }
                  },
                  "assignedStationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "canDo": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "receive",
                        "putaway",
                        "pick",
                        "pack",
                        "count",
                        "replenish",
                        "move"
                      ]
                    }
                  },
                  "skills": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "pickProfileId": {
                    "description": "document id of the pick profile.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A pickProfiles id, e.g. \"pickProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pickProfileLocked": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/worker-profiles/delete": {
      "post": {
        "operationId": "worker_profiles_delete",
        "summary": "worker_profiles_delete",
        "description": "Delete a worker profile by document id.\n\n**Operation id:** `worker_profiles_delete` — the same operation is `app.worker.profiles_delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/worker_profiles_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "worker-profiles"
        ],
        "x-topic": "people",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workerProfileId": {
                    "type": "string",
                    "description": "A workerProfiles id, e.g. \"workerProfiles_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "workerProfileId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/worker-profiles/get": {
      "get": {
        "operationId": "worker_profiles_get",
        "summary": "worker_profiles_get",
        "description": "Get the profile of one worker in a warehouse. userId defaults to the calling user, so a worker can read their own assignment. Returns null when no profile exists. pickDefault is the default pick profile and lock as the floor applies them now.\n\n**Operation id:** `worker_profiles_get` — the same operation is `app.worker.profiles_get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/worker_profiles_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "worker-profiles"
        ],
        "x-topic": "people",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
            "schema": {
              "type": "string",
              "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
              "format": "floormode-id"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "description": "Defaults to the calling user.",
            "schema": {
              "description": "Defaults to the calling user.",
              "type": "string",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/zones": {
      "get": {
        "operationId": "zones_list",
        "summary": "zones_list",
        "description": "List a warehouse's zones (max 200), the organizational grouping over locations. Each zone has a code, name, optional default station (routing depot), optional storage attributes (temperature, hazmat, secure) and its active flag. Filter by warehouse; inactive zones are hidden unless includeInactive.\n\n**Operation id:** `zones_list` — the same operation is `app.zones.list({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_list`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": false,
            "description": "document id of the warehouse.",
            "schema": {
              "description": "document id of the warehouse.",
              "type": "string",
              "format": "floormode-id"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "required": false,
            "description": "Accepted spellings: `true`, `false`, `1`, `0`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "operationId": "zones_create",
        "summary": "zones_create",
        "description": "Create a zone in a warehouse. The code is uppercased and must be unique in the warehouse; name defaults to the code. Optionally set a default station (the routing depot for tours through the zone) and storage attributes (temperature, hazmat, secure).\n\n**Operation id:** `zones_create` — the same operation is `app.zones.create({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_create`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouseId": {
                    "type": "string",
                    "description": "A warehouses id, e.g. \"warehouses_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "defaultStationId": {
                    "description": "document id of a station.",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "temperature": {
                    "type": "string",
                    "enum": [
                      "ambient",
                      "chilled",
                      "frozen"
                    ]
                  },
                  "hazmat": {
                    "type": "boolean"
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "active": {
                    "description": "Defaults to true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "warehouseId",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/zones/assign-bin": {
      "post": {
        "operationId": "zones_assign_bin",
        "summary": "zones_assign_bin",
        "description": "Link a location to a zone (zoneId null clears the link). Keeps the location's free-string zone in sync with the zone's code so the serpentine / coordinate routing groups the leaf by that code — no change to the routing signature.\n\n**Operation id:** `zones_assign_bin` — the same operation is `app.zones.assign_bin({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_assign_bin`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "binId": {
                    "type": "string",
                    "description": "document id of the location (bin) node.",
                    "format": "floormode-id"
                  },
                  "zoneId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "document id of the zone, or null to clear."
                  }
                },
                "required": [
                  "binId",
                  "zoneId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/zones/delete": {
      "post": {
        "operationId": "zones_delete",
        "summary": "zones_delete",
        "description": "Delete a zone. Locations pointing at it are unlinked first (bounded scan); their free-string zone is left untouched so routing keeps grouping them unchanged.\n\n**Operation id:** `zones_delete` — the same operation is `app.zones.delete({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_delete`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "x-irreversible": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zoneId": {
                    "type": "string",
                    "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  }
                },
                "required": [
                  "zoneId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Floormode-Confirm",
            "in": "header",
            "required": false,
            "description": "The `confirmation.token` a 428 answered for this same call, once the person agreed. It runs the call once, within 5 minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "428": {
            "$ref": "#/components/responses/ConfirmationRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    },
    "/api/v1/zones/get": {
      "get": {
        "operationId": "zones_get",
        "summary": "zones_get",
        "description": "Get one zone by document id, or null when unknown.\n\n**Operation id:** `zones_get` — the same operation is `app.zones.get({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_get`.\n\n**Kind:** query — reads only, safe to retry.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "query",
        "parameters": [
          {
            "name": "zoneId",
            "in": "query",
            "required": true,
            "description": "document id of the zone.",
            "schema": {
              "type": "string",
              "description": "document id of the zone.",
              "format": "floormode-id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/zones/update": {
      "post": {
        "operationId": "zones_update",
        "summary": "zones_update",
        "description": "Update a zone: name, code (re-uppercased, must stay unique), default station (null clears), storage attributes (temperature/hazmat/secure — null clears) and the active flag. Only the fields you pass change.\n\n**Operation id:** `zones_update` — the same operation is `app.zones.update({…})` inside the MCP `execute` code-mode surface (the first `_` becomes the dot) and the SPA's `POST /api/rpc/zones_update`.\n\n**Kind:** mutation — writes; one atomic transaction.\n\n**Minimum plan:** none (every plan, also before a plan is chosen).",
        "tags": [
          "zones"
        ],
        "x-topic": "layout",
        "x-operation-kind": "mutation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zoneId": {
                    "type": "string",
                    "description": "A zones id, e.g. \"zones_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                    "format": "floormode-id"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "defaultStationId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "A stations id, e.g. \"stations_01ARZ3NDEKTSV4RRFFQ69G5FAV\".",
                        "format": "floormode-id"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "temperature": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ambient",
                          "chilled",
                          "frozen"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hazmat": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "secure": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "zoneId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded. The result is under `data`; its shape is the operation's own return value (see the description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "507": {
            "$ref": "#/components/responses/InsufficientStorage"
          }
        }
      }
    }
  },
  "webhooks": {
    "shipment.label_purchased": {
      "post": {
        "summary": "Label bought",
        "description": "A shipping label was bought for a parcel. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.label_purchased"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "service": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cost": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "shipmentId",
                          "shipment",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "service",
                          "trackingNumber",
                          "cost",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.label_purchased"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "shipmentId",
                          "shipment",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "pack_job.completed": {
      "post": {
        "summary": "Packing finished",
        "description": "A packer finished a parcel. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "pack_job.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "packJobId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "packJob": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "packingDetails": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unit": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "line": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "key": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value",
                                "unit",
                                "line",
                                "key"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "packingDetailsCapped": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "packJobId",
                          "packJob",
                          "trackingNumber",
                          "packingDetails",
                          "packingDetailsCapped"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "pack_job.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "packJobId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "packJob": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "packJobId",
                          "packJob",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.fulfilled": {
      "post": {
        "summary": "Order fulfilled",
        "description": "Shopify confirmed the fulfillment Floormode created for one parcel. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.fulfilled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "packJobId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "packJob": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyFulfillmentId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "packJobId",
                          "packJob",
                          "trackingNumber",
                          "shopifyFulfillmentId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.fulfilled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "packJobId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "packJob": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "packJobId",
                          "packJob",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "shipment.delivered": {
      "post": {
        "summary": "Parcel delivered",
        "description": "The carrier delivered a parcel. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.delivered"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "service": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "shipmentId",
                          "shipment",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "service",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.delivered"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "shipmentId",
                          "shipment",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "shipment.exception_reported": {
      "post": {
        "summary": "Delivery problem",
        "description": "The carrier reported a delivery problem: an exception, a failed attempt or a return to sender. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.exception_reported"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "service": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "trackingStatus": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "exception",
                                  "failed_attempt",
                                  "return_to_sender"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "exceptionAtMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "shipmentId",
                          "shipment",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "service",
                          "trackingNumber",
                          "trackingStatus",
                          "exceptionAtMs"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.exception_reported"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "shipmentId",
                          "shipment",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "count.variance_found": {
      "post": {
        "summary": "Count found a difference",
        "description": "A stock count found quantities that differ from what was expected. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "count.variance_found"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "countTaskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "count": {
                            "type": "string"
                          },
                          "countedLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "varianceLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "varianceUnits": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "countTaskId",
                          "count",
                          "countedLines",
                          "varianceLines",
                          "varianceUnits"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "count.variance_found"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "countTaskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "count": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "countTaskId",
                          "count",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "hold.applied": {
      "post": {
        "summary": "Order put on hold",
        "description": "Floormode put an order on hold in Shopify. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "hold.applied"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "holdId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "hold": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "payment_pending",
                              "fraud_risk",
                              "address_issue",
                              "awaiting_stock",
                              "awaiting_production",
                              "awaiting_supplier",
                              "customer_request",
                              "other"
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "holdId",
                          "hold",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "hold.applied"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "holdId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "hold": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "holdId",
                          "hold",
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "lot.blocked": {
      "post": {
        "summary": "Lot blocked",
        "description": "A lot was blocked: nothing from it is picked or sold. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.blocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "recall",
                                  "quality_hold",
                                  "supplier_notice",
                                  "other"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "openOrders": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "openOrdersCapped": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lotId",
                          "lot",
                          "variantId",
                          "sku",
                          "item",
                          "reason",
                          "units",
                          "openOrders",
                          "openOrdersCapped"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.blocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "lotId",
                          "lot",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "lot.unblocked": {
      "post": {
        "summary": "Lot unblocked",
        "description": "A blocked lot was released: it is picked and sold again. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.unblocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "recall",
                                  "quality_hold",
                                  "supplier_notice",
                                  "other"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "openOrders": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "openOrdersCapped": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lotId",
                          "lot",
                          "variantId",
                          "sku",
                          "item",
                          "reason",
                          "units",
                          "openOrders",
                          "openOrdersCapped"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.unblocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "lotId",
                          "lot",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.address_changed": {
      "post": {
        "summary": "Order address changed",
        "description": "An order's delivery address changed. The address itself is never sent. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.address_changed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "addressVersion": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "addressVersion"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.address_changed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "return.requested": {
      "post": {
        "summary": "Return requested",
        "description": "A customer asked for a return, in the returns portal or in Shopify. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "returns"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "return.requested"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "portal",
                              "shopify"
                            ]
                          },
                          "returnRequestId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequest": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyReturnId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "return": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "unitsComplete": {
                            "type": "boolean"
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "damaged",
                                "defective",
                                "wrong_item",
                                "not_as_described",
                                "too_small",
                                "too_large",
                                "changed_mind",
                                "arrived_late",
                                "other"
                              ]
                            }
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "source",
                          "returnRequestId",
                          "returnRequest",
                          "shopifyReturnId",
                          "return",
                          "units",
                          "unitsComplete",
                          "reasons",
                          "value",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "return.requested"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "portal",
                              "shopify"
                            ]
                          },
                          "returnRequestId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequest": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyReturnId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "return": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "source",
                          "returnRequestId",
                          "returnRequest",
                          "shopifyReturnId",
                          "return"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "return.received": {
      "post": {
        "summary": "Return received",
        "description": "The warehouse received a customer return. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "returns"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "return.received"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "returnReceiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "damaged",
                                "defective",
                                "wrong_item",
                                "not_as_described",
                                "too_small",
                                "too_large",
                                "changed_mind",
                                "arrived_late",
                                "other"
                              ]
                            }
                          },
                          "conditions": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "sellable",
                                "damaged"
                              ]
                            }
                          }
                        },
                        "required": [
                          "returnReceiptId",
                          "receipt",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnId",
                          "warehouseId",
                          "warehouse",
                          "units",
                          "reasons",
                          "conditions"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "return.received"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "returnReceiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "returnReceiptId",
                          "receipt",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnId",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.created": {
      "post": {
        "summary": "Order created",
        "description": "A new order arrived from the store. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channel": {
                            "type": "string"
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "channel",
                          "lines",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.created"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.allocated": {
      "post": {
        "summary": "Order allocated",
        "description": "Stock was reserved for an order at a warehouse. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.allocated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          },
                          "complete": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "lines",
                          "units",
                          "complete"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.allocated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.completed": {
      "post": {
        "summary": "Order completed",
        "description": "Every item of an order was fulfilled. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parcels": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "warehouses": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "warehousesCapped": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "parcels",
                          "warehouses",
                          "warehousesCapped"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "shipment.label_voided": {
      "post": {
        "summary": "Label voided",
        "description": "A bought shipping label was voided. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.label_voided"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "service": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "refund": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "refunded",
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "shipmentId",
                          "shipment",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "service",
                          "trackingNumber",
                          "refund"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.label_voided"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "shipmentId",
                          "shipment",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "shipment.transit_started": {
      "post": {
        "summary": "Parcel in transit",
        "description": "The carrier scanned a parcel for the first time. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.transit_started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "service": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "firstScanAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "shipmentId",
                          "shipment",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "service",
                          "trackingNumber",
                          "firstScanAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "shipment.transit_started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "shipmentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shipment": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "trackingNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "shipmentId",
                          "shipment",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "carrier",
                          "trackingNumber"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "alert.raised": {
      "post": {
        "summary": "Alert raised",
        "description": "Floormode raised an alert: a late order, a shortage, a failing connection. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "alerts"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "alert.raised"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "alertId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "alertType": {
                            "type": "string",
                            "enum": [
                              "automation_rule",
                              "backorder",
                              "backorder_restocked",
                              "barcode_aliases_refused",
                              "checkout_options_cap_reached",
                              "count_variance",
                              "external_fulfillment_unbooked",
                              "fo_close_deferred",
                              "fulfillment_cancel_restocked",
                              "handback_overdue",
                              "integration_key_reuse",
                              "inventory_writer_drift",
                              "inventory_writer_drift_cleared",
                              "inventory_writer_gap",
                              "landed_cost_refused",
                              "local_snapshot_skipped",
                              "lot_blocked",
                              "lot_expiry_tightened",
                              "near_expiry",
                              "order_action_attention",
                              "order_edit_mirror_refresh_dead",
                              "order_refresh_dead",
                              "oversell_risk",
                              "pack_ship_skipped",
                              "packaging_short",
                              "payment_auth_window",
                              "peer_capability_revoked",
                              "peer_reachable",
                              "peer_unreachable",
                              "pick_lines_dropped",
                              "pick_release_skipped",
                              "po_push_confirmation_overflow",
                              "receipt_price_deviation",
                              "refund_failure",
                              "refund_restock_unreceived",
                              "refund_stock_unbooked",
                              "reorder_suggested",
                              "return_label_unprintable",
                              "shipment_weight_estimated",
                              "sibling_report_refused",
                              "sla_breach",
                              "source_lines_exceeded",
                              "station_supply_unrefillable",
                              "stock_release_clamped",
                              "sync_failure",
                              "token_refresh_refused",
                              "token_refresh_unresolved",
                              "transfer_source_effect_refused",
                              "wave_auto_release_refused",
                              "webhook_endpoint_off"
                            ]
                          },
                          "ref": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "info",
                              "warning",
                              "critical"
                            ]
                          }
                        },
                        "required": [
                          "alertId",
                          "alertType",
                          "ref",
                          "severity"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "alert.raised"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "alertId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "alertType": {
                            "type": "string",
                            "enum": [
                              "automation_rule",
                              "backorder",
                              "backorder_restocked",
                              "barcode_aliases_refused",
                              "checkout_options_cap_reached",
                              "count_variance",
                              "external_fulfillment_unbooked",
                              "fo_close_deferred",
                              "fulfillment_cancel_restocked",
                              "handback_overdue",
                              "integration_key_reuse",
                              "inventory_writer_drift",
                              "inventory_writer_drift_cleared",
                              "inventory_writer_gap",
                              "landed_cost_refused",
                              "local_snapshot_skipped",
                              "lot_blocked",
                              "lot_expiry_tightened",
                              "near_expiry",
                              "order_action_attention",
                              "order_edit_mirror_refresh_dead",
                              "order_refresh_dead",
                              "oversell_risk",
                              "pack_ship_skipped",
                              "packaging_short",
                              "payment_auth_window",
                              "peer_capability_revoked",
                              "peer_reachable",
                              "peer_unreachable",
                              "pick_lines_dropped",
                              "pick_release_skipped",
                              "po_push_confirmation_overflow",
                              "receipt_price_deviation",
                              "refund_failure",
                              "refund_restock_unreceived",
                              "refund_stock_unbooked",
                              "reorder_suggested",
                              "return_label_unprintable",
                              "shipment_weight_estimated",
                              "sibling_report_refused",
                              "sla_breach",
                              "source_lines_exceeded",
                              "station_supply_unrefillable",
                              "stock_release_clamped",
                              "sync_failure",
                              "token_refresh_refused",
                              "token_refresh_unresolved",
                              "transfer_source_effect_refused",
                              "wave_auto_release_refused",
                              "webhook_endpoint_off"
                            ]
                          },
                          "ref": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "alertId",
                          "alertType",
                          "ref"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "alert.resolved": {
      "post": {
        "summary": "Alert resolved",
        "description": "An open alert ended: its cause is gone, or a newer alert replaced it. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "alerts"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "alert.resolved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "alertId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "alertType": {
                            "type": "string",
                            "enum": [
                              "automation_rule",
                              "backorder",
                              "backorder_restocked",
                              "barcode_aliases_refused",
                              "checkout_options_cap_reached",
                              "count_variance",
                              "external_fulfillment_unbooked",
                              "fo_close_deferred",
                              "fulfillment_cancel_restocked",
                              "handback_overdue",
                              "integration_key_reuse",
                              "inventory_writer_drift",
                              "inventory_writer_drift_cleared",
                              "inventory_writer_gap",
                              "landed_cost_refused",
                              "local_snapshot_skipped",
                              "lot_blocked",
                              "lot_expiry_tightened",
                              "near_expiry",
                              "order_action_attention",
                              "order_edit_mirror_refresh_dead",
                              "order_refresh_dead",
                              "oversell_risk",
                              "pack_ship_skipped",
                              "packaging_short",
                              "payment_auth_window",
                              "peer_capability_revoked",
                              "peer_reachable",
                              "peer_unreachable",
                              "pick_lines_dropped",
                              "pick_release_skipped",
                              "po_push_confirmation_overflow",
                              "receipt_price_deviation",
                              "refund_failure",
                              "refund_restock_unreceived",
                              "refund_stock_unbooked",
                              "reorder_suggested",
                              "return_label_unprintable",
                              "shipment_weight_estimated",
                              "sibling_report_refused",
                              "sla_breach",
                              "source_lines_exceeded",
                              "station_supply_unrefillable",
                              "stock_release_clamped",
                              "sync_failure",
                              "token_refresh_refused",
                              "token_refresh_unresolved",
                              "transfer_source_effect_refused",
                              "wave_auto_release_refused",
                              "webhook_endpoint_off"
                            ]
                          },
                          "ref": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cause": {
                            "type": "string",
                            "enum": [
                              "restocked",
                              "order_changed",
                              "order_fulfilled",
                              "order_cancelled",
                              "order_closed",
                              "replaced",
                              "box_unlinked",
                              "supply_removed",
                              "rule_applied",
                              "rule_changed",
                              "hold_cleared"
                            ]
                          }
                        },
                        "required": [
                          "alertId",
                          "alertType",
                          "ref",
                          "cause"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "alert.resolved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "alertId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "alertType": {
                            "type": "string",
                            "enum": [
                              "automation_rule",
                              "backorder",
                              "backorder_restocked",
                              "barcode_aliases_refused",
                              "checkout_options_cap_reached",
                              "count_variance",
                              "external_fulfillment_unbooked",
                              "fo_close_deferred",
                              "fulfillment_cancel_restocked",
                              "handback_overdue",
                              "integration_key_reuse",
                              "inventory_writer_drift",
                              "inventory_writer_drift_cleared",
                              "inventory_writer_gap",
                              "landed_cost_refused",
                              "local_snapshot_skipped",
                              "lot_blocked",
                              "lot_expiry_tightened",
                              "near_expiry",
                              "order_action_attention",
                              "order_edit_mirror_refresh_dead",
                              "order_refresh_dead",
                              "oversell_risk",
                              "pack_ship_skipped",
                              "packaging_short",
                              "payment_auth_window",
                              "peer_capability_revoked",
                              "peer_reachable",
                              "peer_unreachable",
                              "pick_lines_dropped",
                              "pick_release_skipped",
                              "po_push_confirmation_overflow",
                              "receipt_price_deviation",
                              "refund_failure",
                              "refund_restock_unreceived",
                              "refund_stock_unbooked",
                              "reorder_suggested",
                              "return_label_unprintable",
                              "shipment_weight_estimated",
                              "sibling_report_refused",
                              "sla_breach",
                              "source_lines_exceeded",
                              "station_supply_unrefillable",
                              "stock_release_clamped",
                              "sync_failure",
                              "token_refresh_refused",
                              "token_refresh_unresolved",
                              "transfer_source_effect_refused",
                              "wave_auto_release_refused",
                              "webhook_endpoint_off"
                            ]
                          },
                          "ref": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "alertId",
                          "alertType",
                          "ref"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "automation.rule_matched": {
      "post": {
        "summary": "Rule matched",
        "description": "One of your order rules with “Send an event” matched an order. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "automation.rule_matched"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ruleId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "rule": {
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "order_created",
                              "order_paid",
                              "order_routing_complete",
                              "order_risk_changed",
                              "order_tags_added",
                              "order_address_changed",
                              "return_requested",
                              "return_received",
                              "shipment_exception",
                              "order_late",
                              "pick_short",
                              "order_backordered",
                              "order_backorder_resolved",
                              "order_hold_released",
                              "order_held",
                              "parcel_packed",
                              "label_purchased",
                              "order_fulfilled",
                              "shipment_delivered",
                              "order_cancelled",
                              "manual",
                              "scheduled"
                            ]
                          },
                          "occurrenceKey": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "ruleId",
                          "rule",
                          "trigger",
                          "occurrenceKey"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "automation.rule_matched"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ruleId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "rule": {
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "order_created",
                              "order_paid",
                              "order_routing_complete",
                              "order_risk_changed",
                              "order_tags_added",
                              "order_address_changed",
                              "return_requested",
                              "return_received",
                              "shipment_exception",
                              "order_late",
                              "pick_short",
                              "order_backordered",
                              "order_backorder_resolved",
                              "order_hold_released",
                              "order_held",
                              "parcel_packed",
                              "label_purchased",
                              "order_fulfilled",
                              "shipment_delivered",
                              "order_cancelled",
                              "manual",
                              "scheduled"
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "ruleId",
                          "rule",
                          "trigger"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.deadline_missed": {
      "post": {
        "summary": "Order late",
        "description": "An order passed its fulfil-by time, or the end of its packing day, and has not shipped. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.deadline_missed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dueKind": {
                            "type": "string",
                            "enum": [
                              "pack_day",
                              "fulfill_by"
                            ]
                          },
                          "dueAtMs": {
                            "type": "number"
                          },
                          "minutesLate": {
                            "type": "number"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "dueKind",
                          "dueAtMs",
                          "minutesLate",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.deadline_missed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dueKind": {
                            "type": "string",
                            "enum": [
                              "pack_day",
                              "fulfill_by"
                            ]
                          },
                          "dueAtMs": {
                            "type": "number"
                          },
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "dueKind",
                          "dueAtMs",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.warehouse_assigned": {
      "post": {
        "summary": "Order assigned to a warehouse",
        "description": "Shopify assigned an order's fulfillment order to one of your warehouses, or moved it to another. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.warehouse_assigned"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "previousWarehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "previousWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "split": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId",
                          "previousWarehouseId",
                          "previousWarehouse",
                          "split"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.warehouse_assigned"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.deallocated": {
      "post": {
        "summary": "Order deallocated",
        "description": "Stock reserved for an order at a warehouse was given back. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.deallocated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "cancelled",
                              "rerouted",
                              "fulfilled_elsewhere",
                              "closed",
                              "changed"
                            ]
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "reason",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.deallocated"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.backordered": {
      "post": {
        "summary": "Order backordered",
        "description": "An order is waiting for stock: it reserves itself when the stock arrives. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.backordered"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shortLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "shortUnits": {
                            "type": "number"
                          },
                          "episodeBegan": {
                            "type": "boolean"
                          },
                          "edgeId": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId",
                          "shortLines",
                          "shortUnits",
                          "episodeBegan",
                          "edgeId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.backordered"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.backorder_resolved": {
      "post": {
        "summary": "Backorder resolved",
        "description": "A backordered order is fully reserved again: stock arrived, or the order or its warehouse changed. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.backorder_resolved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "units": {
                            "type": "number"
                          },
                          "edgeId": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId",
                          "units",
                          "edgeId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.backorder_resolved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fulfillmentOrderId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "fulfillmentOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "summary": "Order cancelled",
        "description": "An order was cancelled and Floormode closed its work. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "order.cancelled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "workStage": {
                            "type": "string",
                            "enum": [
                              "not_started",
                              "picking",
                              "picked",
                              "packing",
                              "packed"
                            ]
                          },
                          "releasedAllocations": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "workStage",
                          "releasedAllocations"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "order.cancelled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "hold.released": {
      "post": {
        "summary": "Order hold released",
        "description": "A hold Floormode put on an order in Shopify was released. It can arrive without hold.applied (a hold withdrawn before Shopify confirmed it). Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "hold.released"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "holdId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "hold": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "payment_pending",
                              "fraud_risk",
                              "address_issue",
                              "awaiting_stock",
                              "awaiting_production",
                              "awaiting_supplier",
                              "customer_request",
                              "other"
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "holdId",
                          "hold",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "hold.released"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "holdId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "hold": {
                            "type": "string"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "holdId",
                          "hold",
                          "orderId",
                          "order",
                          "shopifyOrderId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "wave.released": {
      "post": {
        "summary": "Wave released",
        "description": "A wave was released to the floor. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "wave.released"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "waveId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "wave": {
                            "type": "string"
                          },
                          "tasks": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "fulfillmentOrders": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "waveId",
                          "wave",
                          "tasks",
                          "fulfillmentOrders"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "wave.released"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "waveId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "wave": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "waveId",
                          "wave",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "wave.closed": {
      "post": {
        "summary": "Wave closed",
        "description": "A wave was closed: its open tasks went to the floor's continuous work. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "wave.closed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "waveId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "wave": {
                            "type": "string"
                          },
                          "tasksReleased": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "waveId",
                          "wave",
                          "tasksReleased"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "wave.closed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "waveId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "wave": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "waveId",
                          "wave",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "pick_batch.started": {
      "post": {
        "summary": "Pick list started",
        "description": "A picker booked the first pick of a pick list. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_batch.started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "single",
                              "batch",
                              "cluster"
                            ]
                          },
                          "orders": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "pickBatchId",
                          "pickBatch",
                          "method",
                          "orders",
                          "lines",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_batch.started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "pickBatchId",
                          "pickBatch",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "pick_batch.completed": {
      "post": {
        "summary": "Pick list completed",
        "description": "Every line of a pick list was picked or reported short. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_batch.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "single",
                              "batch",
                              "cluster"
                            ]
                          },
                          "orders": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          },
                          "linesPicked": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "linesShort": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "unitsPicked": {
                            "type": "number"
                          },
                          "durationMs": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "pickBatchId",
                          "pickBatch",
                          "method",
                          "orders",
                          "lines",
                          "units",
                          "linesPicked",
                          "linesShort",
                          "unitsPicked",
                          "durationMs"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_batch.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "pickBatchId",
                          "pickBatch",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "pick_line.shorted": {
      "post": {
        "summary": "Pick short",
        "description": "A picker found fewer units in a location than the pick asked for. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "fulfilment"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_line.shorted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "pickLineId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "bin": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expected": {
                            "type": "number"
                          },
                          "picked": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item",
                          "pickLineId",
                          "pickBatchId",
                          "pickBatch",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "bin",
                          "expected",
                          "picked"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "pick_line.shorted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "pickLineId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatchId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pickBatch": {
                            "type": "string"
                          },
                          "orderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pickLineId",
                          "pickBatchId",
                          "pickBatch",
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "manifest.closed": {
      "post": {
        "summary": "Manifest closed",
        "description": "A carrier manifest was closed: its parcels are announced to the carrier. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "shipping"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "manifest.closed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "manifestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "manifest": {
                            "type": "string"
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string"
                          },
                          "parcels": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "manifestId",
                          "manifest",
                          "carrier",
                          "date",
                          "parcels"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "manifest.closed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "manifestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "manifest": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "carrier": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "manifestId",
                          "manifest",
                          "warehouseId",
                          "warehouse",
                          "carrier"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "receipt.completed": {
      "post": {
        "summary": "Receipt completed",
        "description": "A receipt was completed: its goods are booked into stock. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "receipt.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "receiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "warehouse_transfer",
                              "logistified_po",
                              "logistified_to",
                              "assemblified_wo",
                              "logistified_ssr",
                              "logistified_mo"
                            ]
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          },
                          "discrepancyLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "receiptId",
                          "receipt",
                          "source",
                          "lines",
                          "units",
                          "discrepancyLines"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "receipt.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "receiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "receiptId",
                          "receipt",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "receipt.cancelled": {
      "post": {
        "summary": "Receipt cancelled",
        "description": "A receipt was cancelled before its goods were booked. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "receipt.cancelled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "receiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "warehouse_transfer",
                              "logistified_po",
                              "logistified_to",
                              "assemblified_wo",
                              "logistified_ssr",
                              "logistified_mo"
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "receiptId",
                          "receipt",
                          "source"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "receipt.cancelled"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "receiptId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "receipt": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "receiptId",
                          "receipt",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "count.approved": {
      "post": {
        "summary": "Count approved",
        "description": "A stock count was approved and its differences booked. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "count.approved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "countTaskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "count": {
                            "type": "string"
                          },
                          "stocktakeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "countedLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "varianceLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "varianceUnits": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "countTaskId",
                          "count",
                          "stocktakeId",
                          "countedLines",
                          "varianceLines",
                          "varianceUnits"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "count.approved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "countTaskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "count": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "countTaskId",
                          "count",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "stocktake.signed_off": {
      "post": {
        "summary": "Stocktake signed off",
        "description": "A stocktake was signed off: every sheet is approved or cancelled. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "stocktake.signed_off"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "stocktakeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "stocktake": {
                            "type": "string"
                          },
                          "countDate": {
                            "type": "string"
                          },
                          "sheets": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "binsCounted": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "binsNotCounted": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "differenceLines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "differenceUnits": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "stocktakeId",
                          "stocktake",
                          "countDate",
                          "sheets",
                          "binsCounted",
                          "binsNotCounted",
                          "differenceLines",
                          "differenceUnits"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "stocktake.signed_off"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "stocktakeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "stocktake": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "stocktakeId",
                          "stocktake",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "stock.adjusted": {
      "post": {
        "summary": "Stock adjusted",
        "description": "An item's stock in a location was adjusted, by a person or by Floormode; the reason says which. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "stock.adjusted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "movementId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "bin": {
                            "type": "string"
                          },
                          "delta": {
                            "type": "number"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "damaged",
                                  "lost",
                                  "found",
                                  "shrinkage",
                                  "sample",
                                  "internal_use",
                                  "correction",
                                  "expired",
                                  "opened_for_production",
                                  "custom",
                                  "system"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "onHandAfter": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item",
                          "movementId",
                          "bin",
                          "delta",
                          "reason",
                          "onHandAfter"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "stock.adjusted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "movementId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "movementId",
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "stock.on_hand_changed": {
      "post": {
        "summary": "On hand changed",
        "description": "An item's units on hand in a warehouse changed: received, shipped, adjusted, counted, returned or transferred. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "stock.on_hand_changed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "movementId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "delta": {
                            "type": "number"
                          },
                          "onHandAfter": {
                            "type": "number"
                          },
                          "cause": {
                            "type": "string",
                            "enum": [
                              "receipt",
                              "ship",
                              "adjust",
                              "count",
                              "return",
                              "transfer",
                              "import",
                              "pick",
                              "pack",
                              "putaway",
                              "move",
                              "release"
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item",
                          "movementId",
                          "delta",
                          "onHandAfter",
                          "cause"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "stock.on_hand_changed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "movementId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "movementId",
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "adjustment_request.submitted": {
      "post": {
        "summary": "Adjustment awaiting approval",
        "description": "An adjustment above your approval limit waits for a second person. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "adjustment_request.submitted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "adjustmentRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "adjustmentRequest": {
                            "type": "string"
                          },
                          "bin": {
                            "type": "string"
                          },
                          "delta": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "damaged",
                              "lost",
                              "found",
                              "shrinkage",
                              "sample",
                              "internal_use",
                              "correction",
                              "expired",
                              "opened_for_production",
                              "custom",
                              "system"
                            ]
                          },
                          "value": {
                            "type": "number"
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item",
                          "adjustmentRequestId",
                          "adjustmentRequest",
                          "bin",
                          "delta",
                          "reason",
                          "value",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "adjustment_request.submitted"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "adjustmentRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "adjustmentRequest": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "adjustmentRequestId",
                          "adjustmentRequest",
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "bin.blocked": {
      "post": {
        "summary": "Location blocked",
        "description": "A location was blocked: nothing in it is planned or picked. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "bin.blocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "binId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "bin": {
                            "type": "string"
                          },
                          "cause": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "damaged",
                                  "inspection",
                                  "recall",
                                  "unreachable",
                                  "other"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "binId",
                          "bin",
                          "cause",
                          "units",
                          "items"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "bin.blocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "binId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "bin": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "binId",
                          "bin",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "bin.unblocked": {
      "post": {
        "summary": "Location unblocked",
        "description": "A blocked location was released: it is planned and picked from again. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "bin.unblocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "binId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "bin": {
                            "type": "string"
                          },
                          "cause": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "damaged",
                                  "inspection",
                                  "recall",
                                  "unreachable",
                                  "other"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "binId",
                          "bin",
                          "cause",
                          "units",
                          "items"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "bin.unblocked"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "binId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "bin": {
                            "type": "string"
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "binId",
                          "bin",
                          "warehouseId",
                          "warehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "lot.expired": {
      "post": {
        "summary": "Lot expired",
        "description": "A lot passed its expiry date at every warehouse that holds it. Floormode no longer allocates or sells it. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "inventory"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.expired"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "expiresOn": {
                            "type": "string"
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "variantId",
                          "sku",
                          "item",
                          "lotId",
                          "lot",
                          "expiresOn",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "lot.expired"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "lotId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lot": {
                            "type": "string"
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "lotId",
                          "lot",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "return.approved": {
      "post": {
        "summary": "Return approved",
        "description": "A return request was approved. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "returns"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "return.approved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          },
                          "resolution": {
                            "type": "string",
                            "enum": [
                              "refund",
                              "store_credit",
                              "exchange"
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest",
                          "resolution",
                          "units",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "return.approved"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "return.denied": {
      "post": {
        "summary": "Return denied",
        "description": "A return request was denied. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "returns"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "return.denied"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          },
                          "resolution": {
                            "type": "string",
                            "enum": [
                              "refund",
                              "store_credit",
                              "exchange"
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest",
                          "resolution",
                          "units",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "return.denied"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "return.refunded": {
      "post": {
        "summary": "Return refunded",
        "description": "A return was refunded. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "returns"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "return.refunded"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          },
                          "resolution": {
                            "type": "string",
                            "enum": [
                              "refund",
                              "store_credit",
                              "exchange"
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "amount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest",
                          "resolution",
                          "units",
                          "currency",
                          "amount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "return.refunded"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shopifyOrderId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnRequestId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "returnRequest": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "orderId",
                          "order",
                          "shopifyOrderId",
                          "returnRequestId",
                          "returnRequest"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "transfer.started": {
      "post": {
        "summary": "Transfer started",
        "description": "A transfer's goods left the source warehouse. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "transfer.started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "transferId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "transfer": {
                            "type": "string"
                          },
                          "fromWarehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "fromWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "toWarehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "toWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "transferId",
                          "transfer",
                          "fromWarehouseId",
                          "fromWarehouse",
                          "toWarehouseId",
                          "toWarehouse",
                          "lines",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "transfer.started"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "transferId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "transfer": {
                            "type": "string"
                          },
                          "fromWarehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "fromWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "transferId",
                          "transfer",
                          "fromWarehouseId",
                          "fromWarehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "transfer.completed": {
      "post": {
        "summary": "Transfer completed",
        "description": "A transfer was completed at its destination. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "transfer.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "transferId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "transfer": {
                            "type": "string"
                          },
                          "fromWarehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "fromWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "toWarehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "toWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lines": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "units": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "transferId",
                          "transfer",
                          "fromWarehouseId",
                          "fromWarehouse",
                          "toWarehouseId",
                          "toWarehouse",
                          "lines",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "transfer.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "transferId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "transfer": {
                            "type": "string"
                          },
                          "fromWarehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "fromWarehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "transferId",
                          "transfer",
                          "fromWarehouseId",
                          "fromWarehouse"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    },
    "replenishment.completed": {
      "post": {
        "summary": "Refill completed",
        "description": "A refill moved stock from reserve to a pick location. Body version 1. Signed per Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`); deduplicate on `webhook-id`, order one subject's events by `sequence`.",
        "tags": [
          "warehouse"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": false
                      },
                      "type": {
                        "type": "string",
                        "const": "replenishment.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          },
                          "taskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "fromBin": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "toBin": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "units": {
                            "type": "number"
                          },
                          "toBins": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "binId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "bin": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "units": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "binId",
                                "bin",
                                "units"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "toBinsCapped": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item",
                          "taskId",
                          "fromBin",
                          "toBin",
                          "units"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "occurredAt": {
                        "type": "number"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "warehouseId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "store": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "warehouseId",
                          "warehouse",
                          "storeId",
                          "store"
                        ],
                        "additionalProperties": false
                      },
                      "test": {
                        "type": "boolean"
                      },
                      "truncated": {
                        "type": "boolean",
                        "const": true
                      },
                      "type": {
                        "type": "string",
                        "const": "replenishment.completed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "taskId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouseId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "warehouse": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "variantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sku": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "taskId",
                          "warehouseId",
                          "warehouse",
                          "variantId",
                          "sku",
                          "item"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "timestamp",
                      "occurredAt",
                      "sequence",
                      "subject",
                      "scope",
                      "test",
                      "truncated",
                      "type",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer is retried or recorded as failed."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A WorkOS OAuth access token (external callers and agents) or a Shopify session token (the embedded app). See the introduction."
      }
    },
    "schemas": {
      "Envelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "description": "The operation's result. Its shape is declared on the handler (the tenant object's return contract) rather than in the published registry, so it is not constrained here; the operation's description states what comes back."
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message. Safe to show a user."
          },
          "code": {
            "type": "string",
            "enum": [
              "confirmation_required",
              "conflict",
              "forbidden",
              "internal",
              "invalid_input",
              "invalid_output",
              "not_found",
              "organization_changed",
              "payload_too_large",
              "storage_full",
              "unauthorized",
              "unavailable",
              "unknown_function"
            ],
            "description": "Present when the failure is a domain refusal the tenant object classified. Branch on this, never on the message."
          }
        }
      },
      "ConfirmationRequiredError": {
        "type": "object",
        "required": [
          "error",
          "code",
          "confirmation"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Why the call needs the person's confirmation."
          },
          "code": {
            "type": "string",
            "enum": [
              "confirmation_required"
            ]
          },
          "confirmation": {
            "type": "object",
            "required": [
              "token",
              "expiresAt",
              "operation",
              "title",
              "why",
              "inputDigest"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "Send it back in `Floormode-Confirm` with the same input."
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "operation": {
                "type": "string"
              },
              "title": {
                "type": "string",
                "description": "What the operation does: show it to the person."
              },
              "why": {
                "type": "string",
                "description": "Why it cannot be undone: show it to the person."
              },
              "inputDigest": {
                "type": "string",
                "description": "`sha256:` of the input's canonical JSON the token is bound to."
              }
            }
          }
        }
      },
      "InvalidInputError": {
        "type": "object",
        "required": [
          "error",
          "issues"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "Invalid input"
          },
          "issues": {
            "type": "array",
            "description": "The zod issue list, verbatim: which field failed and why.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "path",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "type": [
                      "string",
                      "number"
                    ]
                  },
                  "description": "Path to the offending value inside the input."
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "UnknownParameterError": {
        "type": "object",
        "required": [
          "error",
          "code",
          "unknown",
          "accepted"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "unknown_parameter"
          },
          "unknown": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The query parameters this operation does not declare."
          },
          "accepted": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every parameter name the operation does accept."
          }
        }
      },
      "PlanRequiredError": {
        "type": "object",
        "required": [
          "error",
          "code",
          "requiredPlan"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "plan_required"
          },
          "requiredPlan": {
            "type": "string",
            "description": "The plan tier the operation needs (its published `x-min-plan`)."
          }
        }
      },
      "OperationsCatalog": {
        "type": "object",
        "required": [
          "operations"
        ],
        "properties": {
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogEntry"
            }
          }
        }
      },
      "CatalogEntry": {
        "type": "object",
        "required": [
          "name",
          "description",
          "kind",
          "topic",
          "method",
          "path",
          "inputSchema"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Operation id, e.g. `orders_list`."
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "mutation",
              "query"
            ]
          },
          "topic": {
            "type": "string",
            "enum": [
              "orders",
              "fulfillment",
              "shipping",
              "receiving",
              "inventory",
              "returns",
              "layout",
              "catalog",
              "customers",
              "people",
              "integrations",
              "reports",
              "account"
            ],
            "description": "The business area the operation belongs to; the introduction lists them."
          },
          "method": {
            "type": "string",
            "enum": [
              "DELETE",
              "GET",
              "PATCH",
              "POST",
              "PUT"
            ]
          },
          "path": {
            "type": "string",
            "description": "Full path, e.g. `/api/v1/orders`."
          },
          "minPlan": {
            "type": "string",
            "description": "Omitted when every tier may call it."
          },
          "irreversible": {
            "type": "boolean",
            "description": "Present (true) when a second call cannot undo the first: money, payouts, ledger applications, deletes, cancellations. Confirm with the operator before calling."
          },
          "inputSchema": {
            "type": "object",
            "description": "JSON Schema for the operation's input, converted from its zod schema."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request could not be answered as asked. Either the input failed the operation's schema (`issues` names the fields), or — on `GET`/`DELETE` — it carried a query parameter the operation does not declare, which is refused rather than ignored. Domain codes with this status: `invalid_input`.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InvalidInputError"
                },
                {
                  "$ref": "#/components/schemas/UnknownParameterError"
                },
                {
                  "$ref": "#/components/schemas/Error"
                }
              ]
            }
          }
        }
      },
      "ConfirmationRequired": {
        "description": "An irreversible operation asks for the person's confirmation first (`confirmation_required`), once every other check of the call passed. Nothing ran. The body's `confirmation` holds `title` and `why` to show the person and the `token`: once they agree, send the same call with the same input and the `Floormode-Confirm: <token>` header within 5 minutes. A token runs its call once (`confirmation_used`, 409, after).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ConfirmationRequiredError"
            }
          }
        }
      },
      "Conflict": {
        "description": "Domain refusal. Codes with this status: `conflict`, `organization_changed`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated, but not allowed. Either the wrong actor type for this operation, or a plan refusal (`plan_required`): a gated operation requires its published `x-min-plan`. Domain codes with this status: `forbidden`.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/PlanRequiredError"
                },
                {
                  "$ref": "#/components/schemas/Error"
                }
              ]
            }
          }
        }
      },
      "InsufficientStorage": {
        "description": "Domain refusal. Codes with this status: `storage_full`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Domain refusal. Codes with this status: `internal`, `invalid_output`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Either the addressed row does not exist, or the authenticated shop has no tenant in the registry. Domain codes with this status: `not_found`, `unknown_function`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "Domain refusal. Codes with this status: `payload_too_large`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The store's calls for this minute are used up (`rate_limited`). Nothing was run: wait the `Retry-After` seconds and send the same call again.",
        "headers": {
          "Retry-After": {
            "description": "Seconds until the store's quota allows calls again.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No usable identity. Either no `Authorization` header and no session cookie, or a token that did not verify. Domain codes with this status: `unauthorized`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
