{
  "openapi": "3.1.0",
  "info": {
    "title": "Angler Fulfilment API",
    "version": "1.1.0",
    "description": "Connect your own system (ERP, OMS or custom shop) to the Angler Fulfilment warehouse: send orders, read them back, keep products and stock in sync, send advance shipping notices and announce returns.\n\nThe full guide, with hold codes, safe sync, sandbox accounts and the changelog, is at https://anglerfulfilment.co.uk/developers. The messages we send to your webhook are described under `webhooks` in openapi.json.\n\n**Authentication.** Send your API key in the `X-Api-Key` header on every request (not as `Authorization: Bearer`). Keys are created by a Client Admin in the portal under Warehouse > Connect your store > Your own system (API keys), with the scopes `orders`, `stock`, `products` and `inbounds`. Sandbox and live accounts share one base URL: call `GET /me` first to check which your key is for. Every success also carries the header `X-Angler-Sandbox: true` or `false`.\n\n**Envelope.** Every success is `{ \"success\": true, \"data\": ..., \"message\": null, \"request_id\": \"...\" }` and every error is `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\"? }, \"request_id\": \"...\" }`.\n\n**Safe sync.** `GET /orders`, `/products`, `/inventory`, `/returns` and `/inbounds` take `updated_since` and `cursor` (never both at once). A sync read leaves out records changed in the last 150 seconds and answers `next_cursor` (more waiting) or `next_updated_since` (caught up). A record can come back more than once: treat every read as an upsert.\n\n**Rate limits.** 100 requests per minute per endpoint, counted per API key. Every response from an API route carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (seconds); over the limit you get `429 RATE_LIMITED` with `Retry-After` in seconds.\n\n**Request bodies.** Send JSON in UTF-8 with `Content-Type: application/json` (`application/*+json` is taken too); any other Content-Type on a POST, PUT or PATCH is `415 UNSUPPORTED_MEDIA_TYPE`, as is a body that is not UTF-8. A body may be sent uncompressed, gzip or deflate (`Content-Encoding`); any other encoding is `415`, and gzip or deflate data that cannot be decompressed is `400 BAD_REQUEST`. JSON may nest at most 32 levels deep (`400 VALIDATION`). A POST with no body is fine.\n\n**Body size.** JSON bodies on `/orders`, `/products`, `/inbounds` and `/returns` (and every path under them) can be up to 12 MB; everywhere else, 100 kB. Above that the answer is `413 PAYLOAD_TOO_LARGE`. A body far above the limit (over 16 MB) may be cut off by our proxy before it reaches the API, with a 5xx status and no JSON body.\n\n**Paths.** Percent-encode every value you put in a path, such as a SKU (for example with encodeURIComponent): `50%OFF` must be sent as `50%25OFF`. A path whose %-encoding cannot be decoded is `400 VALIDATION` from the API, but our hosting edge may refuse it first with a 502 and no JSON body.\n\n**Caching.** Every answer carries `Cache-Control: no-store`.\n\n**Versioning.** This is v1, spec version 1.1.0. 19 and 20 November 2026 were the pre-launch phase, in which v1 still changed (see the changelog). From 21 November 2026 v1 is fixed: new fields, events and endpoints may be added, and a breaking change gets a new version and at least 6 months' notice.",
    "contact": {
      "name": "Angler Fulfilment",
      "email": "info@anglerfulfilment.co.uk",
      "url": "https://anglerfulfilment.co.uk/developers"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://anglerfulfilment.co.uk/terms"
    }
  },
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://anglerfulfilment.co.uk/developers"
  },
  "servers": [
    {
      "url": "https://portal.anglerfulfilment.co.uk/api/v1",
      "description": "Production (sandbox accounts use the same URL)"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "Send orders, read them back and cancel them before picking starts."
    },
    {
      "name": "Products",
      "description": "Your catalogue: SKUs, barcodes, weights, sizes and customs data."
    },
    {
      "name": "Stock",
      "description": "Live stock levels for every active product, and the stock ledger."
    },
    {
      "name": "Returns",
      "description": "Announce returns and read back what came in, its grade and what was done with it."
    },
    {
      "name": "Inbounds",
      "description": "Advance shipping notices: tell us about stock on its way, then read what we received, line by line."
    },
    {
      "name": "Sandbox",
      "description": "Sandbox accounts only: move a test order through the warehouse steps, or book a test inbound or return in. Every step sends the normal webhook."
    },
    {
      "name": "Account",
      "description": "Who your key acts for, and whether it is a sandbox or a live account."
    },
    {
      "name": "Webhooks",
      "description": "Messages we POST to your webhook URL. Each is signed: verify `Angler-Signature` before trusting the body."
    }
  ],
  "paths": {
    "/orders": {
      "get": {
        "operationId": "listOrders",
        "tags": [
          "Orders"
        ],
        "summary": "List orders",
        "description": "Your orders, newest first (ties broken by id). Scope `orders`.\n\n**Sync.** With `updated_since` or `cursor`, the list is ordered oldest change first, leaves out records changed in the last 150 seconds, and carries `next_cursor` (more waiting: send it as `cursor`) or `next_updated_since` (caught up: keep it for your next sync). A record can come back more than once; treat each read as an upsert.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
            "schema": {
              "type": "string",
              "enum": [
                "IMPORTED",
                "ON_HOLD",
                "ALLOCATED",
                "PICKING",
                "PICKED",
                "PACKED",
                "DESPATCHED",
                "DELIVERED",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Matches the Angler number, your external_ref or a store order number (any part, case does not matter), or an exact parcel or return tracking number. The text is matched as written: `%` and `_` are ordinary characters, not wildcards.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exact",
            "in": "query",
            "required": false,
            "description": "With search: whole-reference match only. external_ref is matched exactly, case-sensitive; the Angler number and channel_order_number ignore case and a leading #; a parcel or return tracking number matches exactly, case-sensitive. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "held_only",
            "in": "query",
            "required": false,
            "description": "Only orders on hold. Overrides status. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sales_channel",
            "in": "query",
            "required": false,
            "description": "Only orders from that channel. Case and extra spaces do not matter.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Only orders changed since then. An ISO 8601 date-time (2026-11-19T10:00:00Z), or a date (2026-11-19) meaning its UTC midnight. Anything else is refused with 400 VALIDATION.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T10:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` from the previous sync read of this same list, to carry on from it. Opaque and signed: send it back exactly as given, on its own (with `updated_since` as well it is refused with 400 VALIDATION). A cursor that was changed, made by hand, issued by another list, or issued before 20 Nov 2026 is refused with 400 VALIDATION: start again with `updated_since` set to the last `next_updated_since` you kept.",
            "schema": {
              "type": "string",
              "maxLength": 423
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 250 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 250 is brought down to 250.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/OrderListItem"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null,
                          "description": "Only on a sync read (with `updated_since` or `cursor`). While more changed records wait, the value to send as `cursor` next; null once you have caught up. Opaque: do not build or change it."
                        },
                        "next_updated_since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": "2026-11-19T10:12:30.000Z",
                          "description": "Only on a sync read. Null while `next_cursor` is set; once caught up, the value to send as `updated_since` on your next sync."
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Create an order",
        "description": "Scope `orders`. The order is checked in the same request: each line is matched to one of your products, the address is checked and stock is reserved for every line (all or nothing). It comes back `ALLOCATED`, or `ON_HOLD` with the reason in `holds`. A postcode problem does not refuse the order: it is created and held with `ADDRESS_INVALID`. A `ship_to.country` that is not an ISO 3166-1 alpha-2 country code is refused with `400 VALIDATION` (`UK` is taken and stored as `GB`).\n\n**Safe retries.** `external_ref` is the de-duplication key. If your account already has an API order with the same `external_ref` (exact, after trimming spaces), you get that order back with `200` and `Idempotent-Replayed: true`, and nothing changes, even if the body differs; documents sent with a replay are not checked or added.\n\n**Size.** The body can be up to 12 MB, enough for three 2 MB PDFs as base64; above that the answer is `413 PAYLOAD_TOO_LARGE`. A request far above the limit may be refused before it reaches the API, with a 5xx status and no JSON body, so keep each document within 2 MB.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "example": {
                "external_ref": "WEB-10023",
                "ship_to": {
                  "name": "Alex Example",
                  "email": "alex@example.com",
                  "phone": "+447700900123",
                  "line1": "10 Example Street",
                  "line2": "Flat 2",
                  "city": "Manchester",
                  "postcode": "M1 1AA",
                  "country": "GB"
                },
                "lines": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "quantity": 2,
                    "unit_price": "14.99",
                    "name": "T-shirt, black, M"
                  },
                  {
                    "sku": "CAP-NAVY",
                    "quantity": 1,
                    "unit_price": "14.99",
                    "name": "Cap, navy"
                  }
                ],
                "requested_service": "Tracked 48",
                "packing_instructions": "Please include the returns slip.",
                "order_value": "44.97",
                "sales_channel": "website"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay: you have used this external_ref before. The record made first, unchanged, whatever this body says.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `FILE_TYPE_NOT_ALLOWED`, `FILE_CONTENT_MISMATCH`, `FILE_EMPTY`, `FILE_TOO_LARGE`, `INVALID_FILE`, `FILE_BLOCKED`, `TOO_MANY_DOCUMENTS`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `CLIENT_NOT_VERIFIED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{order_id}": {
      "get": {
        "operationId": "getOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Get an order",
        "description": "One order by its `order_id` (a UUID, not the order number), with every hold it has had, its timeline, its documents and one entry in `shipments` per parcel. Scope `orders`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The order's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{order_id}/cancel": {
      "post": {
        "operationId": "cancelOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Cancel an order",
        "description": "Cancel an order before picking starts. Reserved stock is released. Scope `orders`. Answers `200` with the cancelled order.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The order's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequest"
              },
              "example": {
                "reason": "Customer cancelled on our website"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `CANCEL_NEEDS_ANGLER`, `INVALID_TRANSITION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{order_id}/documents": {
      "post": {
        "operationId": "addOrderDocuments",
        "tags": [
          "Orders"
        ],
        "summary": "Add documents to an order",
        "description": "Add packing slips or return labels, or the return tracking number, to an order before it is picked. Scope `orders`. Send at least one of the two. A file already on the order (the same content) is not added again, so a retry is safe. Answers `201` with the full order, also when nothing new was added. On an order being picked or already gone the answer is `409 ORDER_IN_PROGRESS`; on a cancelled order, `409 ORDER_CANCELLED`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The order's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocumentsRequest"
              },
              "example": {
                "documents": [
                  {
                    "type": "RETURN_LABEL",
                    "filename": "return-SO-284117.pdf",
                    "content_base64": "JVBERi0xLjcKJcfsj6IK..."
                  }
                ],
                "return_tracking_number": "QZ123456789GB"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `FILE_TYPE_NOT_ALLOWED`, `FILE_CONTENT_MISMATCH`, `FILE_EMPTY`, `FILE_TOO_LARGE`, `INVALID_FILE`, `FILE_BLOCKED`, `TOO_MANY_DOCUMENTS`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `ORDER_IN_PROGRESS`, `ORDER_CANCELLED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products": {
      "get": {
        "operationId": "listProducts",
        "tags": [
          "Products"
        ],
        "summary": "List products",
        "description": "Your active products, sorted by SKU, each with its barcodes and stock. Scope `products` or `stock`.\n\n**Sync.** With `updated_since` or `cursor`, the list is ordered oldest change first, leaves out records changed in the last 150 seconds, and carries `next_cursor` (more waiting: send it as `cursor`) or `next_updated_since` (caught up: keep it for your next sync). A record can come back more than once; treat each read as an upsert.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "SKU, name, style or colour (any part, case does not matter), an exact barcode, the FNSKU, or an exact size. The text is matched as written: `%` and `_` are ordinary characters, not wildcards.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "style",
            "in": "query",
            "required": false,
            "description": "Every size and colour of one style. Case does not matter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "description": "Include retired products. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "missing_data",
            "in": "query",
            "required": false,
            "description": "Only products with no weight or size. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Only products changed since then. An ISO 8601 date-time (2026-11-19T10:00:00Z), or a date (2026-11-19) meaning its UTC midnight. Anything else is refused with 400 VALIDATION.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T10:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` from the previous sync read of this same list, to carry on from it. Opaque and signed: send it back exactly as given, on its own (with `updated_since` as well it is refused with 400 VALIDATION). A cursor that was changed, made by hand, issued by another list, or issued before 20 Nov 2026 is refused with 400 VALIDATION: start again with `updated_since` set to the last `next_updated_since` you kept.",
            "schema": {
              "type": "string",
              "maxLength": 423
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 250 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 250 is brought down to 250.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Product"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null,
                          "description": "Only on a sync read (with `updated_since` or `cursor`). While more changed records wait, the value to send as `cursor` next; null once you have caught up. Opaque: do not build or change it."
                        },
                        "next_updated_since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": "2026-11-19T10:12:30.000Z",
                          "description": "Only on a sync read. Null while `next_cursor` is set; once caught up, the value to send as `updated_since` on your next sync."
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProduct",
        "tags": [
          "Products"
        ],
        "summary": "Add a product",
        "description": "Scope `products`. `sku` and `name` are required. Adding a product re-checks any orders held for that SKU. The answer has the product's fields and barcodes; `stock` and `missing_data` come with the GET endpoints.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreateInput"
              },
              "example": {
                "sku": "TSHIRT-BLK-M",
                "name": "Organic T-shirt, black, medium",
                "style": "TSHIRT-ORG",
                "colour": "Black",
                "size": "M",
                "weight_g": 180,
                "length_mm": 300,
                "width_mm": 250,
                "height_mm": 20,
                "declared_value": "14.99",
                "hs_code": "610910",
                "country_of_origin": "PT",
                "reorder_level": 50,
                "barcodes": [
                  {
                    "barcode": "5012345678900"
                  },
                  {
                    "barcode": "15012345678907",
                    "uom": "CASE",
                    "quantity": 24
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `INVALID_BARCODE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `DUPLICATE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{product_id}": {
      "get": {
        "operationId": "getProduct",
        "tags": [
          "Products"
        ],
        "summary": "Get a product",
        "description": "Scope `products` or `stock`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "The product's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateProduct",
        "tags": [
          "Products"
        ],
        "summary": "Change a product",
        "description": "Scope `products`. Send only the fields that change. `null` clears description, size, colour, style, weight_g, length_mm, width_mm, height_mm, declared_value, hs_code, country_of_origin, fnsku and reorder_level; `null` for any other field is refused with `400 BAD_REQUEST` (\"<field> cannot be null\"). An empty text field is stored as null. `barcodes` and `tags`, when sent, replace the whole list.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "The product's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              },
              "example": {
                "weight_g": 185,
                "reorder_level": 40
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `INVALID_BARCODE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `DUPLICATE`, `SKU_IN_USE`, `PRODUCT_HAS_STOCK`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/bulk": {
      "post": {
        "operationId": "bulkUpsertProducts",
        "tags": [
          "Products"
        ],
        "summary": "Create or update products in bulk",
        "description": "Create or update up to 500 products in one call, matched by SKU. Scope `products`. Each item is checked on its own, so one bad item fails alone and the rest are saved; the request itself answers `200` with one result per item. A failed item's `error` is `{ code, message }`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkProductsRequest"
              },
              "example": {
                "items": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "name": "Organic T-shirt, black, medium",
                    "weight_g": 180
                  },
                  {
                    "sku": "TSHIRT-BLK-L",
                    "name": "Organic T-shirt, black, large",
                    "weight_g": 195
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/BulkProductResult"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/by-sku/{sku}": {
      "get": {
        "operationId": "getProductBySku",
        "tags": [
          "Products"
        ],
        "summary": "Get a product by SKU",
        "description": "The product with exactly this SKU (case-sensitive). Scope `products` or `stock`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sku",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "Your SKU, exactly. Percent-encode it (for example with encodeURIComponent): / and spaces, and also %, which must be sent as %25 (50%OFF as 50%25OFF). 1 to 64 characters, no spaces at either end; anything else is refused with 400 VALIDATION.",
            "example": "TSHIRT-BLK-M"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "upsertProductBySku",
        "tags": [
          "Products"
        ],
        "summary": "Create or update a product by SKU",
        "description": "Create or update the product with this SKU, so your system does not need to keep our `product_id`. Scope `products`. There is no 404: a SKU you do not have yet is created. The body is a product as for POST /products (`ProductInput`); `sku` may be left out, and `name` is required to create one (`400 VALIDATION` \"A new product needs a name.\" without it). A different `sku` in the body is refused with `400 SKU_MISMATCH`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sku",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "Your SKU, exactly. Percent-encode it (for example with encodeURIComponent): / and spaces, and also %, which must be sent as %25 (50%OFF as 50%25OFF).",
            "example": "TSHIRT-BLK-M"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              },
              "example": {
                "name": "Organic T-shirt, black, medium",
                "style": "TSHIRT-ORG",
                "colour": "Black",
                "size": "M",
                "weight_g": 180
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `SKU_MISMATCH`, `INVALID_BARCODE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `DUPLICATE`, `SKU_IN_USE`, `PRODUCT_HAS_STOCK`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inventory": {
      "get": {
        "operationId": "listStock",
        "tags": [
          "Stock"
        ],
        "summary": "List stock levels",
        "description": "Live stock for each active product, sorted by SKU. Scope `stock`. `data.as_of` is the server time the figures were read.\n\n**Sync.** With `updated_since` or `cursor`, the list is ordered oldest change first, leaves out records changed in the last 150 seconds, and carries `next_cursor` (more waiting: send it as `cursor`) or `next_updated_since` (caught up: keep it for your next sync). A record can come back more than once; treat each read as an upsert. A product counts as changed when its stock or its product record changes.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "SKU or name (any part, case does not matter), or an exact barcode. The text is matched as written: `%` and `_` are ordinary characters, not wildcards.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "in_stock_only",
            "in": "query",
            "required": false,
            "description": "Only products with stock. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "low_only",
            "in": "query",
            "required": false,
            "description": "Only products at or below their reorder level. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "`batches` adds `batches` to every row. Any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "string",
              "enum": [
                "batches"
              ]
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Only products whose stock or product record changed since then. An ISO 8601 date-time (2026-11-19T10:00:00Z), or a date (2026-11-19) meaning its UTC midnight. Anything else is refused with 400 VALIDATION.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T10:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` from the previous sync read of this same list, to carry on from it. Opaque and signed: send it back exactly as given, on its own (with `updated_since` as well it is refused with 400 VALIDATION). A cursor that was changed, made by hand, issued by another list, or issued before 20 Nov 2026 is refused with 400 VALIDATION: start again with `updated_since` set to the last `next_updated_since` you kept.",
            "schema": {
              "type": "string",
              "maxLength": 423
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 250 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 250 is brought down to 250.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/StockLevel"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null,
                          "description": "Only on a sync read (with `updated_since` or `cursor`). While more changed records wait, the value to send as `cursor` next; null once you have caught up. Opaque: do not build or change it."
                        },
                        "next_updated_since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": "2026-11-19T10:12:30.000Z",
                          "description": "Only on a sync read. Null while `next_cursor` is set; once caught up, the value to send as `updated_since` on your next sync."
                        },
                        "as_of": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the figures were read.",
                          "example": "2026-11-19T10:15:00.000Z"
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inventory/movements": {
      "get": {
        "operationId": "listStockMovements",
        "tags": [
          "Stock"
        ],
        "summary": "Read the stock ledger",
        "description": "Every change to your stock, for reconciling with your own records. Scope `stock`.\n\n**Two modes.** Page mode (no `after`): newest first, with `page` and `limit`. Cursor mode (`after`): oldest first from just after that `movement_id`, serving only movements at least 90 seconds old, with `next_after` for the next call (null when the page is not full; then ask again later with the last `movement_id` you have).\n\nA pick moves stock from a shelf to the pack bench; `DESPATCH` is what takes it out of the warehouse.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "A movement_id: cursor mode. Digits only, up to 9223372036854775807.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,19}$"
            },
            "example": "184467"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only movements at or after this time. An ISO 8601 date-time, or a date meaning its UTC midnight.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-01"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "description": "Only movements before this time (exclusive). An ISO 8601 date-time, or a date meaning its UTC midnight.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T00:00:00Z"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Comma-separated: OPENING_BALANCE, RECEIPT, ADJUSTMENT, PICK, PACK, DESPATCH, RETURN, DISPOSAL, KIT, INTERNAL. Any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "string"
            },
            "example": "ADJUSTMENT,RETURN"
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "description": "One SKU, exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "description": "One product. Must be a UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 250 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 250 is brought down to 250.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/StockMovement"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_after": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Only when `after` was sent: the last movement_id of a full page, to send as `after` next; null when the page is not full.",
                          "example": "184517"
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/returns": {
      "get": {
        "operationId": "listReturns",
        "tags": [
          "Returns"
        ],
        "summary": "List returns",
        "description": "Your returns, newest first. Scope `orders`. Each carries your `reference` and, once booked in, `received`.\n\n**Sync.** With `updated_since` or `cursor`, the list is ordered oldest change first, leaves out records changed in the last 150 seconds, and carries `next_cursor` (more waiting: send it as `cursor`) or `next_updated_since` (caught up: keep it for your next sync). A record can come back more than once; treat each read as an upsert.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
            "schema": {
              "type": "string",
              "enum": [
                "EXPECTED",
                "RECEIVED",
                "CLOSED",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "needs",
            "in": "query",
            "required": false,
            "description": "`client`: returns with an item waiting for your decision. `staff`: returns where we still have something to do. Any other value is refused with 400 VALIDATION.",
            "schema": {
              "type": "string",
              "enum": [
                "client",
                "staff"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Return number, return tracking number, your reference, your store_order_ref, the Angler order number, your order external_ref, the store order number or the exchange order number (any part). The text is matched as written: `%` and `_` are ordinary characters, not wildcards.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Only returns changed since then. An ISO 8601 date-time (2026-11-19T10:00:00Z), or a date (2026-11-19) meaning its UTC midnight. Anything else is refused with 400 VALIDATION.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T10:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` from the previous sync read of this same list, to carry on from it. Opaque and signed: send it back exactly as given, on its own (with `updated_since` as well it is refused with 400 VALIDATION). A cursor that was changed, made by hand, issued by another list, or issued before 20 Nov 2026 is refused with 400 VALIDATION: start again with `updated_since` set to the last `next_updated_since` you kept.",
            "schema": {
              "type": "string",
              "maxLength": 423
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 50 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 50 is brought down to 50.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReturnListItem"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null,
                          "description": "Only on a sync read (with `updated_since` or `cursor`). While more changed records wait, the value to send as `cursor` next; null once you have caught up. Opaque: do not build or change it."
                        },
                        "next_updated_since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": "2026-11-19T10:12:30.000Z",
                          "description": "Only on a sync read. Null while `next_cursor` is set; once caught up, the value to send as `updated_since` on your next sync."
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createReturn",
        "tags": [
          "Returns"
        ],
        "summary": "Announce a return",
        "description": "Tell us a return is on its way. Scope `orders`. Answers with the same object as GET /returns/{return_id}.\n\n**Safe retries.** Send a `reference` and a retry is always safe: the same `reference` again answers `200` with the return made first and `Idempotent-Replayed: true`. Without one this endpoint does not de-duplicate: before retrying after a timeout, search for the return with `GET /returns?search=`.\n\nA return must say something we can match it by: `lines`, `order_id`, `order_external_ref`, `store_order_ref` or `tracking_number`. With none of them it is refused with `400 VALIDATION`.\n\nSKUs in `lines` match as order lines do. An exchange is created as a new order, so an unverified live account gets `409 CLIENT_NOT_VERIFIED` for it. A return for a cancelled order is refused with `409 ORDER_CANCELLED`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReturnRequest"
              },
              "example": {
                "reference": "RMA-55120",
                "order_external_ref": "WEB-10023",
                "reason": "Wrong size",
                "tracking_number": "QW123456789GB",
                "client_note": "Restock if unopened",
                "lines": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "quantity": 1
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay: you have used this reference before. The record made first, unchanged, whatever this body says.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Return"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Return"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `UNKNOWN_SKU`, `EXCHANGE_NEEDS_ORDER`, `EXCHANGE_NEEDS_ADDRESS`, `EXCHANGE_NO_ADDRESS`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`, `ORDER_NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `ORDER_REF_AMBIGUOUS`, `CLIENT_NOT_VERIFIED`, `ORDER_CANCELLED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/returns/{return_id}": {
      "get": {
        "operationId": "getReturn",
        "tags": [
          "Returns"
        ],
        "summary": "Get a return",
        "description": "One return: what was announced, every item booked in with its grade and what was done with it, and what is missing or unexpected. Scope `orders`. Grades are A (like new, back on sale), B (opened or used) and C (damaged); B and C are held until you decide.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "return_id",
            "in": "path",
            "required": true,
            "description": "The return's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Return"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inbounds": {
      "get": {
        "operationId": "listInbounds",
        "tags": [
          "Inbounds"
        ],
        "summary": "List inbounds",
        "description": "Your inbounds, newest first. Scope `inbounds`. Each item is the full inbound. Booking goods in counts as a change, so a sync read picks up every receipt.\n\n**Sync.** With `updated_since` or `cursor`, the list is ordered oldest change first, leaves out records changed in the last 150 seconds, and carries `next_cursor` (more waiting: send it as `cursor`) or `next_updated_since` (caught up: keep it for your next sync). A record can come back more than once; treat each read as an upsert.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "DISPATCHED",
                "ARRIVED",
                "COMPLETED",
                "REJECTED",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "description": "Your ASN number, exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Only inbounds changed since then. An ISO 8601 date-time (2026-11-19T10:00:00Z), or a date (2026-11-19) meaning its UTC midnight. Anything else is refused with 400 VALIDATION.",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2026-11-19T10:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` from the previous sync read of this same list, to carry on from it. Opaque and signed: send it back exactly as given, on its own (with `updated_since` as well it is refused with 400 VALIDATION). A cursor that was changed, made by hand, issued by another list, or issued before 20 Nov 2026 is refused with 400 VALIDATION: start again with `updated_since` set to the last `next_updated_since` you kept.",
            "schema": {
              "type": "string",
              "maxLength": 423
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, at most 250 for an API key. Digits only: anything else is refused with 400 VALIDATION. 0 (or empty) means the default of 25; above 250 is brought down to 250.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items",
                        "pagination"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Inbound"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null,
                          "description": "Only on a sync read (with `updated_since` or `cursor`). While more changed records wait, the value to send as `cursor` next; null once you have caught up. Opaque: do not build or change it."
                        },
                        "next_updated_since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": "2026-11-19T10:12:30.000Z",
                          "description": "Only on a sync read. Null while `next_cursor` is set; once caught up, the value to send as `updated_since` on your next sync."
                        }
                      }
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createInbound",
        "tags": [
          "Inbounds"
        ],
        "summary": "Send an advance shipping notice",
        "description": "Tell us about stock on its way. Scope `inbounds`. If any line's SKU matches none of your products the whole ASN is refused (`400 UNKNOWN_SKU`, with `error.lines`), so nothing reaches our dock that goods-in cannot book; add the product and send the same reference again. Sandbox accounts can send ASNs; a live account that is not verified yet gets `409 CLIENT_NOT_VERIFIED`.\n\n**Safe retries.** The same `reference` again answers `200` with the inbound made first and `Idempotent-Replayed: true`, whatever the body.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInboundRequest"
              },
              "example": {
                "reference": "ASN-2026-0417",
                "expected_date": "2026-11-17",
                "carrier": "DHL Freight",
                "tracking_numbers": [
                  "JD014600006281940116"
                ],
                "cartons": 12,
                "pallets": 1,
                "lines": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "quantity": 240
                  },
                  {
                    "sku": "TSHIRT-BLK-L",
                    "quantity": 180
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay: you have used this reference before. The record made first, unchanged, whatever this body says.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Inbound"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Inbound"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `UNKNOWN_SKU`, `DATE_IN_PAST`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `REFERENCE_IN_USE`, `CLIENT_NOT_VERIFIED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inbounds/{inbound_id}": {
      "get": {
        "operationId": "getInbound",
        "tags": [
          "Inbounds"
        ],
        "summary": "Get an inbound",
        "description": "One inbound, with every line's figures. Scope `inbounds`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "inbound_id",
            "in": "path",
            "required": true,
            "description": "The inbound's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Inbound"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inbounds/{inbound_id}/cancel": {
      "post": {
        "operationId": "cancelInbound",
        "tags": [
          "Inbounds"
        ],
        "summary": "Cancel an inbound",
        "description": "Cancel an inbound that has not arrived (`PENDING`, `APPROVED` or `DISPATCHED`). Scope `inbounds`. Answers `200` with the inbound; cancelling one already cancelled answers it too. `ARRIVED`, `COMPLETED` or `REJECTED` gives `409 NOT_CANCELLABLE` (or `400 NOT_CANCELLABLE` if its status changed while we were cancelling it).",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "inbound_id",
            "in": "path",
            "required": true,
            "description": "The inbound's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Inbound"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `NOT_CANCELLABLE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `NOT_CANCELLABLE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inbounds/{inbound_id}/sandbox/receive": {
      "post": {
        "operationId": "receiveSandboxInbound",
        "tags": [
          "Sandbox"
        ],
        "summary": "Book a sandbox inbound in",
        "description": "Sandbox accounts only. Books a test inbound in, as expected or with the differences you give, completes it with a published receiving report, and sends `inbound.arrived` (if it had not arrived) and `inbound.received`, with `\"sandbox\": true`. Lines you do not name arrive exactly as expected. Allowed from `PENDING`, `APPROVED`, `DISPATCHED` or `ARRIVED`. Scope `inbounds`. Answers `200` with the inbound. No stock is created and nothing is charged: `booked_in` stays 0, `booked` and `unexpected` stay empty, and the stock levels and the stock ledger do not change. Arrival and receipt happen in this one call, so the `inbound.arrived` message already shows the inbound `COMPLETED`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "inbound_id",
            "in": "path",
            "required": true,
            "description": "The inbound's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxReceiveInboundRequest"
              },
              "example": {
                "lines": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "received": 238,
                    "damaged": 1
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Inbound"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `LINE_NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`, `SANDBOX_ONLY`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `INVALID_TRANSITION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{order_id}/sandbox/advance": {
      "post": {
        "operationId": "advanceSandboxOrder",
        "tags": [
          "Sandbox"
        ],
        "summary": "Advance a sandbox order",
        "description": "Sandbox accounts only. Moves a test order to its next step, or through every step up to `to`. Each step writes the same event a live order does, so webhooks fire, with `\"sandbox\": true` in `data` and in `data.details`. At `DESPATCHED` the order gets a parcel with carrier `Sandbox` and a made-up tracking number starting `ANGLERTEST`. A sandbox order reserves no stock: its lines show `qty_allocated` 0 and its allocation event reads \"Checked. Ready to pick (sandbox: no stock is reserved).\" Scope `orders`. Answers `200`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The order's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxAdvanceRequest"
              },
              "example": {
                "to": "DELIVERED"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/SandboxAdvanceResult"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`, `SANDBOX_ONLY`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `ORDER_ON_HOLD`, `INVALID_TRANSITION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/returns/{return_id}/sandbox/receive": {
      "post": {
        "operationId": "receiveSandboxReturn",
        "tags": [
          "Sandbox"
        ],
        "summary": "Book a sandbox return in",
        "description": "Sandbox accounts only. Books a test return in and sends `return.received` with `\"sandbox\": true`. Scope `orders`. Answers `200` with the return. With no body, or `\"lines\": []`, everything announced arrives as grade A; a return that announced nothing then needs `lines` (`400 LINES_REQUIRED`). A return already received answers `409 RETURN_ALREADY_RECEIVED`; a closed or cancelled one `409 RETURN_CLOSED`. `409 NO_WAREHOUSE` means the test warehouse is not set up yet: ask us. No stock is booked, so the stock levels and the stock ledger do not change.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "return_id",
            "in": "path",
            "required": true,
            "description": "The return's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxReceiveReturnRequest"
              },
              "example": {
                "lines": [
                  {
                    "sku": "TSHIRT-BLK-M",
                    "quantity": 1,
                    "grade": "B"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Return"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`, `BAD_REQUEST`, `INVALID_JSON`, `UNKNOWN_SKU`, `LINES_REQUIRED`, `INVALID_QUANTITY`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`, `SANDBOX_ONLY`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not yours. `error.code`: `NOT_FOUND`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with the current state. `error.code`: `RETURN_ALREADY_RECEIVED`, `RETURN_CLOSED`, `NO_WAREHOUSE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. `error.code`: `PAYLOAD_TOO_LARGE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not sent as JSON (Content-Type: application/json), is not UTF-8, or is compressed other than gzip or deflate. `error.code`: `UNSUPPORTED_MEDIA_TYPE`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "operationId": "getMe",
        "tags": [
          "Account"
        ],
        "summary": "Who this key is for",
        "description": "The account your key acts for, whether it is a sandbox or a live account, and the key's name, prefix and scopes. Any scope. Call it first, when your integration starts, to check which environment the key is for: a sandbox and a live account share the same base URL. Every success also carries the header `X-Angler-Sandbox: true` or `false`.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Angler-Sandbox": {
                "$ref": "#/components/headers/X-Angler-Sandbox"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Usually null."
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Also in the X-Request-Id header. Quote it when you contact us about a request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid. `error.code`: `VALIDATION`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or the key is unknown or revoked. `error.code`: `AUTH_REQUIRED`, `API_KEY_INVALID`, `AUTH_INVALID`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this. `error.code`: `FORBIDDEN`, `API_KEY_NOT_ALLOWED`, `WMS_NOT_ENABLED`, `ACCOUNT_SUSPENDED`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `error.code`: `RATE_LIMITED`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected fault. Retry later, and quote the request_id if it repeats. `error.code`: `INTERNAL_ERROR`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "order.created": {
      "post": {
        "operationId": "webhook_order_created",
        "tags": [
          "Webhooks"
        ],
        "summary": "An order arrived",
        "description": "An order arrived. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.created"
              ],
              "example": "order.created"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.created"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Order received."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.allocated": {
      "post": {
        "operationId": "webhook_order_allocated",
        "tags": [
          "Webhooks"
        ],
        "summary": "Checked and stock reserved: ready to pick. Also sent when a held order goes ahead by itself, for example when stock arrives",
        "description": "Checked and stock reserved: ready to pick. Also sent when a held order goes ahead by itself, for example when stock arrives. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.allocated"
              ],
              "example": "order.allocated"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.allocated"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Checked and stock reserved. Ready to pick."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.picking": {
      "post": {
        "operationId": "webhook_order_picking",
        "tags": [
          "Webhooks"
        ],
        "summary": "Picking started",
        "description": "Picking started. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.picking"
              ],
              "example": "order.picking"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.picking"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Being picked (PL-004211)."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.picked": {
      "post": {
        "operationId": "webhook_order_picked",
        "tags": [
          "Webhooks"
        ],
        "summary": "All items picked",
        "description": "All items picked. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.picked"
              ],
              "example": "order.picked"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.picked"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Picked. Waiting to be packed."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.packed": {
      "post": {
        "operationId": "webhook_order_packed",
        "tags": [
          "Webhooks"
        ],
        "summary": "Packed",
        "description": "Packed. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.packed"
              ],
              "example": "order.packed"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.packed"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Packed and checked."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.despatched": {
      "post": {
        "operationId": "webhook_order_despatched",
        "tags": [
          "Webhooks"
        ],
        "summary": "Despatched, with the tracking number",
        "description": "Despatched, with the tracking number. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.despatched"
              ],
              "example": "order.despatched"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.despatched"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Despatched with Royal Mail, tracking RM987654321GB."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.delivered": {
      "post": {
        "operationId": "webhook_order_delivered",
        "tags": [
          "Webhooks"
        ],
        "summary": "Delivered (courier tracking, or confirmed by our team)",
        "description": "Delivered (courier tracking, or confirmed by our team). De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.delivered"
              ],
              "example": "order.delivered"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.delivered"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Delivered."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "operationId": "webhook_order_cancelled",
        "tags": [
          "Webhooks"
        ],
        "summary": "Cancelled",
        "description": "Cancelled. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.cancelled"
              ],
              "example": "order.cancelled"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.cancelled"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Cancelled: Customer cancelled on our website"
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.released": {
      "post": {
        "operationId": "webhook_order_released",
        "tags": [
          "Webhooks"
        ],
        "summary": "A held order was released by our team or once its problem was fixed",
        "description": "A held order was released by our team or once its problem was fixed. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.released"
              ],
              "example": "order.released"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.released"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Hold released."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.address_changed": {
      "post": {
        "operationId": "webhook_order_address_changed",
        "tags": [
          "Webhooks"
        ],
        "summary": "The delivery address was changed",
        "description": "The delivery address was changed. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.address_changed"
              ],
              "example": "order.address_changed"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.address_changed"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "Delivery address changed."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.short_pick": {
      "post": {
        "operationId": "webhook_order_short_pick",
        "tags": [
          "Webhooks"
        ],
        "summary": "Fewer items were found than ordered",
        "description": "Fewer items were found than ordered. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.short_pick"
              ],
              "example": "order.short_pick"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.short_pick"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "1 x CAP-NAVY could not be found when picking. Angler is checking."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.claim_opened": {
      "post": {
        "operationId": "webhook_order_claim_opened",
        "tags": [
          "Webhooks"
        ],
        "summary": "A claim was opened with the courier",
        "description": "A claim was opened with the courier. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.claim_opened"
              ],
              "example": "order.claim_opened"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.claim_opened"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "A claim was opened with the courier (lost in transit)."
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "Facts about the event. `sandbox: true` for a sandbox step.",
                        "example": {}
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "order.held": {
      "post": {
        "operationId": "webhook_order_held",
        "tags": [
          "Webhooks"
        ],
        "summary": "An order was held",
        "description": "An order was held: not enough stock, an unknown SKU, a bad address, a label problem, or held by our team. An order held straight away when it is checked sends this too. De-duplicate on `id` (`evt_` and a whole number). Sent at least 60 seconds after the event, at least once. Messages leave in event order, but up to 3 are in flight to one webhook at a time and a failed one is retried later, so they can arrive out of order: use `created_at` and the order's `status` to decide what is current.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "order.held"
              ],
              "example": "order.held"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_184467"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "order.held"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "message",
                      "sandbox",
                      "details",
                      "order"
                    ],
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "A plain-English line about the event. Never carries a courier's own error text.",
                        "example": "On hold: Short: TSHIRT-BLK-M (2)"
                      },
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account or a sandbox step.",
                        "example": false
                      },
                      "details": {
                        "type": "object",
                        "description": "The hold. May also carry `sandbox: true`.",
                        "properties": {
                          "hold_code": {
                            "type": "string",
                            "enum": [
                              "UNMAPPED_SKU",
                              "MISSING_PRODUCT_DATA",
                              "ADDRESS_INVALID",
                              "INSUFFICIENT_STOCK",
                              "CREDIT_HOLD",
                              "CLIENT_QUERY",
                              "LABEL_FAILED",
                              "SHORT_PICK",
                              "MANUAL",
                              "NO_POSTAGE_PRICE",
                              "TOPUP_NEEDED",
                              "PAYMENT_PENDING"
                            ],
                            "example": "INSUFFICIENT_STOCK",
                            "description": "The newest open hold."
                          },
                          "reason": {
                            "type": "string",
                            "description": "For MANUAL and CLIENT_QUERY, the words our team typed; for every other code, a fixed sentence.",
                            "example": "Not enough stock. It goes ahead by itself as soon as the stock arrives."
                          },
                          "holds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "UNMAPPED_SKU",
                                    "MISSING_PRODUCT_DATA",
                                    "ADDRESS_INVALID",
                                    "INSUFFICIENT_STOCK",
                                    "CREDIT_HOLD",
                                    "CLIENT_QUERY",
                                    "LABEL_FAILED",
                                    "SHORT_PICK",
                                    "MANUAL",
                                    "NO_POSTAGE_PRICE",
                                    "TOPUP_NEEDED",
                                    "PAYMENT_PENDING"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "example": "Not enough stock. It goes ahead by itself as soon as the stock arrives."
                                }
                              }
                            },
                            "description": "Every open hold, newest first."
                          }
                        }
                      },
                      "order": {
                        "type": "object",
                        "description": "A snapshot of the order at the moment of the event, not when the message is sent. There is no customer name or address in a webhook.",
                        "properties": {
                          "order_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                          },
                          "number": {
                            "type": "string",
                            "example": "SO-284117"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "SHOPIFY",
                              "WOOCOMMERCE",
                              "TIKTOK",
                              "AMAZON",
                              "EBAY",
                              "API",
                              "CSV",
                              "MANUAL"
                            ],
                            "example": "API"
                          },
                          "channel_order_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "external_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "WEB-10023"
                          },
                          "sales_channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "website"
                          },
                          "return_tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "IMPORTED",
                              "ON_HOLD",
                              "ALLOCATED",
                              "PICKING",
                              "PICKED",
                              "PACKED",
                              "DESPATCHED",
                              "DELIVERED",
                              "CANCELLED"
                            ],
                            "example": "DESPATCHED",
                            "description": "As it stood when the event happened."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Organic T-shirt, black, medium"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "quantity_shipped": {
                                  "type": "integer",
                                  "description": "The quantity packed once the order is DESPATCHED or DELIVERED; 0 before that.",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "shipments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "parcel_no": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "carrier": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "Royal Mail"
                                },
                                "service_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "TPS48"
                                },
                                "tracking_number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "RM987654321GB"
                                },
                                "tracking_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
                                },
                                "despatched_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "example": "2026-11-16T16:05:40.950Z"
                                }
                              }
                            },
                            "description": "The parcels as they stood when the event happened. Carrier names, service codes and tracking links depend on the courier."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "inbound.arrived": {
      "post": {
        "operationId": "webhook_inbound_arrived",
        "tags": [
          "Webhooks"
        ],
        "summary": "A delivery arrived at the warehouse door",
        "description": "A delivery you told us about arrived at the warehouse door. `data.inbound` is the same object as GET /inbounds/{inbound_id}, cut to 100 items per list. De-duplicate on `id` (`evt_w` and a whole number). In a sandbox, POST /inbounds/{inbound_id}/sandbox/receive writes the arrival and the receipt together, so this message already shows the inbound `COMPLETED`, with the figures of `inbound.received`.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "inbound.arrived"
              ],
              "example": "inbound.arrived"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_w51207"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "inbound.arrived"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "sandbox",
                      "message",
                      "inbound"
                    ],
                    "properties": {
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account.",
                        "example": false
                      },
                      "message": {
                        "type": "string",
                        "example": "IN-000612 arrived at the warehouse."
                      },
                      "inbound": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Inbound"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "truncated": {
                                "type": "boolean",
                                "description": "Present, and true, only when a list in this object was longer than 100 and was cut to its first 100. Each cut list then has `<list>_total` beside it with the full count (for example `lines_total`). The whole record is one GET away.",
                                "example": true
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "inbound.received": {
      "post": {
        "operationId": "webhook_inbound_received",
        "tags": [
          "Webhooks"
        ],
        "summary": "A delivery was booked in",
        "description": "A delivery was booked in: expected, received, damaged, over and short, line by line. Sent again, as the corrected record, if a receipt is corrected. `data.inbound` is the same object as GET /inbounds/{inbound_id}, cut to 100 items per list.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "inbound.received"
              ],
              "example": "inbound.received"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_w51208"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "inbound.received"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "sandbox",
                      "message",
                      "inbound"
                    ],
                    "properties": {
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account.",
                        "example": false
                      },
                      "message": {
                        "type": "string",
                        "example": "IN-000612 booked in."
                      },
                      "inbound": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Inbound"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "truncated": {
                                "type": "boolean",
                                "description": "Present, and true, only when a list in this object was longer than 100 and was cut to its first 100. Each cut list then has `<list>_total` beside it with the full count (for example `lines_total`). The whole record is one GET away.",
                                "example": true
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "inventory.adjusted": {
      "post": {
        "operationId": "webhook_inventory_adjusted",
        "tags": [
          "Webhooks"
        ],
        "summary": "Stock was corrected outside an order",
        "description": "Stock was corrected outside an order (a count, found, lost or damaged), once approved. Never sent for picks or despatches.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "inventory.adjusted"
              ],
              "example": "inventory.adjusted"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_w51209"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "inventory.adjusted"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "sandbox",
                      "message",
                      "adjustment"
                    ],
                    "properties": {
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account.",
                        "example": false
                      },
                      "message": {
                        "type": "string",
                        "example": "TSHIRT-BLK-M -3 (ADJUST_DAMAGED)."
                      },
                      "adjustment": {
                        "type": "object",
                        "properties": {
                          "adjustment_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "6f8a0c2e-4b6d-4e8f-a1c3-5e7f9a1b3c5d"
                          },
                          "product_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
                          },
                          "sku": {
                            "type": "string",
                            "example": "TSHIRT-BLK-M"
                          },
                          "quantity_delta": {
                            "type": "integer",
                            "example": -3
                          },
                          "reason_code": {
                            "type": "string",
                            "enum": [
                              "ADJUST_FOUND",
                              "ADJUST_LOST",
                              "ADJUST_DAMAGED",
                              "ADJUST_COUNT",
                              "ADJUST_CLIENT_REQUEST"
                            ],
                            "example": "ADJUST_DAMAGED"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "Water damage found on carton 4"
                          },
                          "batch": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "expiry": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date",
                            "example": null
                          },
                          "stock_status": {
                            "type": "string",
                            "enum": [
                              "AVAILABLE",
                              "QUARANTINE",
                              "DAMAGED",
                              "RECEIVING",
                              "SUSPECT",
                              "PICKED"
                            ],
                            "example": "AVAILABLE"
                          },
                          "requested_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-11-19T08:58:30.000Z"
                          },
                          "approved_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-11-19T09:32:07.902Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "return.received": {
      "post": {
        "operationId": "webhook_return_received",
        "tags": [
          "Webhooks"
        ],
        "summary": "A return was booked in",
        "description": "A return was booked in: what was expected, every item received with its grade and what was done with it, and what is missing or unexpected. This is its own shape, not the GET /returns/{return_id} object. Lists are cut to 100 items.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "return.received"
              ],
              "example": "return.received"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The event id. De-duplicate on it: a message can arrive more than once.",
                    "example": "evt_w51210"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "return.received"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "sandbox",
                      "message",
                      "return"
                    ],
                    "properties": {
                      "sandbox": {
                        "type": "boolean",
                        "description": "true for a sandbox account.",
                        "example": false
                      },
                      "message": {
                        "type": "string",
                        "example": "RT-018342 booked in."
                      },
                      "return": {
                        "type": "object",
                        "properties": {
                          "return_id": {
                            "type": "string",
                            "format": "uuid",
                            "example": "8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10"
                          },
                          "number": {
                            "type": "string",
                            "example": "RT-018342"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "RMA-55120"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "EXPECTED",
                              "RECEIVED",
                              "CLOSED",
                              "CANCELLED"
                            ],
                            "example": "RECEIVED"
                          },
                          "order": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "The order it came from.",
                            "properties": {
                              "order_id": {
                                "type": "string",
                                "format": "uuid",
                                "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                              },
                              "number": {
                                "type": "string",
                                "example": "SO-284117"
                              },
                              "external_ref": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "example": "WEB-10023"
                              },
                              "channel_order_number": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "example": null
                              }
                            }
                          },
                          "store_order_ref": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "tracking_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "QW123456789GB"
                          },
                          "received_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "example": "2026-11-19T11:30:00.000Z"
                          },
                          "expected": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/SkuQuantity"
                            },
                            "description": "What was announced."
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "item_id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "example": "9c7e5a3b-2d4f-4b6c-8e0a-1f3b5d7e9a21"
                                },
                                "product_id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
                                },
                                "sku": {
                                  "type": "string",
                                  "example": "TSHIRT-BLK-M"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "grade": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "A",
                                    "B",
                                    "C",
                                    null
                                  ],
                                  "example": "A"
                                },
                                "grade_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "like new"
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "RESTOCK",
                                    "QUARANTINE",
                                    "DAMAGED",
                                    "DISPOSE"
                                  ],
                                  "example": "RESTOCK"
                                },
                                "disposition_label": {
                                  "type": "string",
                                  "example": "Back in stock"
                                },
                                "batch": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": null
                                },
                                "expiry": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date",
                                  "example": null
                                },
                                "note": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": null
                                },
                                "received_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2026-11-19T11:30:00.000Z"
                                },
                                "decision": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "KEEP",
                                    "HOLD",
                                    "DISPOSE",
                                    "SEND_BACK",
                                    null
                                  ],
                                  "example": null
                                }
                              }
                            },
                            "description": "Everything booked in."
                          },
                          "missing": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/SkuQuantity"
                            },
                            "description": "Expected but not received."
                          },
                          "unexpected": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/SkuQuantity"
                            },
                            "description": "Received but not expected, or more than expected."
                          },
                          "truncated": {
                            "type": "boolean",
                            "description": "Present, and true, only when a list in this object was longer than 100 and was cut to its first 100. Each cut list then has `<list>_total` beside it with the full count (for example `lines_total`). The whole record is one GET away.",
                            "example": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    },
    "ping": {
      "post": {
        "operationId": "webhook_ping",
        "tags": [
          "Webhooks"
        ],
        "summary": "A test message",
        "description": "Only from \"Send a test\" in the portal. Never retried.",
        "security": [],
        "parameters": [
          {
            "name": "Angler-Event",
            "in": "header",
            "required": true,
            "description": "The event type, the same as `type` in the body.",
            "schema": {
              "type": "string",
              "enum": [
                "ping"
              ],
              "example": "ping"
            }
          },
          {
            "name": "Angler-Delivery",
            "in": "header",
            "required": true,
            "description": "The id of this message, the same on every retry of it.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Angler-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>`. The HMAC is of `<t>.<raw body>`, keyed with your whole signing secret including `whsec_`. Each retry is signed again with a new `t`.",
            "schema": {
              "type": "string",
              "example": "t=1794845141,v1=5f2c..."
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AnglerFulfilment-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "created_at",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "`ping_` and 12 hex characters.",
                    "example": "ping_3f9a1c2e5b7d"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "ping"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event happened.",
                    "example": "2026-11-16T16:05:41.207Z"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Test message from Angler Fulfilment."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 10 seconds; anything else, a redirect included, counts as a failure and is retried."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Your API key, for example afk_3f9a1c2e_... It is shown once, when created."
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "The id of this request. Quote it when you contact us.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "X-RateLimit-Limit": {
        "description": "Requests allowed per window (one minute) for this endpoint, counted per API key (per IP address when no valid key is sent). Sent on every response from an API route, errors included (400, 413 and 415 too). Not sent on a 404 for a path that is not an API route, nor on the 400 for a path whose %-encoding cannot be decoded, which are answered before any route is found.",
        "schema": {
          "type": "integer",
          "example": 100
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer",
          "example": 97
        }
      },
      "X-RateLimit-Reset": {
        "description": "Seconds (not a timestamp) until the window resets. The window is fixed, not sliding.",
        "schema": {
          "type": "integer",
          "example": 42
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before trying again.",
        "schema": {
          "type": "integer",
          "example": 42
        }
      },
      "X-Angler-Sandbox": {
        "description": "`true` when the API key is for a sandbox account, `false` for a live one. On every success, and on the errors that come after the key is checked. Not on a 401, nor on an error about the request itself that is answered before the key is read (a body that is not JSON, too large or not UTF-8, or a query parameter sent twice or with brackets). GET /me says the same in its body.",
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ]
        }
      },
      "Cache-Control": {
        "description": "Always `no-store`: answers are about live data and are never to be cached.",
        "schema": {
          "type": "string",
          "enum": [
            "no-store"
          ]
        }
      },
      "Idempotent-Replayed": {
        "description": "`true` when this answer is a replay: the reference was used before, so this is the record made first, unchanged.",
        "schema": {
          "type": "string",
          "enum": [
            "true"
          ]
        }
      }
    },
    "schemas": {
      "AddDocumentsRequest": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDocumentInput"
            },
            "maxItems": 3,
            "description": "Up to 3 in all on the order. A file already on the order (same content) is not added again."
          },
          "return_tracking_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 -]{1,58}[A-Za-z0-9]$",
            "description": "Sets or changes the return tracking number.",
            "example": "QZ123456789GB"
          }
        }
      },
      "Address": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "example": "Alex Example"
          },
          "company": {
            "type": "string",
            "maxLength": 120,
            "example": "Example Ltd"
          },
          "email": {
            "type": "string",
            "maxLength": 200,
            "example": "alex@example.com"
          },
          "phone": {
            "type": "string",
            "maxLength": 40,
            "example": "+447700900123"
          },
          "line1": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "example": "10 Example Street"
          },
          "line2": {
            "type": "string",
            "maxLength": 200,
            "example": "Flat 2"
          },
          "city": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "example": "Manchester"
          },
          "region": {
            "type": "string",
            "maxLength": 100,
            "example": "Greater Manchester"
          },
          "postcode": {
            "type": "string",
            "maxLength": 12,
            "description": "UK postcodes are checked and tidied (m11aa becomes M1 1AA). May be empty for IE, HK and AE. A bad postcode does not reject the order: it is created and held with ADDRESS_INVALID.",
            "example": "M1 1AA"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2.",
            "pattern": "^[A-Za-z]{2}$",
            "example": "GB"
          }
        },
        "required": [
          "name",
          "line1",
          "city",
          "postcode",
          "country"
        ]
      },
      "BarcodeInput": {
        "type": "object",
        "properties": {
          "barcode": {
            "type": "string",
            "pattern": "^[A-Za-z0-9\\-.]{4,48}$",
            "example": "5012345678900"
          },
          "uom": {
            "type": "string",
            "enum": [
              "EACH",
              "INNER",
              "CASE",
              "PALLET"
            ],
            "description": "EACH by default.",
            "example": "EACH"
          },
          "quantity": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1,
            "description": "Units in the INNER, CASE or PALLET. Needed for anything but EACH.",
            "example": 24
          }
        },
        "required": [
          "barcode"
        ]
      },
      "BulkProductsRequest": {
        "type": "object",
        "properties": {
          "items": {
            "description": "1 to 500 products, each with its sku",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductInput"
            },
            "maxItems": 500,
            "minItems": 1
          }
        },
        "required": [
          "items"
        ]
      },
      "CancelOrderRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "description": "Why the order is cancelled.",
            "example": "Customer cancelled on our website"
          }
        },
        "required": [
          "reason"
        ]
      },
      "CreateInboundRequest": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Your ASN number, unique for you. Sending the same one again answers 200 with the inbound made first, unchanged, and the header Idempotent-Replayed: true.",
            "maxLength": 64,
            "minLength": 1,
            "example": "ASN-2026-0417"
          },
          "expected_date": {
            "type": "string",
            "description": "YYYY-MM-DD, from today (UK time) to at most two years ahead. A later date is refused with 400 VALIDATION.",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "example": "2026-11-17"
          },
          "carrier": {
            "type": "string",
            "maxLength": 100,
            "example": "DHL Freight"
          },
          "tracking_numbers": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxItems": 20,
            "example": [
              "JD014600006281940116"
            ]
          },
          "cartons": {
            "type": "integer",
            "description": "Cartons coming, at least 1",
            "maximum": 100000,
            "minimum": 1,
            "example": 12
          },
          "pallets": {
            "type": "integer",
            "description": "Pallets the cartons are on",
            "maximum": 10000,
            "minimum": 0,
            "example": 1
          },
          "note": {
            "type": "string",
            "maxLength": 1000
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboundLineInput"
            },
            "maxItems": 500,
            "minItems": 1
          }
        },
        "required": [
          "reference",
          "expected_date",
          "cartons",
          "lines"
        ]
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "external_ref": {
            "type": "string",
            "description": "Your order reference, and the de-duplication key: sending the same external_ref again (compared exactly, after trimming spaces) answers 200 with the first order, unchanged, and the header Idempotent-Replayed: true. So a timed-out request is safe to retry.",
            "maxLength": 64,
            "minLength": 1,
            "example": "WEB-10023"
          },
          "ship_to": {
            "$ref": "#/components/schemas/Address"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineInput"
            },
            "maxItems": 200,
            "minItems": 1
          },
          "urgent": {
            "type": "boolean",
            "description": "Default false.",
            "example": false
          },
          "requested_service": {
            "type": "string",
            "maxLength": 80,
            "description": "The delivery service you would like.",
            "example": "Tracked 48"
          },
          "gift_message": {
            "type": "string",
            "maxLength": 500,
            "example": "Happy birthday!"
          },
          "packing_instructions": {
            "type": "string",
            "maxLength": 500,
            "example": "Please include the returns slip."
          },
          "order_value": {
            "type": "string",
            "pattern": "^\\d{1,10}(\\.\\d{1,4})?$",
            "description": "Decimal string, recorded in GBP.",
            "example": "44.97"
          },
          "sales_channel": {
            "type": "string",
            "description": "Where the order was sold, in your own short code. Stored lower-case with single spaces.",
            "maxLength": 40,
            "example": "website"
          },
          "channel_order_number": {
            "type": "string",
            "description": "The marketplace's own order number. Also found by search.",
            "maxLength": 100,
            "example": "302-1234567-1234567"
          },
          "return_tracking_number": {
            "type": "string",
            "description": "The tracking number of a return label you send in the parcel.",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 -]{1,58}[A-Za-z0-9]$",
            "example": "QZ123456789GB"
          },
          "documents": {
            "description": "Up to 3 PDFs (packing slips, return labels) printed with the order. Each is checked before the order is made; if one fails, nothing is created.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDocumentInput"
            },
            "maxItems": 3
          }
        },
        "required": [
          "external_ref",
          "ship_to",
          "lines"
        ]
      },
      "CreateReturnRequest": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Your return or RMA number. When sent, the return is de-duplicated on it: sending it again answers 200 with the return made first, unchanged, and the header Idempotent-Replayed: true.",
            "maxLength": 64,
            "minLength": 1,
            "example": "RMA-55120"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "The Angler order it came from.",
            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
          },
          "order_external_ref": {
            "type": "string",
            "description": "Your own order reference instead of order_id: the external_ref of an API order, else the store order number",
            "maxLength": 100,
            "minLength": 1
          },
          "store_order_ref": {
            "type": "string",
            "description": "Your order number, if we did not send the order.",
            "maxLength": 60,
            "example": "#1042"
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "example": "Wrong size"
          },
          "tracking_number": {
            "type": "string",
            "maxLength": 64,
            "description": "The return parcel's tracking number.",
            "example": "QW123456789GB"
          },
          "client_note": {
            "type": "string",
            "maxLength": 1000,
            "example": "Restock if unopened"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnLineInput"
            },
            "maxItems": 200
          },
          "exchange": {
            "description": "Send the customer something else instead, once this return is booked in. Needs order_id.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExchangeInput"
              }
            ]
          }
        }
      },
      "ExchangeInput": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnLineInput"
            },
            "maxItems": 50,
            "minItems": 1
          },
          "ship_to": {
            "description": "Where to send the replacement. Needed when the return has no order_id.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          }
        },
        "required": [
          "lines"
        ]
      },
      "InboundLineInput": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "Your SKU or one of the product's barcodes (a case barcode multiplies the quantity by its pack size). Give sku or product_id.",
            "maxLength": 100,
            "example": "TSHIRT-BLK-M"
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "description": "The product, instead of sku."
          },
          "quantity": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 1,
            "example": 240
          },
          "batch": {
            "type": "string",
            "maxLength": 64
          },
          "expiry": {
            "type": "string",
            "description": "YYYY-MM-DD",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "quantity"
        ]
      },
      "OrderDocumentInput": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PACKING_SLIP",
              "RETURN_LABEL"
            ],
            "example": "RETURN_LABEL"
          },
          "filename": {
            "type": "string",
            "description": "Must end in .pdf",
            "maxLength": 200,
            "minLength": 1,
            "example": "return-SO-284117.pdf"
          },
          "content_base64": {
            "type": "string",
            "description": "The PDF, base64 encoded (a data:application/pdf;base64, prefix and line breaks are fine). At most 2 MB once decoded and 10 pages.",
            "maxLength": 2900000,
            "minLength": 1,
            "example": "JVBERi0xLjcKJcfsj6IK..."
          }
        },
        "required": [
          "type",
          "filename",
          "content_base64"
        ]
      },
      "OrderLineInput": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "description": "Matched to your products: exact SKU, then SKU ignoring case, then a product barcode.",
            "example": "TSHIRT-BLK-M"
          },
          "quantity": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1,
            "example": 2
          },
          "unit_price": {
            "type": "string",
            "pattern": "^\\d{1,10}(\\.\\d{1,4})?$",
            "description": "Decimal string.",
            "example": "14.99"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Shown to the warehouse.",
            "example": "T-shirt, black, M"
          }
        },
        "required": [
          "sku",
          "quantity"
        ]
      },
      "ProductInput": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "pattern": "^\\S(.{0,62}\\S)?$",
            "description": "Unique for you. Required to create a product. It cannot change once the product has stock history.",
            "example": "TSHIRT-BLK-M"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "description": "Required to create a product.",
            "example": "Organic T-shirt, black, medium"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000,
            "example": "100% organic cotton."
          },
          "length_mm": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 10000,
            "minimum": 0,
            "example": 300
          },
          "width_mm": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 10000,
            "minimum": 0,
            "example": 250
          },
          "height_mm": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 10000,
            "minimum": 0,
            "example": 20
          },
          "weight_g": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 1000000,
            "minimum": 0,
            "description": "Needed before a courier label can be bought.",
            "example": 180
          },
          "declared_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string: the value of one unit, for customs.",
            "pattern": "^\\d{1,10}(\\.\\d{1,4})?$",
            "example": "14.99"
          },
          "hs_code": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{6,10}$",
            "example": "610910"
          },
          "country_of_origin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Za-z]{2}$",
            "description": "ISO 3166-1 alpha-2 (`UK` is stored as `GB`). A code that is not a country, such as `XX`, is refused with 400 VALIDATION.",
            "example": "PT"
          },
          "kind": {
            "type": "string",
            "enum": [
              "SIMPLE",
              "VIRTUAL_BUNDLE",
              "KIT"
            ],
            "description": "SIMPLE by default. A bundle's or kit's components are set up in the portal.",
            "example": "SIMPLE"
          },
          "fnsku": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Za-z0-9]{10}$",
            "description": "Amazon FBA label code.",
            "example": "X00ABCDE12"
          },
          "batch_tracked": {
            "type": "boolean",
            "example": false
          },
          "expiry_tracked": {
            "type": "boolean",
            "example": false
          },
          "serial_tracked": {
            "type": "boolean",
            "example": false
          },
          "fragile": {
            "type": "boolean",
            "example": false
          },
          "dangerous_goods": {
            "type": "boolean",
            "example": false
          },
          "reorder_level": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 10000000,
            "minimum": 0,
            "description": "You are alerted when available stock falls to this level.",
            "example": 50
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 40
            },
            "maxItems": 20,
            "description": "When sent, replaces the whole list; [] empties it.",
            "example": [
              "summer"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "false retires the product. A product with stock in the warehouse cannot be made inactive.",
            "example": true
          },
          "barcodes": {
            "description": "When sent, replaces the whole list; [] empties it.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BarcodeInput"
            },
            "maxItems": 20
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "e.g. M, 10, 32R",
            "maxLength": 40,
            "example": "M"
          },
          "colour": {
            "type": [
              "string",
              "null"
            ],
            "description": "e.g. Navy",
            "maxLength": 60,
            "example": "Black"
          },
          "style": {
            "type": [
              "string",
              "null"
            ],
            "description": "The style (parent) code every size and colour of it shares.",
            "maxLength": 64,
            "example": "TSHIRT-ORG"
          }
        }
      },
      "ReturnLineInput": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "The product, or give sku",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "description": "Your SKU or one of the product's barcodes, instead of product_id",
            "maxLength": 100
          },
          "quantity": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1,
            "example": 1
          }
        },
        "required": [
          "quantity"
        ]
      },
      "SandboxAdvanceRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "enum": [
              "PICKING",
              "PICKED",
              "PACKED",
              "DESPATCHED",
              "DELIVERED"
            ],
            "description": "The step to move to. Left out, the next step.",
            "example": "DELIVERED"
          }
        }
      },
      "SandboxInboundLine": {
        "type": "object",
        "properties": {
          "line_id": {
            "type": "string",
            "description": "The inbound line. Or give sku: it matches the first line with that SKU (case does not matter) not already named.",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "maxLength": 100,
            "example": "TSHIRT-BLK-M"
          },
          "received": {
            "type": "integer",
            "description": "Units found",
            "maximum": 1000000,
            "minimum": 0,
            "example": 238
          },
          "damaged": {
            "type": "integer",
            "description": "Of those received, how many are damaged. Not more than received.",
            "maximum": 1000000,
            "minimum": 0,
            "example": 1
          }
        },
        "required": [
          "received"
        ]
      },
      "SandboxReceiveInboundRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "description": "Lines to book in differently; every other line arrives as expected",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxInboundLine"
            },
            "maxItems": 500
          }
        }
      },
      "SandboxReceiveReturnRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "description": "What to pretend came back. Left out: every announced line, grade A",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxReturnLine"
            },
            "maxItems": 200
          }
        }
      },
      "SandboxReturnLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "The product, or give sku.",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "description": "Your SKU or one of the product's barcodes, instead of product_id.",
            "maxLength": 100,
            "example": "TSHIRT-BLK-M"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "example": 1
          },
          "grade": {
            "type": "string",
            "enum": [
              "A",
              "B",
              "C"
            ],
            "description": "A (like new, back on sale), B (opened or used) or C (damaged). Default A.",
            "example": "B"
          }
        },
        "required": [
          "quantity"
        ]
      },
      "Barcode": {
        "type": "object",
        "properties": {
          "barcode": {
            "type": "string",
            "example": "5012345678900"
          },
          "uom": {
            "type": "string",
            "enum": [
              "EACH",
              "INNER",
              "CASE",
              "PALLET"
            ],
            "example": "EACH"
          },
          "quantity": {
            "type": "integer",
            "description": "Units in one of these (1 for EACH).",
            "example": 1
          }
        },
        "required": [
          "barcode",
          "uom",
          "quantity"
        ]
      },
      "BulkProductResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "The item's place in your request, from 0.",
                  "example": 2
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "TSHIRT-BLK-XL"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "created",
                    "updated",
                    "error"
                  ],
                  "example": "error"
                },
                "product_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "example": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70"
                },
                "error": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Null unless status is error.",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "VALIDATION",
                        "INVALID_BARCODE",
                        "BARCODE_IN_USE",
                        "PRODUCT_HAS_STOCK",
                        "SKU_EXISTS",
                        "SAVE_FAILED"
                      ],
                      "example": "VALIDATION"
                    },
                    "message": {
                      "type": "string",
                      "example": "A new product needs a name."
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              },
              "required": [
                "index",
                "sku",
                "status",
                "product_id",
                "error"
              ]
            },
            "description": "One result per item, in the order sent."
          },
          "summary": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "example": 3
              },
              "created": {
                "type": "integer",
                "example": 1
              },
              "updated": {
                "type": "integer",
                "example": 1
              },
              "errors": {
                "type": "integer",
                "example": 1
              }
            },
            "required": [
              "total",
              "created",
              "updated",
              "errors"
            ]
          }
        },
        "required": [
          "items",
          "summary"
        ]
      },
      "Hold": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "UNMAPPED_SKU",
              "MISSING_PRODUCT_DATA",
              "ADDRESS_INVALID",
              "INSUFFICIENT_STOCK",
              "CREDIT_HOLD",
              "CLIENT_QUERY",
              "LABEL_FAILED",
              "SHORT_PICK",
              "MANUAL",
              "NO_POSTAGE_PRICE",
              "TOPUP_NEEDED",
              "PAYMENT_PENDING"
            ],
            "description": "Treat a code you do not recognise as one a person deals with.",
            "example": "INSUFFICIENT_STOCK"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "What exactly is wrong. For LABEL_FAILED, a fixed sentence.",
            "example": "Short: TSHIRT-BLK-M (2)"
          },
          "help": {
            "type": [
              "string",
              "null"
            ],
            "description": "A plain-English line about the hold.",
            "example": "Not enough stock. It goes ahead by itself as soon as the stock arrives."
          }
        },
        "required": [
          "code",
          "detail",
          "help"
        ]
      },
      "Inbound": {
        "type": "object",
        "properties": {
          "inbound_id": {
            "type": "string",
            "format": "uuid",
            "example": "4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70"
          },
          "number": {
            "type": "string",
            "example": "IN-000612"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your ASN number.",
            "example": "ASN-2026-0417"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "APPROVED",
              "DISPATCHED",
              "ARRIVED",
              "COMPLETED",
              "REJECTED",
              "CANCELLED"
            ],
            "example": "COMPLETED"
          },
          "received": {
            "type": "boolean",
            "description": "true once the inbound is COMPLETED.",
            "example": true
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2026-11-17"
          },
          "allocated_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The day our team booked for the delivery.",
            "example": "2026-11-17"
          },
          "time_slot": {
            "type": [
              "string",
              "null"
            ],
            "example": "08:00-10:00"
          },
          "carrier": {
            "type": [
              "string",
              "null"
            ],
            "example": "DHL Freight"
          },
          "tracking_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "JD014600006281940116"
            ]
          },
          "cartons": {
            "type": [
              "integer",
              "null"
            ],
            "example": 12
          },
          "pallets": {
            "type": [
              "integer",
              "null"
            ],
            "example": 1
          },
          "arrived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-17T08:47:12.000Z"
          },
          "received_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-17T13:20:05.000Z"
          },
          "cartons_received": {
            "type": [
              "integer",
              "null"
            ],
            "example": 12
          },
          "pallets_received": {
            "type": [
              "integer",
              "null"
            ],
            "example": 1
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "GOOD",
              "DAMAGED",
              "PARTIAL",
              null
            ],
            "example": "GOOD",
            "description": "How the delivery arrived, recorded at the door: GOOD (in good order), DAMAGED (cartons or pallets arrived damaged) or PARTIAL (only part of the delivery arrived). Null until it arrives. discrepancy_note says more when it is not GOOD."
          },
          "discrepancy_note": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboundLine"
            }
          },
          "unexpected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "example": "TSHIRT-BLK-S"
                },
                "product_id": {
                  "type": "string",
                  "format": "uuid",
                  "example": "f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92"
                },
                "batch": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": null
                },
                "expiry": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date",
                  "example": null
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "AVAILABLE",
                    "QUARANTINE",
                    "DAMAGED",
                    "RECEIVING",
                    "SUSPECT",
                    "PICKED"
                  ],
                  "example": "AVAILABLE"
                },
                "quantity": {
                  "type": "integer",
                  "example": 6
                }
              },
              "required": [
                "sku",
                "product_id",
                "batch",
                "expiry",
                "status",
                "quantity"
              ]
            },
            "description": "Stock booked against the delivery that no line named."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-12T11:02:31.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Booking goods in counts as a change.",
            "example": "2026-11-17T13:20:05.000Z"
          }
        },
        "required": [
          "inbound_id",
          "number",
          "reference",
          "status",
          "received",
          "expected_date",
          "allocated_date",
          "time_slot",
          "carrier",
          "tracking_numbers",
          "cartons",
          "pallets",
          "arrived_at",
          "received_at",
          "cartons_received",
          "pallets_received",
          "condition",
          "discrepancy_note",
          "lines",
          "unexpected",
          "created_at",
          "updated_at"
        ]
      },
      "InboundLine": {
        "type": "object",
        "properties": {
          "line_id": {
            "type": "string",
            "format": "uuid",
            "example": "b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "description": "The SKU on the line. A line sent through the API always has one; a booking made in the portal may have a line without.",
            "example": "TSHIRT-BLK-M"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "batch": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "expiry": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": null
          },
          "expected": {
            "type": "integer",
            "description": "What your ASN said.",
            "example": 240
          },
          "received": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Once our receiving report is published to you: everything counted (good, damaged, other and over). Before that: the count at the door, or the units booked in.",
            "example": 238
          },
          "damaged": {
            "type": [
              "integer",
              "null"
            ],
            "example": 1
          },
          "over": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Null until the inbound is COMPLETED, unless a receiving report is published.",
            "example": 0
          },
          "short": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Null until the inbound is COMPLETED, unless a receiving report is published.",
            "example": 2
          },
          "booked_in": {
            "type": "integer",
            "description": "Units put into stock.",
            "example": 237
          },
          "booked": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "batch": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": null
                },
                "expiry": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date",
                  "example": null
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "AVAILABLE",
                    "QUARANTINE",
                    "DAMAGED",
                    "RECEIVING",
                    "SUSPECT",
                    "PICKED"
                  ],
                  "example": "AVAILABLE"
                },
                "quantity": {
                  "type": "integer",
                  "example": 237
                }
              },
              "required": [
                "batch",
                "expiry",
                "status",
                "quantity"
              ]
            },
            "description": "booked_in by batch, expiry and stock status."
          }
        },
        "required": [
          "line_id",
          "sku",
          "product_id",
          "description",
          "batch",
          "expiry",
          "expected",
          "received",
          "damaged",
          "over",
          "short",
          "booked_in",
          "booked"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "client": {
            "type": [
              "object",
              "null"
            ],
            "description": "The account the key acts for.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Your account's id.",
                "example": "7a9c1e3f-5b7d-4f9a-8c1e-3f5b7d9a1c2e"
              },
              "trading_name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Example Trading"
              }
            },
            "required": [
              "id",
              "trading_name"
            ]
          },
          "sandbox": {
            "type": "boolean",
            "description": "true for a sandbox account. The same as the X-Angler-Sandbox header.",
            "example": true
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ],
            "example": "sandbox",
            "description": "`sandbox` or `live`: the same fact as `sandbox`, in words."
          },
          "api_key": {
            "type": [
              "object",
              "null"
            ],
            "description": "The key this request was made with.",
            "properties": {
              "name": {
                "type": "string",
                "example": "ERP test"
              },
              "prefix": {
                "type": "string",
                "description": "The key's prefix, as shown in the portal. Never the key itself.",
                "example": "afk_3f9a1c2e"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "orders",
                    "stock",
                    "products",
                    "inbounds"
                  ]
                },
                "example": [
                  "orders",
                  "products",
                  "stock",
                  "inbounds"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-20T09:00:00.000Z"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the key was last used.",
                "example": "2026-11-20T09:14:02.311Z"
              }
            },
            "required": [
              "name",
              "prefix",
              "scopes",
              "created_at",
              "last_used_at"
            ]
          }
        },
        "required": [
          "client",
          "sandbox",
          "environment",
          "api_key"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
          },
          "number": {
            "type": "string",
            "description": "The Angler order number. The prefix can differ per account.",
            "example": "SO-284117"
          },
          "channel": {
            "type": "string",
            "enum": [
              "SHOPIFY",
              "WOOCOMMERCE",
              "TIKTOK",
              "AMAZON",
              "EBAY",
              "API",
              "CSV",
              "MANUAL"
            ],
            "example": "API"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ],
            "example": "WEB-10023"
          },
          "sales_channel": {
            "type": [
              "string",
              "null"
            ],
            "example": "website"
          },
          "channel_order_number": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "return_tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "status": {
            "type": "string",
            "enum": [
              "IMPORTED",
              "ON_HOLD",
              "ALLOCATED",
              "PICKING",
              "PICKED",
              "PACKED",
              "DESPATCHED",
              "DELIVERED",
              "CANCELLED"
            ],
            "example": "ALLOCATED"
          },
          "urgent": {
            "type": "boolean",
            "example": false
          },
          "ordered_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.512Z"
          },
          "ship_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The despatch deadline, from our cut-off times.",
            "example": "2026-11-16T14:00:00.000Z"
          },
          "requested_service": {
            "type": [
              "string",
              "null"
            ],
            "example": "Tracked 48"
          },
          "order_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string.",
            "example": "44.97"
          },
          "currency": {
            "type": "string",
            "example": "GBP"
          },
          "gift_message": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "packing_instructions": {
            "type": [
              "string",
              "null"
            ],
            "example": "Please include the returns slip."
          },
          "ship_to": {
            "description": "Null once the customer's personal data has been removed under our data retention.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLine"
            }
          },
          "holds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderHold"
            },
            "description": "Every hold the order has had; open ones have released_at null."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderEvent"
            },
            "description": "The order's timeline."
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Shipment"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDocument"
            },
            "description": "Your packing slips and return labels on this order."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.512Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.700Z"
          },
          "despatched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "country": {
            "type": "string",
            "description": "The delivery country, ISO 3166-1 alpha-2. Kept when the address itself is removed under our data retention.",
            "example": "GB"
          },
          "service_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The courier service chosen for the order, once it is known.",
            "example": "TPS48"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [],
            "description": "The order's tags."
          },
          "marketplace": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a store order, the marketplace it really came from (for example TikTok Shop), or null. Null for an API order.",
            "example": null
          },
          "channel_order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a store order, the store's own id for it. Null for an API order.",
            "example": null
          }
        },
        "required": [
          "order_id",
          "number",
          "channel",
          "external_ref",
          "sales_channel",
          "channel_order_number",
          "return_tracking_number",
          "status",
          "urgent",
          "ordered_at",
          "ship_by",
          "requested_service",
          "order_value",
          "currency",
          "gift_message",
          "packing_instructions",
          "ship_to",
          "lines",
          "holds",
          "events",
          "shipments",
          "documents",
          "created_at",
          "updated_at",
          "despatched_at",
          "delivered_at",
          "cancelled_at",
          "country",
          "service_code",
          "tags",
          "marketplace",
          "channel_order_id"
        ]
      },
      "OrderDocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "0c7e5a1d-2f4b-4c6e-8a9d-1b3c5e7f9a20"
          },
          "type": {
            "type": "string",
            "enum": [
              "PACKING_SLIP",
              "RETURN_LABEL"
            ],
            "example": "RETURN_LABEL"
          },
          "file_name": {
            "type": "string",
            "example": "return-SO-284117.pdf"
          },
          "file_size": {
            "type": "integer",
            "description": "Bytes.",
            "example": 48213
          },
          "page_count": {
            "type": "integer",
            "example": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.520Z"
          },
          "available": {
            "type": "boolean",
            "description": "false once our data retention has removed the file.",
            "example": true
          }
        },
        "required": [
          "document_id",
          "type",
          "file_name",
          "file_size",
          "page_count",
          "created_at",
          "available"
        ]
      },
      "OrderEvent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "order.allocated"
          },
          "message": {
            "type": "string",
            "example": "Checked and stock reserved. Ready to pick."
          },
          "by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who did it: a person's name, \"Angler Fulfilment\" for our team, API key \"<name>\" for an action made with one of your keys, or null for the system.",
            "example": "API key \"ERP live\""
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.700Z"
          }
        },
        "required": [
          "type",
          "message",
          "by",
          "created_at"
        ]
      },
      "OrderHold": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Hold"
          },
          {
            "type": "object",
            "properties": {
              "placed_at": {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-16T09:41:07.700Z"
              },
              "released_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Null while the hold is open.",
                "example": null
              }
            },
            "required": [
              "placed_at",
              "released_at"
            ]
          }
        ]
      },
      "OrderLine": {
        "type": "object",
        "properties": {
          "channel_sku": {
            "type": "string",
            "description": "The SKU as you sent it.",
            "example": "TSHIRT-BLK-M"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line name you sent.",
            "example": "T-shirt, black, M"
          },
          "quantity": {
            "type": "integer",
            "example": 2
          },
          "unit_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string.",
            "example": "14.99"
          },
          "qty_allocated": {
            "type": "integer",
            "description": "Units reserved for the line. Always 0 on a sandbox account, where no stock is reserved.",
            "example": 2
          },
          "qty_picked": {
            "type": "integer",
            "example": 0
          },
          "qty_packed": {
            "type": "integer",
            "example": 0
          },
          "product": {
            "type": [
              "object",
              "null"
            ],
            "description": "The product the line matched; null while the SKU is unmapped.",
            "properties": {
              "sku": {
                "type": "string",
                "example": "TSHIRT-BLK-M"
              },
              "name": {
                "type": "string",
                "example": "Organic T-shirt, black, medium"
              }
            },
            "required": [
              "sku",
              "name"
            ]
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",
            "description": "The id of the product the line matched; null while the SKU is unmapped."
          },
          "bundle_sku": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a line made by splitting a virtual bundle into its parts, the bundle's SKU; otherwise null.",
            "example": null
          }
        },
        "required": [
          "channel_sku",
          "name",
          "quantity",
          "unit_price",
          "qty_allocated",
          "qty_picked",
          "qty_packed",
          "product",
          "product_id",
          "bundle_sku"
        ]
      },
      "OrderListItem": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
          },
          "number": {
            "type": "string",
            "example": "SO-284117"
          },
          "channel": {
            "type": "string",
            "enum": [
              "SHOPIFY",
              "WOOCOMMERCE",
              "TIKTOK",
              "AMAZON",
              "EBAY",
              "API",
              "CSV",
              "MANUAL"
            ],
            "example": "API"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ],
            "example": "WEB-10023"
          },
          "sales_channel": {
            "type": [
              "string",
              "null"
            ],
            "example": "website"
          },
          "channel_order_number": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "return_tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "status": {
            "type": "string",
            "enum": [
              "IMPORTED",
              "ON_HOLD",
              "ALLOCATED",
              "PICKING",
              "PICKED",
              "PACKED",
              "DESPATCHED",
              "DELIVERED",
              "CANCELLED"
            ],
            "example": "ALLOCATED"
          },
          "urgent": {
            "type": "boolean",
            "example": false
          },
          "ordered_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.512Z"
          },
          "ship_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-16T14:00:00.000Z"
          },
          "requested_service": {
            "type": [
              "string",
              "null"
            ],
            "example": "Tracked 48"
          },
          "order_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string.",
            "example": "44.97"
          },
          "currency": {
            "type": "string",
            "example": "GBP"
          },
          "gift_message": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "packing_instructions": {
            "type": [
              "string",
              "null"
            ],
            "example": "Please include the returns slip."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.512Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T09:41:07.700Z"
          },
          "despatched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "country": {
            "type": "string",
            "description": "The delivery country, ISO 3166-1 alpha-2. Kept when the address itself is removed under our data retention.",
            "example": "GB"
          },
          "service_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The courier service chosen for the order, once it is known.",
            "example": "TPS48"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [],
            "description": "The order's tags."
          },
          "marketplace": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a store order, the marketplace it really came from (for example TikTok Shop), or null. Null for an API order.",
            "example": null
          },
          "channel_order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a store order, the store's own id for it. Null for an API order.",
            "example": null
          },
          "units": {
            "type": "integer",
            "description": "Units across every line.",
            "example": 3
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The delivery name.",
            "example": "Alex Example"
          },
          "holds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hold"
            },
            "description": "Open holds only."
          },
          "shipments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "LABEL_PENDING",
                    "LABEL_CREATED",
                    "LABEL_FAILED",
                    "DESPATCHED",
                    "VOIDED"
                  ],
                  "example": "LABEL_PENDING"
                },
                "tracking_number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": null
                },
                "carrier": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "Royal Mail"
                }
              },
              "required": [
                "status",
                "tracking_number",
                "carrier"
              ]
            },
            "description": "Each parcel as its status, tracking number and carrier. GET /orders/{order_id} has the full parcel."
          }
        },
        "required": [
          "order_id",
          "number",
          "channel",
          "external_ref",
          "sales_channel",
          "channel_order_number",
          "return_tracking_number",
          "status",
          "urgent",
          "ordered_at",
          "ship_by",
          "requested_service",
          "order_value",
          "currency",
          "gift_message",
          "packing_instructions",
          "created_at",
          "updated_at",
          "despatched_at",
          "delivered_at",
          "cancelled_at",
          "country",
          "service_code",
          "tags",
          "marketplace",
          "channel_order_id",
          "units",
          "customer",
          "holds",
          "shipments"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "name": {
            "type": "string",
            "example": "Organic T-shirt, black, medium"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "example": "M"
          },
          "colour": {
            "type": [
              "string",
              "null"
            ],
            "example": "Black"
          },
          "style": {
            "type": [
              "string",
              "null"
            ],
            "example": "TSHIRT-ORG"
          },
          "length_mm": {
            "type": [
              "integer",
              "null"
            ],
            "example": 300
          },
          "width_mm": {
            "type": [
              "integer",
              "null"
            ],
            "example": 250
          },
          "height_mm": {
            "type": [
              "integer",
              "null"
            ],
            "example": 20
          },
          "weight_g": {
            "type": [
              "integer",
              "null"
            ],
            "example": 180
          },
          "declared_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string.",
            "example": "14.99"
          },
          "currency": {
            "type": "string",
            "description": "The currency of declared_value.",
            "example": "GBP"
          },
          "hs_code": {
            "type": [
              "string",
              "null"
            ],
            "example": "610910"
          },
          "country_of_origin": {
            "type": [
              "string",
              "null"
            ],
            "example": "PT"
          },
          "kind": {
            "type": "string",
            "enum": [
              "SIMPLE",
              "VIRTUAL_BUNDLE",
              "KIT"
            ],
            "example": "SIMPLE"
          },
          "fnsku": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "batch_tracked": {
            "type": "boolean",
            "example": false
          },
          "expiry_tracked": {
            "type": "boolean",
            "example": false
          },
          "serial_tracked": {
            "type": "boolean",
            "example": false
          },
          "fragile": {
            "type": "boolean",
            "example": false
          },
          "dangerous_goods": {
            "type": "boolean",
            "example": false
          },
          "reorder_level": {
            "type": [
              "integer",
              "null"
            ],
            "example": 50
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "barcodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Barcode"
            }
          },
          "stock": {
            "$ref": "#/components/schemas/StockTotals",
            "description": "On the GET endpoints only."
          },
          "missing_data": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "weight",
                "dimensions"
              ]
            },
            "example": [],
            "description": "On the GET endpoints only: what the product still needs before a courier label can be bought."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-10T09:00:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-10T09:00:00.000Z"
          }
        },
        "required": [
          "product_id",
          "sku",
          "name",
          "description",
          "size",
          "colour",
          "style",
          "length_mm",
          "width_mm",
          "height_mm",
          "weight_g",
          "declared_value",
          "currency",
          "hs_code",
          "country_of_origin",
          "kind",
          "fnsku",
          "batch_tracked",
          "expiry_tracked",
          "serial_tracked",
          "fragile",
          "dangerous_goods",
          "reorder_level",
          "tags",
          "active",
          "barcodes",
          "created_at",
          "updated_at"
        ]
      },
      "Return": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ReturnListItem"
          },
          {
            "type": "object",
            "properties": {
              "order": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Here (and in the POST answers) the order it came from also has its id, status, date and lines. Null when the return has no order.",
                "properties": {
                  "order_id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
                  },
                  "number": {
                    "type": "string",
                    "example": "SO-284117"
                  },
                  "channel_order_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": null
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "IMPORTED",
                      "ON_HOLD",
                      "ALLOCATED",
                      "PICKING",
                      "PICKED",
                      "PACKED",
                      "DESPATCHED",
                      "DELIVERED",
                      "CANCELLED"
                    ],
                    "example": "DELIVERED"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-16T09:41:07.512Z"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "channel_sku": {
                          "type": "string",
                          "description": "The SKU as it was sent on the order.",
                          "example": "TSHIRT-BLK-M"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "T-shirt, black, M"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "required": [
                        "channel_sku",
                        "name",
                        "quantity"
                      ]
                    }
                  }
                },
                "required": [
                  "order_id",
                  "number",
                  "channel_order_number",
                  "status",
                  "created_at",
                  "lines"
                ]
              },
              "exchange": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Here the replacement order of an exchange also has its lines and parcels. Null when there is no exchange.",
                "properties": {
                  "order_id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12"
                  },
                  "number": {
                    "type": "string",
                    "example": "SO-284190"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "IMPORTED",
                      "ON_HOLD",
                      "ALLOCATED",
                      "PICKING",
                      "PICKED",
                      "PACKED",
                      "DESPATCHED",
                      "DELIVERED",
                      "CANCELLED"
                    ],
                    "example": "DESPATCHED"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "channel_sku": {
                          "type": "string",
                          "description": "The SKU as it was sent on the order.",
                          "example": "TSHIRT-BLK-M"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "T-shirt, black, M"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "required": [
                        "channel_sku",
                        "name",
                        "quantity"
                      ]
                    }
                  },
                  "shipments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "carrier": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "Royal Mail"
                        },
                        "tracking_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "RM987654322GB"
                        },
                        "tracking_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654322GB"
                        }
                      },
                      "required": [
                        "carrier",
                        "tracking_number",
                        "tracking_url"
                      ]
                    },
                    "description": "Its parcels, leaving out voided ones."
                  }
                },
                "required": [
                  "order_id",
                  "number",
                  "status",
                  "lines",
                  "shipments"
                ]
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "line_id": {
                      "type": "string",
                      "format": "uuid",
                      "example": "5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d32"
                    },
                    "product_id": {
                      "type": "string",
                      "format": "uuid",
                      "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
                    },
                    "qty_expected": {
                      "type": "integer",
                      "example": 1
                    },
                    "product": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "example": "TSHIRT-BLK-M"
                        },
                        "name": {
                          "type": "string",
                          "example": "Organic T-shirt, black, medium"
                        }
                      },
                      "required": [
                        "sku",
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "line_id",
                    "product_id",
                    "qty_expected",
                    "product"
                  ]
                },
                "description": "What was announced."
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ReturnItem"
                },
                "description": "Everything booked in."
              },
              "missing": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SkuQuantity"
                },
                "description": "Announced but not (yet) received. Empty until something is booked in, and when no lines were announced."
              },
              "unexpected": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SkuQuantity"
                },
                "description": "Received but not announced, or more than announced."
              }
            },
            "required": [
              "order",
              "exchange",
              "lines",
              "items",
              "missing",
              "unexpected"
            ]
          }
        ]
      },
      "ReturnItem": {
        "type": "object",
        "description": "One unit or group of units booked in.",
        "properties": {
          "item_id": {
            "type": "string",
            "format": "uuid",
            "example": "9c7e5a3b-2d4f-4b6c-8e0a-1f3b5d7e9a21"
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "name": {
            "type": "string",
            "example": "Organic T-shirt, black, medium"
          },
          "quantity": {
            "type": "integer",
            "example": 1
          },
          "grade": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "A",
              "B",
              "C",
              null
            ],
            "example": "A"
          },
          "grade_label": {
            "type": [
              "string",
              "null"
            ],
            "example": "like new"
          },
          "disposition": {
            "type": "string",
            "enum": [
              "RESTOCK",
              "QUARANTINE",
              "DAMAGED",
              "DISPOSE"
            ],
            "example": "RESTOCK"
          },
          "disposition_label": {
            "type": "string",
            "example": "Back in stock"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-19T11:30:00.000Z"
          },
          "needs_decision": {
            "type": "boolean",
            "description": "true while a grade B or C item waits for your decision.",
            "example": false
          },
          "decision": {
            "type": [
              "object",
              "null"
            ],
            "description": "Your decision for the item, once made.",
            "properties": {
              "decision": {
                "type": "string",
                "enum": [
                  "KEEP",
                  "HOLD",
                  "DISPOSE",
                  "SEND_BACK"
                ],
                "example": "KEEP"
              },
              "label": {
                "type": "string",
                "example": "Put it on sale"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "example": null
              },
              "decided_at": {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-19T12:00:00.000Z"
              },
              "done_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "example": null
              },
              "done_note": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What our team noted when it carried the decision out.",
                "example": null
              },
              "tracking_number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For SEND_BACK, the tracking number of the parcel the item went back to you in.",
                "example": null
              }
            },
            "required": [
              "decision",
              "label",
              "note",
              "decided_at",
              "done_at",
              "done_note",
              "tracking_number"
            ]
          }
        },
        "required": [
          "item_id",
          "product_id",
          "sku",
          "name",
          "quantity",
          "grade",
          "grade_label",
          "disposition",
          "disposition_label",
          "note",
          "received_at",
          "needs_decision",
          "decision"
        ]
      },
      "ReturnListItem": {
        "type": "object",
        "properties": {
          "return_id": {
            "type": "string",
            "format": "uuid",
            "example": "8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10"
          },
          "number": {
            "type": "string",
            "example": "RT-018342"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your return or RMA number, when you sent one.",
            "example": "RMA-55120"
          },
          "status": {
            "type": "string",
            "enum": [
              "EXPECTED",
              "RECEIVED",
              "CLOSED",
              "CANCELLED"
            ],
            "example": "RECEIVED"
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
          },
          "order": {
            "type": [
              "object",
              "null"
            ],
            "description": "The order it came from.",
            "properties": {
              "number": {
                "type": "string",
                "example": "SO-284117"
              },
              "channel_order_number": {
                "type": [
                  "string",
                  "null"
                ],
                "example": null
              }
            },
            "required": [
              "number",
              "channel_order_number"
            ]
          },
          "store_order_ref": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "example": "Wrong size"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "example": "QW123456789GB"
          },
          "client_note": {
            "type": [
              "string",
              "null"
            ],
            "example": "Restock if unopened"
          },
          "units_expected": {
            "type": "integer",
            "example": 2
          },
          "units_received": {
            "type": "integer",
            "example": 1
          },
          "received": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnReceived"
            }
          },
          "pending_decisions": {
            "type": "integer",
            "description": "Items (grade B or C) waiting for your decision.",
            "example": 0
          },
          "exchange": {
            "type": [
              "object",
              "null"
            ],
            "description": "The replacement order, for an exchange.",
            "properties": {
              "order_id": {
                "type": "string",
                "format": "uuid",
                "example": "3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12"
              },
              "number": {
                "type": "string",
                "example": "SO-284190"
              },
              "status": {
                "type": "string",
                "enum": [
                  "IMPORTED",
                  "ON_HOLD",
                  "ALLOCATED",
                  "PICKING",
                  "PICKED",
                  "PACKED",
                  "DESPATCHED",
                  "DELIVERED",
                  "CANCELLED"
                ],
                "example": "ALLOCATED"
              }
            },
            "required": [
              "order_id",
              "number",
              "status"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T10:00:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Changes whenever the return, its lines, items, decisions, photos or labels change.",
            "example": "2026-11-19T12:00:00.000Z"
          },
          "received_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-19T11:30:00.000Z"
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          }
        },
        "required": [
          "return_id",
          "number",
          "reference",
          "status",
          "order_id",
          "order",
          "store_order_ref",
          "reason",
          "tracking_number",
          "client_note",
          "units_expected",
          "units_received",
          "received",
          "pending_decisions",
          "exchange",
          "created_at",
          "updated_at",
          "received_at",
          "closed_at"
        ]
      },
      "ReturnReceived": {
        "type": "object",
        "description": "Units booked in, per product, grade and disposition.",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "grade": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "A",
              "B",
              "C",
              null
            ],
            "example": "A"
          },
          "disposition": {
            "type": "string",
            "enum": [
              "RESTOCK",
              "QUARANTINE",
              "DAMAGED",
              "DISPOSE"
            ],
            "example": "RESTOCK"
          },
          "quantity": {
            "type": "integer",
            "example": 1
          }
        },
        "required": [
          "product_id",
          "sku",
          "grade",
          "disposition",
          "quantity"
        ]
      },
      "SandboxAdvanceResult": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "example": "2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40"
          },
          "number": {
            "type": "string",
            "example": "SO-284117"
          },
          "status": {
            "type": "string",
            "enum": [
              "IMPORTED",
              "ON_HOLD",
              "ALLOCATED",
              "PICKING",
              "PICKED",
              "PACKED",
              "DESPATCHED",
              "DELIVERED",
              "CANCELLED"
            ],
            "example": "DELIVERED"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The steps taken, in order.",
            "example": [
              "PICKING",
              "PICKED",
              "PACKED",
              "DESPATCHED",
              "DELIVERED"
            ]
          }
        },
        "required": [
          "order_id",
          "number",
          "status",
          "steps"
        ]
      },
      "Shipment": {
        "type": "object",
        "description": "One parcel. A parcel exists from the moment an order is allocated; use the order status DESPATCHED, not the presence of a parcel, to know the order has left.",
        "properties": {
          "parcel_no": {
            "type": "integer",
            "example": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "LABEL_PENDING",
              "LABEL_CREATED",
              "LABEL_FAILED",
              "DESPATCHED",
              "VOIDED"
            ],
            "example": "DESPATCHED"
          },
          "carrier": {
            "type": [
              "string",
              "null"
            ],
            "example": "Royal Mail"
          },
          "service_code": {
            "type": [
              "string",
              "null"
            ],
            "example": "TPS48"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "example": "RM987654321GB"
          },
          "tracking_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB"
          },
          "despatched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-16T16:05:40.950Z"
          },
          "tracking_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "IN_TRANSIT",
              "DELIVERED",
              "PROBLEM",
              "UNKNOWN",
              null
            ],
            "example": "IN_TRANSIT"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "postage_charged": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string, GBP: the postage you are charged for this parcel. Null until a label is bought, and on accounts that do not buy postage from us.",
            "example": "3.45"
          },
          "label_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the label could not be made, as a fixed sentence (never the courier's own error text). Null when there is no problem.",
            "example": null
          },
          "weight_g": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The parcel's weight in grams, once known.",
            "example": 420
          }
        },
        "required": [
          "parcel_no",
          "status",
          "carrier",
          "service_code",
          "tracking_number",
          "tracking_url",
          "despatched_at",
          "tracking_state",
          "delivered_at",
          "postage_charged",
          "label_error",
          "weight_g"
        ]
      },
      "SkuQuantity": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "quantity": {
            "type": "integer",
            "example": 1
          }
        },
        "required": [
          "product_id",
          "sku",
          "quantity"
        ]
      },
      "StockBatch": {
        "type": "object",
        "properties": {
          "batch": {
            "type": [
              "string",
              "null"
            ],
            "example": "L2611"
          },
          "expiry": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2027-05-31"
          },
          "on_hand": {
            "type": "integer",
            "example": 60
          },
          "allocated": {
            "type": "integer",
            "example": 4
          },
          "available": {
            "type": "integer",
            "example": 56
          },
          "quarantined": {
            "type": "integer",
            "example": 0
          },
          "damaged": {
            "type": "integer",
            "example": 0
          },
          "receiving": {
            "type": "integer",
            "example": 0
          },
          "suspect": {
            "type": "integer",
            "example": 0
          }
        },
        "required": [
          "batch",
          "expiry",
          "on_hand",
          "allocated",
          "available",
          "quarantined",
          "damaged",
          "receiving",
          "suspect"
        ]
      },
      "StockLevel": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "name": {
            "type": "string",
            "example": "Organic T-shirt, black, medium"
          },
          "kind": {
            "type": "string",
            "enum": [
              "SIMPLE",
              "VIRTUAL_BUNDLE",
              "KIT"
            ],
            "example": "SIMPLE"
          },
          "reorder_level": {
            "type": [
              "integer",
              "null"
            ],
            "example": 50
          },
          "on_hand": {
            "type": "integer",
            "description": "All units in the warehouse.",
            "example": 140
          },
          "allocated": {
            "type": "integer",
            "description": "Units reserved for orders.",
            "example": 12
          },
          "available": {
            "type": "integer",
            "description": "Sellable units not reserved. For a virtual bundle, the number of whole sets its scarcest part allows.",
            "example": 128
          },
          "receiving": {
            "type": "integer",
            "description": "Received but not yet put away.",
            "example": 0
          },
          "quarantined": {
            "type": "integer",
            "example": 0
          },
          "damaged": {
            "type": "integer",
            "example": 0
          },
          "suspect": {
            "type": "integer",
            "description": "Waiting for a recount.",
            "example": 0
          },
          "low": {
            "type": "boolean",
            "description": "true when available is at or below reorder_level.",
            "example": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The later of the product's own last change and its stock's.",
            "example": "2026-11-19T10:12:44.102Z"
          },
          "batches": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/StockBatch"
            },
            "description": "Only with include=batches: one entry per batch, soonest expiry first, for a batch or expiry tracked product; null for other products. Left out without include=batches."
          }
        },
        "required": [
          "product_id",
          "sku",
          "name",
          "kind",
          "reorder_level",
          "on_hand",
          "allocated",
          "available",
          "receiving",
          "quarantined",
          "damaged",
          "suspect",
          "low",
          "updated_at"
        ]
      },
      "StockMovement": {
        "type": "object",
        "properties": {
          "movement_id": {
            "type": "string",
            "description": "A whole number, sent as a string of digits. Movements are numbered in the order they were written; use it as `after`.",
            "example": "184467"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-16T16:05:40.950Z"
          },
          "sku": {
            "type": "string",
            "example": "TSHIRT-BLK-M"
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
          },
          "product_name": {
            "type": "string",
            "example": "Organic T-shirt, black, medium"
          },
          "quantity_delta": {
            "type": "integer",
            "description": "Units added (positive) or taken (negative).",
            "example": -2
          },
          "qty_after": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Units at that stock record after the movement.",
            "example": 126
          },
          "type": {
            "type": "string",
            "enum": [
              "OPENING_BALANCE",
              "RECEIPT",
              "ADJUSTMENT",
              "PICK",
              "PACK",
              "DESPATCH",
              "RETURN",
              "DISPOSAL",
              "KIT",
              "INTERNAL"
            ],
            "example": "DESPATCH"
          },
          "reason": {
            "type": "string",
            "description": "The detailed reason, for example RECEIVE, PICK, DESPATCH, ADJUST_COUNT or RETURN_RESTOCK. We may add reasons.",
            "example": "DESPATCH"
          },
          "reason_note": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "status": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "QUARANTINE",
              "DAMAGED",
              "RECEIVING",
              "SUSPECT",
              "PICKED"
            ],
            "example": "PICKED",
            "description": "The stock status the movement touched."
          },
          "batch_no": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "expiry_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": null
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The order, inbound or return number, or null.",
            "example": "SO-284117"
          },
          "by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who made the movement: a name, \"Angler Fulfilment\", \"System\" or null.",
            "example": "Angler Fulfilment"
          }
        },
        "required": [
          "movement_id",
          "created_at",
          "sku",
          "product_id",
          "product_name",
          "quantity_delta",
          "qty_after",
          "type",
          "reason",
          "reason_note",
          "status",
          "batch_no",
          "expiry_date",
          "reference",
          "by"
        ]
      },
      "StockTotals": {
        "type": "object",
        "properties": {
          "on_hand": {
            "type": "integer",
            "example": 140
          },
          "allocated": {
            "type": "integer",
            "example": 12
          },
          "available": {
            "type": "integer",
            "example": 128
          }
        },
        "required": [
          "on_hand",
          "allocated",
          "available"
        ]
      },
      "ProductCreateInput": {
        "description": "A new product: ProductInput with `sku` and `name` required.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductInput"
          },
          {
            "type": "object",
            "required": [
              "sku",
              "name"
            ]
          }
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "success",
          "error",
          "request_id"
        ],
        "description": "Every error. Branch on the HTTP status and `error.code`; `error.message` is plain English and its wording may change.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "example": "BAD_REQUEST"
              },
              "message": {
                "type": "string",
                "example": "ship_to.country must be a two-letter country code, for example GB"
              },
              "details": {
                "type": "array",
                "description": "On a 400 BAD_REQUEST from field validation: every problem found, not only the first. `message` is the first of them. Some 400 VALIDATION answers carry it too, for example a path id that is not a UUID or a country code that is not one.",
                "items": {
                  "$ref": "#/components/schemas/FieldProblem"
                }
              },
              "lines": {
                "type": "array",
                "description": "On a 400 UNKNOWN_SKU from POST /inbounds, POST /returns or a sandbox return receipt: every line whose product we do not have.",
                "items": {
                  "$ref": "#/components/schemas/UnknownLine"
                }
              }
            }
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "example": {
          "success": false,
          "error": {
            "code": "BAD_REQUEST",
            "message": "ship_to.country must be a two-letter country code, for example GB",
            "details": [
              {
                "field": "ship_to.country",
                "message": "ship_to.country must be a two-letter country code, for example GB"
              },
              {
                "field": "lines[0].quantity",
                "message": "lines[0].quantity must not be less than 1"
              }
            ]
          },
          "request_id": "6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11"
        }
      },
      "UnknownLine": {
        "type": "object",
        "required": [
          "line",
          "sku",
          "product_id"
        ],
        "properties": {
          "line": {
            "type": "integer",
            "minimum": 1,
            "description": "Which line it is in your `lines`, counting from 1.",
            "example": 2
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "description": "The SKU or barcode as you sent it, or null when you gave product_id.",
            "example": "TSHIRT-BLK-XS"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The product_id as you sent it, or null when you gave sku.",
            "example": null
          }
        }
      },
      "FieldProblem": {
        "type": "object",
        "required": [
          "field",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The full path of the field.",
            "example": "lines[0].quantity"
          },
          "message": {
            "type": "string",
            "example": "lines[0].quantity must not be less than 1"
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "page",
          "limit",
          "total",
          "total_pages"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "example": 1,
            "description": "After a `cursor`, always 1."
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "total": {
            "type": "integer",
            "example": 312,
            "description": "The matching records. On a sync read (`updated_since` or `cursor`), the changed records still to read from this page on, this page included, so it falls as you go: follow `next_cursor`, not `total_pages`."
          },
          "total_pages": {
            "type": "integer",
            "example": 13,
            "description": "1 when there are no results."
          }
        }
      }
    }
  }
}
