{
  "info": {
    "_postman_id": "5b0f8a52-6a2e-4b8e-9a51-3f1c2d7e9a10",
    "name": "Angler Fulfilment API",
    "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.\n\nSet the collection variables apiKey (your key) and, if needed, baseUrl.\n\n**Run it with a sandbox key.** The requests are in an order that runs top to bottom with no failures on a sandbox account (Run collection): they check which account the key is for, add products, send an order with those SKUs, add its documents and move it to DELIVERED, cancel a separate order, announce and book in a return, and send an ASN, book it in and cancel a separate one. Every request checks its HTTP status. SKUs, barcodes and references are new on every run, so a second run makes new records rather than replaying. The run stops at the first request if the key is for a live account, because the requests make orders.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Account",
      "description": "Who your key acts for, and whether it is a sandbox or a live account.",
      "item": [
        {
          "name": "Who this key is for",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ]
            },
            "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`."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/me",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "me"
                  ]
                },
                "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`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"client\": {\n      \"id\": \"7a9c1e3f-5b7d-4f9a-8c1e-3f5b7d9a1c2e\",\n      \"trading_name\": \"Example Trading\"\n    },\n    \"sandbox\": true,\n    \"environment\": \"sandbox\",\n    \"api_key\": {\n      \"name\": \"ERP test\",\n      \"prefix\": \"afk_3f9a1c2e\",\n      \"scopes\": [\n        \"orders\",\n        \"products\",\n        \"stock\",\n        \"inbounds\"\n      ],\n      \"created_at\": \"2026-11-20T09:00:00.000Z\",\n      \"last_used_at\": \"2026-11-20T09:14:02.311Z\"\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });",
                  "var me = null;",
                  "try { me = pm.response.json().data; } catch (e) { me = null; }",
                  "pm.test('The key is for a sandbox account (this collection makes test orders)', function () { pm.expect(me && me.sandbox).to.equal(true); });",
                  "if (!me || me.sandbox !== true) { console.log('Stopping: run this collection with a sandbox key only.'); postman.setNextRequest(null); }"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Products",
      "description": "Your catalogue: SKUs, barcodes, weights, sizes and customs data.",
      "item": [
        {
          "name": "Add a product",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"{{sku}}\",\n  \"name\": \"Organic T-shirt, black, medium\",\n  \"style\": \"TSHIRT-ORG\",\n  \"colour\": \"Black\",\n  \"size\": \"M\",\n  \"weight_g\": 180,\n  \"length_mm\": 300,\n  \"width_mm\": 250,\n  \"height_mm\": 20,\n  \"declared_value\": \"14.99\",\n  \"hs_code\": \"610910\",\n  \"country_of_origin\": \"PT\",\n  \"reorder_level\": 50,\n  \"barcodes\": [\n    {\n      \"barcode\": \"{{ean}}\"\n    },\n    {\n      \"barcode\": \"{{case_gtin}}\",\n      \"uom\": \"CASE\",\n      \"quantity\": 24\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products"
                  ]
                },
                "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.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"sku\": \"{{sku}}\",\n  \"name\": \"Organic T-shirt, black, medium\",\n  \"style\": \"TSHIRT-ORG\",\n  \"colour\": \"Black\",\n  \"size\": \"M\",\n  \"weight_g\": 180,\n  \"length_mm\": 300,\n  \"width_mm\": 250,\n  \"height_mm\": 20,\n  \"declared_value\": \"14.99\",\n  \"hs_code\": \"610910\",\n  \"country_of_origin\": \"PT\",\n  \"reorder_level\": 50,\n  \"barcodes\": [\n    {\n      \"barcode\": \"{{ean}}\"\n    },\n    {\n      \"barcode\": \"{{case_gtin}}\",\n      \"uom\": \"CASE\",\n      \"quantity\": 24\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n    \"sku\": \"TSHIRT-BLK-M\",\n    \"name\": \"Organic T-shirt, black, medium\",\n    \"description\": null,\n    \"size\": \"M\",\n    \"colour\": \"Black\",\n    \"style\": \"TSHIRT-ORG\",\n    \"length_mm\": 300,\n    \"width_mm\": 250,\n    \"height_mm\": 20,\n    \"weight_g\": 180,\n    \"declared_value\": \"14.99\",\n    \"currency\": \"GBP\",\n    \"hs_code\": \"610910\",\n    \"country_of_origin\": \"PT\",\n    \"kind\": \"SIMPLE\",\n    \"fnsku\": null,\n    \"batch_tracked\": false,\n    \"expiry_tracked\": false,\n    \"serial_tracked\": false,\n    \"fragile\": false,\n    \"dangerous_goods\": false,\n    \"reorder_level\": 50,\n    \"tags\": [],\n    \"active\": true,\n    \"barcodes\": [\n      {\n        \"barcode\": \"5012345678900\",\n        \"uom\": \"EACH\",\n        \"quantity\": 1\n      }\n    ],\n    \"created_at\": \"2026-11-10T09:00:00.000Z\",\n    \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// A new run: new SKUs, barcodes and references, so running the collection again makes new records instead of replaying.",
                  "var run = String(Date.now()).slice(-10);",
                  "pm.collectionVariables.set('run', run);",
                  "pm.collectionVariables.set('sku', 'TSHIRT-BLK-M-' + run);",
                  "pm.collectionVariables.set('sku_l', 'TSHIRT-BLK-L-' + run);",
                  "// A GTIN with its check digit: 12 digits, then the digit that makes the weighted sum a multiple of 10.",
                  "function gtin(digits) { var sum = 0; for (var i = 0; i < digits.length; i++) { sum += Number(digits[digits.length - 1 - i]) * (i % 2 === 0 ? 3 : 1); } return digits + String((10 - (sum % 10)) % 10); }",
                  "pm.collectionVariables.set('ean', gtin('20' + run));",
                  "pm.collectionVariables.set('case_gtin', gtin('120' + run));"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 201', function () { pm.response.to.have.status(201); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/:product_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ":product_id"
              ],
              "variable": [
                {
                  "key": "product_id",
                  "value": "{{product_id}}",
                  "description": "The product's id."
                }
              ]
            },
            "description": "Scope `products` or `stock`."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products/:product_id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products",
                    ":product_id"
                  ],
                  "variable": [
                    {
                      "key": "product_id",
                      "value": "{{product_id}}",
                      "description": "The product's id."
                    }
                  ]
                },
                "description": "Scope `products` or `stock`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n    \"sku\": \"TSHIRT-BLK-M\",\n    \"name\": \"Organic T-shirt, black, medium\",\n    \"description\": null,\n    \"size\": \"M\",\n    \"colour\": \"Black\",\n    \"style\": \"TSHIRT-ORG\",\n    \"length_mm\": 300,\n    \"width_mm\": 250,\n    \"height_mm\": 20,\n    \"weight_g\": 180,\n    \"declared_value\": \"14.99\",\n    \"currency\": \"GBP\",\n    \"hs_code\": \"610910\",\n    \"country_of_origin\": \"PT\",\n    \"kind\": \"SIMPLE\",\n    \"fnsku\": null,\n    \"batch_tracked\": false,\n    \"expiry_tracked\": false,\n    \"serial_tracked\": false,\n    \"fragile\": false,\n    \"dangerous_goods\": false,\n    \"reorder_level\": 50,\n    \"tags\": [],\n    \"active\": true,\n    \"barcodes\": [\n      {\n        \"barcode\": \"5012345678900\",\n        \"uom\": \"EACH\",\n        \"quantity\": 1\n      }\n    ],\n    \"created_at\": \"2026-11-10T09:00:00.000Z\",\n    \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a product by SKU",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/by-sku/:sku",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                "by-sku",
                ":sku"
              ],
              "variable": [
                {
                  "key": "sku",
                  "value": "{{sku}}",
                  "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."
                }
              ]
            },
            "description": "The product with exactly this SKU (case-sensitive). Scope `products` or `stock`."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products/by-sku/:sku",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products",
                    "by-sku",
                    ":sku"
                  ],
                  "variable": [
                    {
                      "key": "sku",
                      "value": "{{sku}}",
                      "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."
                    }
                  ]
                },
                "description": "The product with exactly this SKU (case-sensitive). Scope `products` or `stock`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n    \"sku\": \"TSHIRT-BLK-M\",\n    \"name\": \"Organic T-shirt, black, medium\",\n    \"description\": null,\n    \"size\": \"M\",\n    \"colour\": \"Black\",\n    \"style\": \"TSHIRT-ORG\",\n    \"length_mm\": 300,\n    \"width_mm\": 250,\n    \"height_mm\": 20,\n    \"weight_g\": 180,\n    \"declared_value\": \"14.99\",\n    \"currency\": \"GBP\",\n    \"hs_code\": \"610910\",\n    \"country_of_origin\": \"PT\",\n    \"kind\": \"SIMPLE\",\n    \"fnsku\": null,\n    \"batch_tracked\": false,\n    \"expiry_tracked\": false,\n    \"serial_tracked\": false,\n    \"fragile\": false,\n    \"dangerous_goods\": false,\n    \"reorder_level\": 50,\n    \"tags\": [],\n    \"active\": true,\n    \"barcodes\": [\n      {\n        \"barcode\": \"5012345678900\",\n        \"uom\": \"EACH\",\n        \"quantity\": 1\n      }\n    ],\n    \"created_at\": \"2026-11-10T09:00:00.000Z\",\n    \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Create or update a product by SKU",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/by-sku/:sku",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                "by-sku",
                ":sku"
              ],
              "variable": [
                {
                  "key": "sku",
                  "value": "{{sku}}",
                  "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)."
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Organic T-shirt, black, medium\",\n  \"style\": \"TSHIRT-ORG\",\n  \"colour\": \"Black\",\n  \"size\": \"M\",\n  \"weight_g\": 180\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "PUT",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products/by-sku/:sku",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products",
                    "by-sku",
                    ":sku"
                  ],
                  "variable": [
                    {
                      "key": "sku",
                      "value": "{{sku}}",
                      "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)."
                    }
                  ]
                },
                "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`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Organic T-shirt, black, medium\",\n  \"style\": \"TSHIRT-ORG\",\n  \"colour\": \"Black\",\n  \"size\": \"M\",\n  \"weight_g\": 180\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n    \"sku\": \"TSHIRT-BLK-M\",\n    \"name\": \"Organic T-shirt, black, medium\",\n    \"description\": null,\n    \"size\": \"M\",\n    \"colour\": \"Black\",\n    \"style\": \"TSHIRT-ORG\",\n    \"length_mm\": 300,\n    \"width_mm\": 250,\n    \"height_mm\": 20,\n    \"weight_g\": 180,\n    \"declared_value\": \"14.99\",\n    \"currency\": \"GBP\",\n    \"hs_code\": \"610910\",\n    \"country_of_origin\": \"PT\",\n    \"kind\": \"SIMPLE\",\n    \"fnsku\": null,\n    \"batch_tracked\": false,\n    \"expiry_tracked\": false,\n    \"serial_tracked\": false,\n    \"fragile\": false,\n    \"dangerous_goods\": false,\n    \"reorder_level\": 50,\n    \"tags\": [],\n    \"active\": true,\n    \"barcodes\": [\n      {\n        \"barcode\": \"5012345678900\",\n        \"uom\": \"EACH\",\n        \"quantity\": 1\n      }\n    ],\n    \"created_at\": \"2026-11-10T09:00:00.000Z\",\n    \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Change a product",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/:product_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ":product_id"
              ],
              "variable": [
                {
                  "key": "product_id",
                  "value": "{{product_id}}",
                  "description": "The product's id."
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"weight_g\": 185,\n  \"reorder_level\": 40\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products/:product_id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products",
                    ":product_id"
                  ],
                  "variable": [
                    {
                      "key": "product_id",
                      "value": "{{product_id}}",
                      "description": "The product's id."
                    }
                  ]
                },
                "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.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"weight_g\": 185,\n  \"reorder_level\": 40\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n    \"sku\": \"TSHIRT-BLK-M\",\n    \"name\": \"Organic T-shirt, black, medium\",\n    \"description\": null,\n    \"size\": \"M\",\n    \"colour\": \"Black\",\n    \"style\": \"TSHIRT-ORG\",\n    \"length_mm\": 300,\n    \"width_mm\": 250,\n    \"height_mm\": 20,\n    \"weight_g\": 180,\n    \"declared_value\": \"14.99\",\n    \"currency\": \"GBP\",\n    \"hs_code\": \"610910\",\n    \"country_of_origin\": \"PT\",\n    \"kind\": \"SIMPLE\",\n    \"fnsku\": null,\n    \"batch_tracked\": false,\n    \"expiry_tracked\": false,\n    \"serial_tracked\": false,\n    \"fragile\": false,\n    \"dangerous_goods\": false,\n    \"reorder_level\": 50,\n    \"tags\": [],\n    \"active\": true,\n    \"barcodes\": [\n      {\n        \"barcode\": \"5012345678900\",\n        \"uom\": \"EACH\",\n        \"quantity\": 1\n      }\n    ],\n    \"created_at\": \"2026-11-10T09:00:00.000Z\",\n    \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Create or update products in bulk",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                "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 }`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"name\": \"Organic T-shirt, black, medium\",\n      \"weight_g\": 180\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"name\": \"Organic T-shirt, black, large\",\n      \"weight_g\": 195\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products/bulk",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products",
                    "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 }`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"items\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"name\": \"Organic T-shirt, black, medium\",\n      \"weight_g\": 180\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"name\": \"Organic T-shirt, black, large\",\n      \"weight_g\": 195\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"index\": 2,\n        \"sku\": \"TSHIRT-BLK-XL\",\n        \"status\": \"error\",\n        \"product_id\": \"d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70\",\n        \"error\": {\n          \"code\": \"VALIDATION\",\n          \"message\": \"A new product needs a name.\"\n        }\n      }\n    ],\n    \"summary\": {\n      \"total\": 3,\n      \"created\": 1,\n      \"updated\": 1,\n      \"errors\": 1\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List products",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "style",
                  "value": "",
                  "description": "Every size and colour of one style. Case does not matter.",
                  "disabled": true
                },
                {
                  "key": "include_inactive",
                  "value": "",
                  "description": "Include retired products. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "missing_data",
                  "value": "",
                  "description": "Only products with no weight or size. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/products",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "products"
                  ],
                  "query": [
                    {
                      "key": "search",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "style",
                      "value": "",
                      "description": "Every size and colour of one style. Case does not matter.",
                      "disabled": true
                    },
                    {
                      "key": "include_inactive",
                      "value": "",
                      "description": "Include retired products. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "missing_data",
                      "value": "",
                      "description": "Only products with no weight or size. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "updated_since",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"Organic T-shirt, black, medium\",\n        \"description\": null,\n        \"size\": \"M\",\n        \"colour\": \"Black\",\n        \"style\": \"TSHIRT-ORG\",\n        \"length_mm\": 300,\n        \"width_mm\": 250,\n        \"height_mm\": 20,\n        \"weight_g\": 180,\n        \"declared_value\": \"14.99\",\n        \"currency\": \"GBP\",\n        \"hs_code\": \"610910\",\n        \"country_of_origin\": \"PT\",\n        \"kind\": \"SIMPLE\",\n        \"fnsku\": null,\n        \"batch_tracked\": false,\n        \"expiry_tracked\": false,\n        \"serial_tracked\": false,\n        \"fragile\": false,\n        \"dangerous_goods\": false,\n        \"reorder_level\": 50,\n        \"tags\": [],\n        \"active\": true,\n        \"barcodes\": [\n          {\n            \"barcode\": \"5012345678900\",\n            \"uom\": \"EACH\",\n            \"quantity\": 1\n          }\n        ],\n        \"created_at\": \"2026-11-10T09:00:00.000Z\",\n        \"updated_at\": \"2026-11-10T09:00:00.000Z\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Stock",
      "description": "Live stock levels for every active product, and the stock ledger.",
      "item": [
        {
          "name": "List stock levels",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inventory",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inventory"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "in_stock_only",
                  "value": "",
                  "description": "Only products with stock. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "low_only",
                  "value": "",
                  "description": "Only products at or below their reorder level. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "include",
                  "value": "",
                  "description": "`batches` adds `batches` to every row. Any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inventory",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inventory"
                  ],
                  "query": [
                    {
                      "key": "search",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "in_stock_only",
                      "value": "",
                      "description": "Only products with stock. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "low_only",
                      "value": "",
                      "description": "Only products at or below their reorder level. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "include",
                      "value": "",
                      "description": "`batches` adds `batches` to every row. Any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "updated_since",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"Organic T-shirt, black, medium\",\n        \"kind\": \"SIMPLE\",\n        \"reorder_level\": 50,\n        \"on_hand\": 140,\n        \"allocated\": 12,\n        \"available\": 128,\n        \"receiving\": 0,\n        \"quarantined\": 0,\n        \"damaged\": 0,\n        \"suspect\": 0,\n        \"low\": false,\n        \"updated_at\": \"2026-11-19T10:12:44.102Z\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Read the stock ledger",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inventory/movements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inventory",
                "movements"
              ],
              "query": [
                {
                  "key": "after",
                  "value": "",
                  "description": "A movement_id: cursor mode. Digits only, up to 9223372036854775807.",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "description": "Only movements at or after this time. An ISO 8601 date-time, or a date meaning its UTC midnight.",
                  "disabled": true
                },
                {
                  "key": "until",
                  "value": "",
                  "description": "Only movements before this time (exclusive). An ISO 8601 date-time, or a date meaning its UTC midnight.",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "Comma-separated: OPENING_BALANCE, RECEIPT, ADJUSTMENT, PICK, PACK, DESPATCH, RETURN, DISPOSAL, KIT, INTERNAL. Any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "sku",
                  "value": "",
                  "description": "One SKU, exactly.",
                  "disabled": true
                },
                {
                  "key": "product_id",
                  "value": "",
                  "description": "One product. Must be a UUID.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inventory/movements",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inventory",
                    "movements"
                  ],
                  "query": [
                    {
                      "key": "after",
                      "value": "",
                      "description": "A movement_id: cursor mode. Digits only, up to 9223372036854775807.",
                      "disabled": true
                    },
                    {
                      "key": "since",
                      "value": "",
                      "description": "Only movements at or after this time. An ISO 8601 date-time, or a date meaning its UTC midnight.",
                      "disabled": true
                    },
                    {
                      "key": "until",
                      "value": "",
                      "description": "Only movements before this time (exclusive). An ISO 8601 date-time, or a date meaning its UTC midnight.",
                      "disabled": true
                    },
                    {
                      "key": "type",
                      "value": "",
                      "description": "Comma-separated: OPENING_BALANCE, RECEIPT, ADJUSTMENT, PICK, PACK, DESPATCH, RETURN, DISPOSAL, KIT, INTERNAL. Any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "sku",
                      "value": "",
                      "description": "One SKU, exactly.",
                      "disabled": true
                    },
                    {
                      "key": "product_id",
                      "value": "",
                      "description": "One product. Must be a UUID.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"movement_id\": \"184467\",\n        \"created_at\": \"2026-11-16T16:05:40.950Z\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"product_name\": \"Organic T-shirt, black, medium\",\n        \"quantity_delta\": -2,\n        \"qty_after\": 126,\n        \"type\": \"DESPATCH\",\n        \"reason\": \"DESPATCH\",\n        \"reason_note\": null,\n        \"status\": \"PICKED\",\n        \"batch_no\": null,\n        \"expiry_date\": null,\n        \"reference\": \"SO-284117\",\n        \"by\": \"Angler Fulfilment\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Orders",
      "description": "Send orders, read them back and cancel them before picking starts.\n\nThe sandbox steps for orders are here too. 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.",
      "item": [
        {
          "name": "Create an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_ref\": \"{{external_ref}}\",\n  \"ship_to\": {\n    \"name\": \"Alex Example\",\n    \"email\": \"alex@example.com\",\n    \"phone\": \"+447700900123\",\n    \"line1\": \"10 Example Street\",\n    \"line2\": \"Flat 2\",\n    \"city\": \"Manchester\",\n    \"postcode\": \"M1 1AA\",\n    \"country\": \"GB\"\n  },\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 2,\n      \"unit_price\": \"14.99\",\n      \"name\": \"T-shirt, black, M\"\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"quantity\": 1,\n      \"unit_price\": \"14.99\",\n      \"name\": \"T-shirt, black, L\"\n    }\n  ],\n  \"requested_service\": \"Tracked 48\",\n  \"packing_instructions\": \"Please include the returns slip.\",\n  \"order_value\": \"44.97\",\n  \"sales_channel\": \"website\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders"
                  ]
                },
                "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.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"external_ref\": \"{{external_ref}}\",\n  \"ship_to\": {\n    \"name\": \"Alex Example\",\n    \"email\": \"alex@example.com\",\n    \"phone\": \"+447700900123\",\n    \"line1\": \"10 Example Street\",\n    \"line2\": \"Flat 2\",\n    \"city\": \"Manchester\",\n    \"postcode\": \"M1 1AA\",\n    \"country\": \"GB\"\n  },\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 2,\n      \"unit_price\": \"14.99\",\n      \"name\": \"T-shirt, black, M\"\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"quantity\": 1,\n      \"unit_price\": \"14.99\",\n      \"name\": \"T-shirt, black, L\"\n    }\n  ],\n  \"requested_service\": \"Tracked 48\",\n  \"packing_instructions\": \"Please include the returns slip.\",\n  \"order_value\": \"44.97\",\n  \"sales_channel\": \"website\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"number\": \"SO-284117\",\n    \"channel\": \"API\",\n    \"external_ref\": \"WEB-10023\",\n    \"sales_channel\": \"website\",\n    \"channel_order_number\": null,\n    \"return_tracking_number\": null,\n    \"status\": \"ALLOCATED\",\n    \"urgent\": false,\n    \"ordered_at\": \"2026-11-16T09:41:07.512Z\",\n    \"ship_by\": \"2026-11-16T14:00:00.000Z\",\n    \"requested_service\": \"Tracked 48\",\n    \"order_value\": \"44.97\",\n    \"currency\": \"GBP\",\n    \"gift_message\": null,\n    \"packing_instructions\": \"Please include the returns slip.\",\n    \"ship_to\": {\n      \"name\": \"Alex Example\",\n      \"line1\": \"10 Example Street\",\n      \"city\": \"Manchester\",\n      \"postcode\": \"M1 1AA\",\n      \"country\": \"GB\"\n    },\n    \"lines\": [\n      {\n        \"channel_sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"T-shirt, black, M\",\n        \"quantity\": 2,\n        \"unit_price\": \"14.99\",\n        \"qty_allocated\": 2,\n        \"qty_picked\": 0,\n        \"qty_packed\": 0,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        },\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"bundle_sku\": null\n      }\n    ],\n    \"holds\": [\n      {\n        \"code\": \"INSUFFICIENT_STOCK\",\n        \"detail\": \"Short: TSHIRT-BLK-M (2)\",\n        \"help\": \"Not enough stock. It goes ahead by itself as soon as the stock arrives.\",\n        \"placed_at\": \"2026-11-16T09:41:07.700Z\",\n        \"released_at\": null\n      }\n    ],\n    \"events\": [\n      {\n        \"type\": \"order.allocated\",\n        \"message\": \"Checked and stock reserved. Ready to pick.\",\n        \"by\": \"API key \\\"ERP live\\\"\",\n        \"created_at\": \"2026-11-16T09:41:07.700Z\"\n      }\n    ],\n    \"shipments\": [\n      {\n        \"parcel_no\": 1,\n        \"status\": \"DESPATCHED\",\n        \"carrier\": \"Royal Mail\",\n        \"service_code\": \"TPS48\",\n        \"tracking_number\": \"RM987654321GB\",\n        \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB\",\n        \"despatched_at\": \"2026-11-16T16:05:40.950Z\",\n        \"tracking_state\": \"IN_TRANSIT\",\n        \"delivered_at\": null,\n        \"postage_charged\": \"3.45\",\n        \"label_error\": null,\n        \"weight_g\": 420\n      }\n    ],\n    \"documents\": [\n      {\n        \"document_id\": \"0c7e5a1d-2f4b-4c6e-8a9d-1b3c5e7f9a20\",\n        \"type\": \"RETURN_LABEL\",\n        \"file_name\": \"return-SO-284117.pdf\",\n        \"file_size\": 48213,\n        \"page_count\": 1,\n        \"created_at\": \"2026-11-16T09:41:07.520Z\",\n        \"available\": true\n      }\n    ],\n    \"created_at\": \"2026-11-16T09:41:07.512Z\",\n    \"updated_at\": \"2026-11-16T09:41:07.700Z\",\n    \"despatched_at\": null,\n    \"delivered_at\": null,\n    \"cancelled_at\": null,\n    \"country\": \"GB\",\n    \"service_code\": \"TPS48\",\n    \"tags\": [],\n    \"marketplace\": null,\n    \"channel_order_id\": null\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.collectionVariables.set('external_ref', 'WEB-' + Date.now());"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 201', function () { pm.response.to.have.status(201); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Get an order",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}",
                  "description": "The order's id."
                }
              ]
            },
            "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`."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/:order_id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    ":order_id"
                  ],
                  "variable": [
                    {
                      "key": "order_id",
                      "value": "{{order_id}}",
                      "description": "The order's id."
                    }
                  ]
                },
                "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`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"number\": \"SO-284117\",\n    \"channel\": \"API\",\n    \"external_ref\": \"WEB-10023\",\n    \"sales_channel\": \"website\",\n    \"channel_order_number\": null,\n    \"return_tracking_number\": null,\n    \"status\": \"ALLOCATED\",\n    \"urgent\": false,\n    \"ordered_at\": \"2026-11-16T09:41:07.512Z\",\n    \"ship_by\": \"2026-11-16T14:00:00.000Z\",\n    \"requested_service\": \"Tracked 48\",\n    \"order_value\": \"44.97\",\n    \"currency\": \"GBP\",\n    \"gift_message\": null,\n    \"packing_instructions\": \"Please include the returns slip.\",\n    \"ship_to\": {\n      \"name\": \"Alex Example\",\n      \"line1\": \"10 Example Street\",\n      \"city\": \"Manchester\",\n      \"postcode\": \"M1 1AA\",\n      \"country\": \"GB\"\n    },\n    \"lines\": [\n      {\n        \"channel_sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"T-shirt, black, M\",\n        \"quantity\": 2,\n        \"unit_price\": \"14.99\",\n        \"qty_allocated\": 2,\n        \"qty_picked\": 0,\n        \"qty_packed\": 0,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        },\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"bundle_sku\": null\n      }\n    ],\n    \"holds\": [\n      {\n        \"code\": \"INSUFFICIENT_STOCK\",\n        \"detail\": \"Short: TSHIRT-BLK-M (2)\",\n        \"help\": \"Not enough stock. It goes ahead by itself as soon as the stock arrives.\",\n        \"placed_at\": \"2026-11-16T09:41:07.700Z\",\n        \"released_at\": null\n      }\n    ],\n    \"events\": [\n      {\n        \"type\": \"order.allocated\",\n        \"message\": \"Checked and stock reserved. Ready to pick.\",\n        \"by\": \"API key \\\"ERP live\\\"\",\n        \"created_at\": \"2026-11-16T09:41:07.700Z\"\n      }\n    ],\n    \"shipments\": [\n      {\n        \"parcel_no\": 1,\n        \"status\": \"DESPATCHED\",\n        \"carrier\": \"Royal Mail\",\n        \"service_code\": \"TPS48\",\n        \"tracking_number\": \"RM987654321GB\",\n        \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB\",\n        \"despatched_at\": \"2026-11-16T16:05:40.950Z\",\n        \"tracking_state\": \"IN_TRANSIT\",\n        \"delivered_at\": null,\n        \"postage_charged\": \"3.45\",\n        \"label_error\": null,\n        \"weight_g\": 420\n      }\n    ],\n    \"documents\": [\n      {\n        \"document_id\": \"0c7e5a1d-2f4b-4c6e-8a9d-1b3c5e7f9a20\",\n        \"type\": \"RETURN_LABEL\",\n        \"file_name\": \"return-SO-284117.pdf\",\n        \"file_size\": 48213,\n        \"page_count\": 1,\n        \"created_at\": \"2026-11-16T09:41:07.520Z\",\n        \"available\": true\n      }\n    ],\n    \"created_at\": \"2026-11-16T09:41:07.512Z\",\n    \"updated_at\": \"2026-11-16T09:41:07.700Z\",\n    \"despatched_at\": null,\n    \"delivered_at\": null,\n    \"cancelled_at\": null,\n    \"country\": \"GB\",\n    \"service_code\": \"TPS48\",\n    \"tags\": [],\n    \"marketplace\": null,\n    \"channel_order_id\": null\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "exact",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "held_only",
                  "value": "",
                  "description": "Only orders on hold. Overrides status. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "sales_channel",
                  "value": "",
                  "description": "Only orders from that channel. Case and extra spaces do not matter.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders"
                  ],
                  "query": [
                    {
                      "key": "status",
                      "value": "",
                      "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                      "disabled": true
                    },
                    {
                      "key": "search",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "exact",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "held_only",
                      "value": "",
                      "description": "Only orders on hold. Overrides status. `true` or `false` (empty means false); any other value is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "sales_channel",
                      "value": "",
                      "description": "Only orders from that channel. Case and extra spaces do not matter.",
                      "disabled": true
                    },
                    {
                      "key": "updated_since",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n        \"number\": \"SO-284117\",\n        \"channel\": \"API\",\n        \"external_ref\": \"WEB-10023\",\n        \"sales_channel\": \"website\",\n        \"channel_order_number\": null,\n        \"return_tracking_number\": null,\n        \"status\": \"ALLOCATED\",\n        \"urgent\": false,\n        \"ordered_at\": \"2026-11-16T09:41:07.512Z\",\n        \"ship_by\": \"2026-11-16T14:00:00.000Z\",\n        \"requested_service\": \"Tracked 48\",\n        \"order_value\": \"44.97\",\n        \"currency\": \"GBP\",\n        \"gift_message\": null,\n        \"packing_instructions\": \"Please include the returns slip.\",\n        \"created_at\": \"2026-11-16T09:41:07.512Z\",\n        \"updated_at\": \"2026-11-16T09:41:07.700Z\",\n        \"despatched_at\": null,\n        \"delivered_at\": null,\n        \"cancelled_at\": null,\n        \"country\": \"GB\",\n        \"service_code\": \"TPS48\",\n        \"tags\": [],\n        \"marketplace\": null,\n        \"channel_order_id\": null,\n        \"units\": 3,\n        \"customer\": \"Alex Example\",\n        \"holds\": [\n          {\n            \"code\": \"INSUFFICIENT_STOCK\",\n            \"detail\": \"Short: TSHIRT-BLK-M (2)\",\n            \"help\": \"Not enough stock. It goes ahead by itself as soon as the stock arrives.\"\n          }\n        ],\n        \"shipments\": [\n          {\n            \"status\": \"LABEL_PENDING\",\n            \"tracking_number\": null,\n            \"carrier\": \"Royal Mail\"\n          }\n        ]\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Add documents to an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/documents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "documents"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}",
                  "description": "The order's id."
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"documents\": [\n    {\n      \"type\": \"RETURN_LABEL\",\n      \"filename\": \"return-label-test.pdf\",\n      \"content_base64\": \"JVBERi0xLjcKJYGBgYEKCjEgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFsgMyAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKCjIgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagoKMyAwIG9iago8PAovVHlwZSAvUGFnZQovUGFyZW50IDEgMCBSCi9SZXNvdXJjZXMgPDwKL0ZvbnQgPDwKL0hlbHZldGljYS03MDk4NDgwNzg5IDQgMCBSCj4+Ci9YT2JqZWN0IDw8Cj4+Ci9FeHRHU3RhdGUgPDwKPj4KPj4KL01lZGlhQm94IFsgMCAwIDI5OCA0MjAgXQovQW5ub3RzIFsgXQovQ29udGVudHMgWyA1IDAgUiBdCj4+CmVuZG9iagoKNCAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKPj4KZW5kb2JqCgo1IDAgb2JqCjw8Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMTE0Cj4+CnN0cmVhbQp4nB2KMQoCQQxF+3+K1IKYycwkGRALlwULGyEXEFlFWQtFPP+O8uEV7/0X9gGm3943bA7T/J0+98t5bdy8OJs3SoXiCuk8Iv2viTJTdqZ4YltFqxWrJjoK66BJu9FBWNxKb9mKtB3FA7HCGDhhATyiGcUKZW5kc3RyZWFtCmVuZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE2IDAwMDAwIG4gCjAwMDAwMDAwNzYgMDAwMDAgbiAKMDAwMDAwMDEyNiAwMDAwMCBuIAowMDAwMDAwMzIxIDAwMDAwIG4gCjAwMDAwMDA0MTkgMDAwMDAgbiAKCnRyYWlsZXIKPDwKL1NpemUgNgovUm9vdCAyIDAgUgo+PgoKc3RhcnR4cmVmCjYwNgolJUVPRg==\"\n    }\n  ],\n  \"return_tracking_number\": \"QZ123456789GB\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/:order_id/documents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    ":order_id",
                    "documents"
                  ],
                  "variable": [
                    {
                      "key": "order_id",
                      "value": "{{order_id}}",
                      "description": "The order's id."
                    }
                  ]
                },
                "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`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"documents\": [\n    {\n      \"type\": \"RETURN_LABEL\",\n      \"filename\": \"return-label-test.pdf\",\n      \"content_base64\": \"JVBERi0xLjcKJYGBgYEKCjEgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFsgMyAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKCjIgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagoKMyAwIG9iago8PAovVHlwZSAvUGFnZQovUGFyZW50IDEgMCBSCi9SZXNvdXJjZXMgPDwKL0ZvbnQgPDwKL0hlbHZldGljYS03MDk4NDgwNzg5IDQgMCBSCj4+Ci9YT2JqZWN0IDw8Cj4+Ci9FeHRHU3RhdGUgPDwKPj4KPj4KL01lZGlhQm94IFsgMCAwIDI5OCA0MjAgXQovQW5ub3RzIFsgXQovQ29udGVudHMgWyA1IDAgUiBdCj4+CmVuZG9iagoKNCAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKPj4KZW5kb2JqCgo1IDAgb2JqCjw8Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMTE0Cj4+CnN0cmVhbQp4nB2KMQoCQQxF+3+K1IKYycwkGRALlwULGyEXEFlFWQtFPP+O8uEV7/0X9gGm3943bA7T/J0+98t5bdy8OJs3SoXiCuk8Iv2viTJTdqZ4YltFqxWrJjoK66BJu9FBWNxKb9mKtB3FA7HCGDhhATyiGcUKZW5kc3RyZWFtCmVuZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE2IDAwMDAwIG4gCjAwMDAwMDAwNzYgMDAwMDAgbiAKMDAwMDAwMDEyNiAwMDAwMCBuIAowMDAwMDAwMzIxIDAwMDAwIG4gCjAwMDAwMDA0MTkgMDAwMDAgbiAKCnRyYWlsZXIKPDwKL1NpemUgNgovUm9vdCAyIDAgUgo+PgoKc3RhcnR4cmVmCjYwNgolJUVPRg==\"\n    }\n  ],\n  \"return_tracking_number\": \"QZ123456789GB\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"number\": \"SO-284117\",\n    \"channel\": \"API\",\n    \"external_ref\": \"WEB-10023\",\n    \"sales_channel\": \"website\",\n    \"channel_order_number\": null,\n    \"return_tracking_number\": null,\n    \"status\": \"ALLOCATED\",\n    \"urgent\": false,\n    \"ordered_at\": \"2026-11-16T09:41:07.512Z\",\n    \"ship_by\": \"2026-11-16T14:00:00.000Z\",\n    \"requested_service\": \"Tracked 48\",\n    \"order_value\": \"44.97\",\n    \"currency\": \"GBP\",\n    \"gift_message\": null,\n    \"packing_instructions\": \"Please include the returns slip.\",\n    \"ship_to\": {\n      \"name\": \"Alex Example\",\n      \"line1\": \"10 Example Street\",\n      \"city\": \"Manchester\",\n      \"postcode\": \"M1 1AA\",\n      \"country\": \"GB\"\n    },\n    \"lines\": [\n      {\n        \"channel_sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"T-shirt, black, M\",\n        \"quantity\": 2,\n        \"unit_price\": \"14.99\",\n        \"qty_allocated\": 2,\n        \"qty_picked\": 0,\n        \"qty_packed\": 0,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        },\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"bundle_sku\": null\n      }\n    ],\n    \"holds\": [\n      {\n        \"code\": \"INSUFFICIENT_STOCK\",\n        \"detail\": \"Short: TSHIRT-BLK-M (2)\",\n        \"help\": \"Not enough stock. It goes ahead by itself as soon as the stock arrives.\",\n        \"placed_at\": \"2026-11-16T09:41:07.700Z\",\n        \"released_at\": null\n      }\n    ],\n    \"events\": [\n      {\n        \"type\": \"order.allocated\",\n        \"message\": \"Checked and stock reserved. Ready to pick.\",\n        \"by\": \"API key \\\"ERP live\\\"\",\n        \"created_at\": \"2026-11-16T09:41:07.700Z\"\n      }\n    ],\n    \"shipments\": [\n      {\n        \"parcel_no\": 1,\n        \"status\": \"DESPATCHED\",\n        \"carrier\": \"Royal Mail\",\n        \"service_code\": \"TPS48\",\n        \"tracking_number\": \"RM987654321GB\",\n        \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB\",\n        \"despatched_at\": \"2026-11-16T16:05:40.950Z\",\n        \"tracking_state\": \"IN_TRANSIT\",\n        \"delivered_at\": null,\n        \"postage_charged\": \"3.45\",\n        \"label_error\": null,\n        \"weight_g\": 420\n      }\n    ],\n    \"documents\": [\n      {\n        \"document_id\": \"0c7e5a1d-2f4b-4c6e-8a9d-1b3c5e7f9a20\",\n        \"type\": \"RETURN_LABEL\",\n        \"file_name\": \"return-SO-284117.pdf\",\n        \"file_size\": 48213,\n        \"page_count\": 1,\n        \"created_at\": \"2026-11-16T09:41:07.520Z\",\n        \"available\": true\n      }\n    ],\n    \"created_at\": \"2026-11-16T09:41:07.512Z\",\n    \"updated_at\": \"2026-11-16T09:41:07.700Z\",\n    \"despatched_at\": null,\n    \"delivered_at\": null,\n    \"cancelled_at\": null,\n    \"country\": \"GB\",\n    \"service_code\": \"TPS48\",\n    \"tags\": [],\n    \"marketplace\": null,\n    \"channel_order_id\": null\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 201', function () { pm.response.to.have.status(201); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Advance a sandbox order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/sandbox/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "sandbox",
                "advance"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}",
                  "description": "The order's id."
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"DELIVERED\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/:order_id/sandbox/advance",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    ":order_id",
                    "sandbox",
                    "advance"
                  ],
                  "variable": [
                    {
                      "key": "order_id",
                      "value": "{{order_id}}",
                      "description": "The order's id."
                    }
                  ]
                },
                "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`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"to\": \"DELIVERED\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"number\": \"SO-284117\",\n    \"status\": \"DELIVERED\",\n    \"steps\": [\n      \"PICKING\",\n      \"PICKED\",\n      \"PACKED\",\n      \"DESPATCHED\",\n      \"DELIVERED\"\n    ]\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Cancel an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{cancel_order_id}}",
                  "description": "The order's id."
                }
              ]
            },
            "description": "Cancel an order before picking starts. Reserved stock is released. Scope `orders`. Answers `200` with the cancelled order.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Customer cancelled on our website\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/:order_id/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    ":order_id",
                    "cancel"
                  ],
                  "variable": [
                    {
                      "key": "order_id",
                      "value": "{{cancel_order_id}}",
                      "description": "The order's id."
                    }
                  ]
                },
                "description": "Cancel an order before picking starts. Reserved stock is released. Scope `orders`. Answers `200` with the cancelled order.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"Customer cancelled on our website\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"number\": \"SO-284117\",\n    \"channel\": \"API\",\n    \"external_ref\": \"WEB-10023\",\n    \"sales_channel\": \"website\",\n    \"channel_order_number\": null,\n    \"return_tracking_number\": null,\n    \"status\": \"ALLOCATED\",\n    \"urgent\": false,\n    \"ordered_at\": \"2026-11-16T09:41:07.512Z\",\n    \"ship_by\": \"2026-11-16T14:00:00.000Z\",\n    \"requested_service\": \"Tracked 48\",\n    \"order_value\": \"44.97\",\n    \"currency\": \"GBP\",\n    \"gift_message\": null,\n    \"packing_instructions\": \"Please include the returns slip.\",\n    \"ship_to\": {\n      \"name\": \"Alex Example\",\n      \"line1\": \"10 Example Street\",\n      \"city\": \"Manchester\",\n      \"postcode\": \"M1 1AA\",\n      \"country\": \"GB\"\n    },\n    \"lines\": [\n      {\n        \"channel_sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"T-shirt, black, M\",\n        \"quantity\": 2,\n        \"unit_price\": \"14.99\",\n        \"qty_allocated\": 2,\n        \"qty_picked\": 0,\n        \"qty_packed\": 0,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        },\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"bundle_sku\": null\n      }\n    ],\n    \"holds\": [\n      {\n        \"code\": \"INSUFFICIENT_STOCK\",\n        \"detail\": \"Short: TSHIRT-BLK-M (2)\",\n        \"help\": \"Not enough stock. It goes ahead by itself as soon as the stock arrives.\",\n        \"placed_at\": \"2026-11-16T09:41:07.700Z\",\n        \"released_at\": null\n      }\n    ],\n    \"events\": [\n      {\n        \"type\": \"order.allocated\",\n        \"message\": \"Checked and stock reserved. Ready to pick.\",\n        \"by\": \"API key \\\"ERP live\\\"\",\n        \"created_at\": \"2026-11-16T09:41:07.700Z\"\n      }\n    ],\n    \"shipments\": [\n      {\n        \"parcel_no\": 1,\n        \"status\": \"DESPATCHED\",\n        \"carrier\": \"Royal Mail\",\n        \"service_code\": \"TPS48\",\n        \"tracking_number\": \"RM987654321GB\",\n        \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654321GB\",\n        \"despatched_at\": \"2026-11-16T16:05:40.950Z\",\n        \"tracking_state\": \"IN_TRANSIT\",\n        \"delivered_at\": null,\n        \"postage_charged\": \"3.45\",\n        \"label_error\": null,\n        \"weight_g\": 420\n      }\n    ],\n    \"documents\": [\n      {\n        \"document_id\": \"0c7e5a1d-2f4b-4c6e-8a9d-1b3c5e7f9a20\",\n        \"type\": \"RETURN_LABEL\",\n        \"file_name\": \"return-SO-284117.pdf\",\n        \"file_size\": 48213,\n        \"page_count\": 1,\n        \"created_at\": \"2026-11-16T09:41:07.520Z\",\n        \"available\": true\n      }\n    ],\n    \"created_at\": \"2026-11-16T09:41:07.512Z\",\n    \"updated_at\": \"2026-11-16T09:41:07.700Z\",\n    \"despatched_at\": null,\n    \"delivered_at\": null,\n    \"cancelled_at\": null,\n    \"country\": \"GB\",\n    \"service_code\": \"TPS48\",\n    \"tags\": [],\n    \"marketplace\": null,\n    \"channel_order_id\": null\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// A separate order to cancel, so the main order keeps going.",
                  "pm.sendRequest({",
                  "  url: pm.variables.replaceIn('{{baseUrl}}/orders'),",
                  "  method: 'POST',",
                  "  header: { 'X-Api-Key': pm.variables.get('apiKey'), 'Content-Type': 'application/json' },",
                  "  body: { mode: 'raw', raw: JSON.stringify({ external_ref: 'CANCEL-' + Date.now(), ship_to: { name: 'Alex Example', line1: '10 Example Street', city: 'Manchester', postcode: 'M1 1AA', country: 'GB' }, lines: [{ sku: pm.collectionVariables.get('sku'), quantity: 1 }] }) },",
                  "}, function (err, res) {",
                  "  var d = !err && res.code === 201 ? res.json().data : null;",
                  "  pm.collectionVariables.set('cancel_order_id', d ? d.order_id : '');",
                  "  if (!d) { console.log('A separate order to cancel, so the main order keeps going. failed', err || res.code, err ? '' : res.text()); }",
                  "});"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Returns",
      "description": "Announce returns and read back what came in, its grade and what was done with it.\n\nThe sandbox steps for returns are here too. 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.",
      "item": [
        {
          "name": "Announce a return",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/returns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "returns"
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"{{return_ref}}\",\n  \"order_external_ref\": \"{{external_ref}}\",\n  \"reason\": \"Wrong size\",\n  \"tracking_number\": \"QW123456789GB\",\n  \"client_note\": \"Restock if unopened\",\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 1\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/returns",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "returns"
                  ]
                },
                "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`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"{{return_ref}}\",\n  \"order_external_ref\": \"{{external_ref}}\",\n  \"reason\": \"Wrong size\",\n  \"tracking_number\": \"QW123456789GB\",\n  \"client_note\": \"Restock if unopened\",\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 1\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"return_id\": \"8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10\",\n    \"number\": \"RT-018342\",\n    \"reference\": \"RMA-55120\",\n    \"status\": \"RECEIVED\",\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"order\": {\n      \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n      \"number\": \"SO-284117\",\n      \"channel_order_number\": null,\n      \"status\": \"DELIVERED\",\n      \"created_at\": \"2026-11-16T09:41:07.512Z\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ]\n    },\n    \"store_order_ref\": null,\n    \"reason\": \"Wrong size\",\n    \"tracking_number\": \"QW123456789GB\",\n    \"client_note\": \"Restock if unopened\",\n    \"units_expected\": 2,\n    \"units_received\": 1,\n    \"received\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"grade\": \"A\",\n        \"disposition\": \"RESTOCK\",\n        \"quantity\": 1\n      }\n    ],\n    \"pending_decisions\": 0,\n    \"exchange\": {\n      \"order_id\": \"3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12\",\n      \"number\": \"SO-284190\",\n      \"status\": \"DESPATCHED\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ],\n      \"shipments\": [\n        {\n          \"carrier\": \"Royal Mail\",\n          \"tracking_number\": \"RM987654322GB\",\n          \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654322GB\"\n        }\n      ]\n    },\n    \"created_at\": \"2026-11-18T10:00:00.000Z\",\n    \"updated_at\": \"2026-11-19T12:00:00.000Z\",\n    \"received_at\": \"2026-11-19T11:30:00.000Z\",\n    \"closed_at\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d32\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"qty_expected\": 1,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        }\n      }\n    ],\n    \"items\": [\n      {\n        \"item_id\": \"9c7e5a3b-2d4f-4b6c-8e0a-1f3b5d7e9a21\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"Organic T-shirt, black, medium\",\n        \"quantity\": 1,\n        \"grade\": \"A\",\n        \"grade_label\": \"like new\",\n        \"disposition\": \"RESTOCK\",\n        \"disposition_label\": \"Back in stock\",\n        \"note\": null,\n        \"received_at\": \"2026-11-19T11:30:00.000Z\",\n        \"needs_decision\": false,\n        \"decision\": {\n          \"decision\": \"KEEP\",\n          \"label\": \"Put it on sale\",\n          \"note\": null,\n          \"decided_at\": \"2026-11-19T12:00:00.000Z\",\n          \"done_at\": null,\n          \"done_note\": null,\n          \"tracking_number\": null\n        }\n      }\n    ],\n    \"missing\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ]\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.collectionVariables.set('return_ref', 'RMA-' + Date.now());"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 201', function () { pm.response.to.have.status(201); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a return",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/returns/:return_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "returns",
                ":return_id"
              ],
              "variable": [
                {
                  "key": "return_id",
                  "value": "{{return_id}}",
                  "description": "The return's id."
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/returns/:return_id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "returns",
                    ":return_id"
                  ],
                  "variable": [
                    {
                      "key": "return_id",
                      "value": "{{return_id}}",
                      "description": "The return's id."
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"return_id\": \"8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10\",\n    \"number\": \"RT-018342\",\n    \"reference\": \"RMA-55120\",\n    \"status\": \"RECEIVED\",\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"order\": {\n      \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n      \"number\": \"SO-284117\",\n      \"channel_order_number\": null,\n      \"status\": \"DELIVERED\",\n      \"created_at\": \"2026-11-16T09:41:07.512Z\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ]\n    },\n    \"store_order_ref\": null,\n    \"reason\": \"Wrong size\",\n    \"tracking_number\": \"QW123456789GB\",\n    \"client_note\": \"Restock if unopened\",\n    \"units_expected\": 2,\n    \"units_received\": 1,\n    \"received\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"grade\": \"A\",\n        \"disposition\": \"RESTOCK\",\n        \"quantity\": 1\n      }\n    ],\n    \"pending_decisions\": 0,\n    \"exchange\": {\n      \"order_id\": \"3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12\",\n      \"number\": \"SO-284190\",\n      \"status\": \"DESPATCHED\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ],\n      \"shipments\": [\n        {\n          \"carrier\": \"Royal Mail\",\n          \"tracking_number\": \"RM987654322GB\",\n          \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654322GB\"\n        }\n      ]\n    },\n    \"created_at\": \"2026-11-18T10:00:00.000Z\",\n    \"updated_at\": \"2026-11-19T12:00:00.000Z\",\n    \"received_at\": \"2026-11-19T11:30:00.000Z\",\n    \"closed_at\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d32\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"qty_expected\": 1,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        }\n      }\n    ],\n    \"items\": [\n      {\n        \"item_id\": \"9c7e5a3b-2d4f-4b6c-8e0a-1f3b5d7e9a21\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"Organic T-shirt, black, medium\",\n        \"quantity\": 1,\n        \"grade\": \"A\",\n        \"grade_label\": \"like new\",\n        \"disposition\": \"RESTOCK\",\n        \"disposition_label\": \"Back in stock\",\n        \"note\": null,\n        \"received_at\": \"2026-11-19T11:30:00.000Z\",\n        \"needs_decision\": false,\n        \"decision\": {\n          \"decision\": \"KEEP\",\n          \"label\": \"Put it on sale\",\n          \"note\": null,\n          \"decided_at\": \"2026-11-19T12:00:00.000Z\",\n          \"done_at\": null,\n          \"done_note\": null,\n          \"tracking_number\": null\n        }\n      }\n    ],\n    \"missing\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ]\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List returns",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/returns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "returns"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                  "disabled": true
                },
                {
                  "key": "needs",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/returns",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "returns"
                  ],
                  "query": [
                    {
                      "key": "status",
                      "value": "",
                      "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                      "disabled": true
                    },
                    {
                      "key": "needs",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "search",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "updated_since",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"return_id\": \"8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10\",\n        \"number\": \"RT-018342\",\n        \"reference\": \"RMA-55120\",\n        \"status\": \"RECEIVED\",\n        \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n        \"order\": {\n          \"number\": \"SO-284117\",\n          \"channel_order_number\": null\n        },\n        \"store_order_ref\": null,\n        \"reason\": \"Wrong size\",\n        \"tracking_number\": \"QW123456789GB\",\n        \"client_note\": \"Restock if unopened\",\n        \"units_expected\": 2,\n        \"units_received\": 1,\n        \"received\": [\n          {\n            \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n            \"sku\": \"TSHIRT-BLK-M\",\n            \"grade\": \"A\",\n            \"disposition\": \"RESTOCK\",\n            \"quantity\": 1\n          }\n        ],\n        \"pending_decisions\": 0,\n        \"exchange\": {\n          \"order_id\": \"3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12\",\n          \"number\": \"SO-284190\",\n          \"status\": \"ALLOCATED\"\n        },\n        \"created_at\": \"2026-11-18T10:00:00.000Z\",\n        \"updated_at\": \"2026-11-19T12:00:00.000Z\",\n        \"received_at\": \"2026-11-19T11:30:00.000Z\",\n        \"closed_at\": null\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Book a sandbox return in",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/returns/:return_id/sandbox/receive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "returns",
                ":return_id",
                "sandbox",
                "receive"
              ],
              "variable": [
                {
                  "key": "return_id",
                  "value": "{{return_id}}",
                  "description": "The return's id."
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 1,\n      \"grade\": \"B\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/returns/:return_id/sandbox/receive",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "returns",
                    ":return_id",
                    "sandbox",
                    "receive"
                  ],
                  "variable": [
                    {
                      "key": "return_id",
                      "value": "{{return_id}}",
                      "description": "The return's id."
                    }
                  ]
                },
                "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.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 1,\n      \"grade\": \"B\"\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"return_id\": \"8b6d4f2a-1c3e-4a5b-9d7f-0e2c4a6b8d10\",\n    \"number\": \"RT-018342\",\n    \"reference\": \"RMA-55120\",\n    \"status\": \"RECEIVED\",\n    \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n    \"order\": {\n      \"order_id\": \"2d4f8a9e-6b1c-4e7a-9f0d-3c5b7a1e2f40\",\n      \"number\": \"SO-284117\",\n      \"channel_order_number\": null,\n      \"status\": \"DELIVERED\",\n      \"created_at\": \"2026-11-16T09:41:07.512Z\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ]\n    },\n    \"store_order_ref\": null,\n    \"reason\": \"Wrong size\",\n    \"tracking_number\": \"QW123456789GB\",\n    \"client_note\": \"Restock if unopened\",\n    \"units_expected\": 2,\n    \"units_received\": 1,\n    \"received\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"grade\": \"A\",\n        \"disposition\": \"RESTOCK\",\n        \"quantity\": 1\n      }\n    ],\n    \"pending_decisions\": 0,\n    \"exchange\": {\n      \"order_id\": \"3e5a7c9b-1d2f-4a6b-8c0d-2e4f6a8b0c12\",\n      \"number\": \"SO-284190\",\n      \"status\": \"DESPATCHED\",\n      \"lines\": [\n        {\n          \"channel_sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"T-shirt, black, M\",\n          \"quantity\": 1\n        }\n      ],\n      \"shipments\": [\n        {\n          \"carrier\": \"Royal Mail\",\n          \"tracking_number\": \"RM987654322GB\",\n          \"tracking_url\": \"https://www.royalmail.com/track-your-item#/tracking-results/RM987654322GB\"\n        }\n      ]\n    },\n    \"created_at\": \"2026-11-18T10:00:00.000Z\",\n    \"updated_at\": \"2026-11-19T12:00:00.000Z\",\n    \"received_at\": \"2026-11-19T11:30:00.000Z\",\n    \"closed_at\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d32\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"qty_expected\": 1,\n        \"product\": {\n          \"sku\": \"TSHIRT-BLK-M\",\n          \"name\": \"Organic T-shirt, black, medium\"\n        }\n      }\n    ],\n    \"items\": [\n      {\n        \"item_id\": \"9c7e5a3b-2d4f-4b6c-8e0a-1f3b5d7e9a21\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"name\": \"Organic T-shirt, black, medium\",\n        \"quantity\": 1,\n        \"grade\": \"A\",\n        \"grade_label\": \"like new\",\n        \"disposition\": \"RESTOCK\",\n        \"disposition_label\": \"Back in stock\",\n        \"note\": null,\n        \"received_at\": \"2026-11-19T11:30:00.000Z\",\n        \"needs_decision\": false,\n        \"decision\": {\n          \"decision\": \"KEEP\",\n          \"label\": \"Put it on sale\",\n          \"note\": null,\n          \"decided_at\": \"2026-11-19T12:00:00.000Z\",\n          \"done_at\": null,\n          \"done_note\": null,\n          \"tracking_number\": null\n        }\n      }\n    ],\n    \"missing\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"quantity\": 1\n      }\n    ]\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Inbounds",
      "description": "Advance shipping notices: tell us about stock on its way, then read what we received, line by line.\n\nThe sandbox steps for inbounds are here too. 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.",
      "item": [
        {
          "name": "Send an advance shipping notice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inbounds",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inbounds"
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"{{inbound_ref}}\",\n  \"expected_date\": \"{{expected_date}}\",\n  \"carrier\": \"DHL Freight\",\n  \"tracking_numbers\": [\n    \"JD014600006281940116\"\n  ],\n  \"cartons\": 12,\n  \"pallets\": 1,\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 240\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"quantity\": 180\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inbounds",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inbounds"
                  ]
                },
                "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.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"{{inbound_ref}}\",\n  \"expected_date\": \"{{expected_date}}\",\n  \"carrier\": \"DHL Freight\",\n  \"tracking_numbers\": [\n    \"JD014600006281940116\"\n  ],\n  \"cartons\": 12,\n  \"pallets\": 1,\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"quantity\": 240\n    },\n    {\n      \"sku\": \"{{sku_l}}\",\n      \"quantity\": 180\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"inbound_id\": \"4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70\",\n    \"number\": \"IN-000612\",\n    \"reference\": \"ASN-2026-0417\",\n    \"status\": \"COMPLETED\",\n    \"received\": true,\n    \"expected_date\": \"2026-11-17\",\n    \"allocated_date\": \"2026-11-17\",\n    \"time_slot\": \"08:00-10:00\",\n    \"carrier\": \"DHL Freight\",\n    \"tracking_numbers\": [\n      \"JD014600006281940116\"\n    ],\n    \"cartons\": 12,\n    \"pallets\": 1,\n    \"arrived_at\": \"2026-11-17T08:47:12.000Z\",\n    \"received_at\": \"2026-11-17T13:20:05.000Z\",\n    \"cartons_received\": 12,\n    \"pallets_received\": 1,\n    \"condition\": \"GOOD\",\n    \"discrepancy_note\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"description\": null,\n        \"batch\": null,\n        \"expiry\": null,\n        \"expected\": 240,\n        \"received\": 238,\n        \"damaged\": 1,\n        \"over\": 0,\n        \"short\": 2,\n        \"booked_in\": 237,\n        \"booked\": [\n          {\n            \"batch\": null,\n            \"expiry\": null,\n            \"status\": \"AVAILABLE\",\n            \"quantity\": 237\n          }\n        ]\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"sku\": \"TSHIRT-BLK-S\",\n        \"product_id\": \"f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92\",\n        \"batch\": null,\n        \"expiry\": null,\n        \"status\": \"AVAILABLE\",\n        \"quantity\": 6\n      }\n    ],\n    \"created_at\": \"2026-11-12T11:02:31.000Z\",\n    \"updated_at\": \"2026-11-17T13:20:05.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var d = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000);",
                  "pm.collectionVariables.set('expected_date', d.toISOString().slice(0, 10));",
                  "pm.collectionVariables.set('inbound_ref', 'ASN-' + Date.now());"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 201', function () { pm.response.to.have.status(201); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Get an inbound",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inbounds/:inbound_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inbounds",
                ":inbound_id"
              ],
              "variable": [
                {
                  "key": "inbound_id",
                  "value": "{{inbound_id}}",
                  "description": "The inbound's id."
                }
              ]
            },
            "description": "One inbound, with every line's figures. Scope `inbounds`."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inbounds/:inbound_id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inbounds",
                    ":inbound_id"
                  ],
                  "variable": [
                    {
                      "key": "inbound_id",
                      "value": "{{inbound_id}}",
                      "description": "The inbound's id."
                    }
                  ]
                },
                "description": "One inbound, with every line's figures. Scope `inbounds`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"inbound_id\": \"4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70\",\n    \"number\": \"IN-000612\",\n    \"reference\": \"ASN-2026-0417\",\n    \"status\": \"COMPLETED\",\n    \"received\": true,\n    \"expected_date\": \"2026-11-17\",\n    \"allocated_date\": \"2026-11-17\",\n    \"time_slot\": \"08:00-10:00\",\n    \"carrier\": \"DHL Freight\",\n    \"tracking_numbers\": [\n      \"JD014600006281940116\"\n    ],\n    \"cartons\": 12,\n    \"pallets\": 1,\n    \"arrived_at\": \"2026-11-17T08:47:12.000Z\",\n    \"received_at\": \"2026-11-17T13:20:05.000Z\",\n    \"cartons_received\": 12,\n    \"pallets_received\": 1,\n    \"condition\": \"GOOD\",\n    \"discrepancy_note\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"description\": null,\n        \"batch\": null,\n        \"expiry\": null,\n        \"expected\": 240,\n        \"received\": 238,\n        \"damaged\": 1,\n        \"over\": 0,\n        \"short\": 2,\n        \"booked_in\": 237,\n        \"booked\": [\n          {\n            \"batch\": null,\n            \"expiry\": null,\n            \"status\": \"AVAILABLE\",\n            \"quantity\": 237\n          }\n        ]\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"sku\": \"TSHIRT-BLK-S\",\n        \"product_id\": \"f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92\",\n        \"batch\": null,\n        \"expiry\": null,\n        \"status\": \"AVAILABLE\",\n        \"quantity\": 6\n      }\n    ],\n    \"created_at\": \"2026-11-12T11:02:31.000Z\",\n    \"updated_at\": \"2026-11-17T13:20:05.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List inbounds",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inbounds",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inbounds"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                  "disabled": true
                },
                {
                  "key": "reference",
                  "value": "",
                  "description": "Your ASN number, exactly.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "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.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "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.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inbounds",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inbounds"
                  ],
                  "query": [
                    {
                      "key": "status",
                      "value": "",
                      "description": "Any other value is refused with 400 VALIDATION, listing the allowed values. Empty means no filter.",
                      "disabled": true
                    },
                    {
                      "key": "reference",
                      "value": "",
                      "description": "Your ASN number, exactly.",
                      "disabled": true
                    },
                    {
                      "key": "updated_since",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "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.",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "",
                      "description": "From 1. Digits only: anything else, 0, or above 1,000,000, is refused with 400 VALIDATION.",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "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.",
                      "disabled": true
                    }
                  ]
                },
                "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."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"items\": [\n      {\n        \"inbound_id\": \"4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70\",\n        \"number\": \"IN-000612\",\n        \"reference\": \"ASN-2026-0417\",\n        \"status\": \"COMPLETED\",\n        \"received\": true,\n        \"expected_date\": \"2026-11-17\",\n        \"allocated_date\": \"2026-11-17\",\n        \"time_slot\": \"08:00-10:00\",\n        \"carrier\": \"DHL Freight\",\n        \"tracking_numbers\": [\n          \"JD014600006281940116\"\n        ],\n        \"cartons\": 12,\n        \"pallets\": 1,\n        \"arrived_at\": \"2026-11-17T08:47:12.000Z\",\n        \"received_at\": \"2026-11-17T13:20:05.000Z\",\n        \"cartons_received\": 12,\n        \"pallets_received\": 1,\n        \"condition\": \"GOOD\",\n        \"discrepancy_note\": null,\n        \"lines\": [\n          {\n            \"line_id\": \"b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e\",\n            \"sku\": \"TSHIRT-BLK-M\",\n            \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n            \"description\": null,\n            \"batch\": null,\n            \"expiry\": null,\n            \"expected\": 240,\n            \"received\": 238,\n            \"damaged\": 1,\n            \"over\": 0,\n            \"short\": 2,\n            \"booked_in\": 237,\n            \"booked\": []\n          }\n        ],\n        \"unexpected\": [\n          {\n            \"sku\": \"TSHIRT-BLK-S\",\n            \"product_id\": \"f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92\",\n            \"batch\": null,\n            \"expiry\": null,\n            \"status\": \"AVAILABLE\",\n            \"quantity\": 6\n          }\n        ],\n        \"created_at\": \"2026-11-12T11:02:31.000Z\",\n        \"updated_at\": \"2026-11-17T13:20:05.000Z\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": 1,\n      \"limit\": 25,\n      \"total\": 312,\n      \"total_pages\": 13\n    }\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Book a sandbox inbound in",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inbounds/:inbound_id/sandbox/receive",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inbounds",
                ":inbound_id",
                "sandbox",
                "receive"
              ],
              "variable": [
                {
                  "key": "inbound_id",
                  "value": "{{inbound_id}}",
                  "description": "The inbound's id."
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"received\": 238,\n      \"damaged\": 1\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inbounds/:inbound_id/sandbox/receive",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inbounds",
                    ":inbound_id",
                    "sandbox",
                    "receive"
                  ],
                  "variable": [
                    {
                      "key": "inbound_id",
                      "value": "{{inbound_id}}",
                      "description": "The inbound's id."
                    }
                  ]
                },
                "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`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"{{sku}}\",\n      \"received\": 238,\n      \"damaged\": 1\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"inbound_id\": \"4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70\",\n    \"number\": \"IN-000612\",\n    \"reference\": \"ASN-2026-0417\",\n    \"status\": \"COMPLETED\",\n    \"received\": true,\n    \"expected_date\": \"2026-11-17\",\n    \"allocated_date\": \"2026-11-17\",\n    \"time_slot\": \"08:00-10:00\",\n    \"carrier\": \"DHL Freight\",\n    \"tracking_numbers\": [\n      \"JD014600006281940116\"\n    ],\n    \"cartons\": 12,\n    \"pallets\": 1,\n    \"arrived_at\": \"2026-11-17T08:47:12.000Z\",\n    \"received_at\": \"2026-11-17T13:20:05.000Z\",\n    \"cartons_received\": 12,\n    \"pallets_received\": 1,\n    \"condition\": \"GOOD\",\n    \"discrepancy_note\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"description\": null,\n        \"batch\": null,\n        \"expiry\": null,\n        \"expected\": 240,\n        \"received\": 238,\n        \"damaged\": 1,\n        \"over\": 0,\n        \"short\": 2,\n        \"booked_in\": 237,\n        \"booked\": [\n          {\n            \"batch\": null,\n            \"expiry\": null,\n            \"status\": \"AVAILABLE\",\n            \"quantity\": 237\n          }\n        ]\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"sku\": \"TSHIRT-BLK-S\",\n        \"product_id\": \"f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92\",\n        \"batch\": null,\n        \"expiry\": null,\n        \"status\": \"AVAILABLE\",\n        \"quantity\": 6\n      }\n    ],\n    \"created_at\": \"2026-11-12T11:02:31.000Z\",\n    \"updated_at\": \"2026-11-17T13:20:05.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Cancel an inbound",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inbounds/:inbound_id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inbounds",
                ":inbound_id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "inbound_id",
                  "value": "{{cancel_inbound_id}}",
                  "description": "The inbound's id."
                }
              ]
            },
            "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)."
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Api-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/inbounds/:inbound_id/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "inbounds",
                    ":inbound_id",
                    "cancel"
                  ],
                  "variable": [
                    {
                      "key": "inbound_id",
                      "value": "{{cancel_inbound_id}}",
                      "description": "The inbound's id."
                    }
                  ]
                },
                "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)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Cache-Control",
                  "value": "no-store"
                },
                {
                  "key": "X-Angler-Sandbox",
                  "value": "true"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"data\": {\n    \"inbound_id\": \"4a8c2e6f-0b1d-4f3a-9c5e-7d9b1f3a5c70\",\n    \"number\": \"IN-000612\",\n    \"reference\": \"ASN-2026-0417\",\n    \"status\": \"COMPLETED\",\n    \"received\": true,\n    \"expected_date\": \"2026-11-17\",\n    \"allocated_date\": \"2026-11-17\",\n    \"time_slot\": \"08:00-10:00\",\n    \"carrier\": \"DHL Freight\",\n    \"tracking_numbers\": [\n      \"JD014600006281940116\"\n    ],\n    \"cartons\": 12,\n    \"pallets\": 1,\n    \"arrived_at\": \"2026-11-17T08:47:12.000Z\",\n    \"received_at\": \"2026-11-17T13:20:05.000Z\",\n    \"cartons_received\": 12,\n    \"pallets_received\": 1,\n    \"condition\": \"GOOD\",\n    \"discrepancy_note\": null,\n    \"lines\": [\n      {\n        \"line_id\": \"b1c3d5e7-f9a1-4b3c-8d5e-7f9a1b3c5d7e\",\n        \"sku\": \"TSHIRT-BLK-M\",\n        \"product_id\": \"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f\",\n        \"description\": null,\n        \"batch\": null,\n        \"expiry\": null,\n        \"expected\": 240,\n        \"received\": 238,\n        \"damaged\": 1,\n        \"over\": 0,\n        \"short\": 2,\n        \"booked_in\": 237,\n        \"booked\": [\n          {\n            \"batch\": null,\n            \"expiry\": null,\n            \"status\": \"AVAILABLE\",\n            \"quantity\": 237\n          }\n        ]\n      }\n    ],\n    \"unexpected\": [\n      {\n        \"sku\": \"TSHIRT-BLK-S\",\n        \"product_id\": \"f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92\",\n        \"batch\": null,\n        \"expiry\": null,\n        \"status\": \"AVAILABLE\",\n        \"quantity\": 6\n      }\n    ],\n    \"created_at\": \"2026-11-12T11:02:31.000Z\",\n    \"updated_at\": \"2026-11-17T13:20:05.000Z\"\n  },\n  \"request_id\": \"6b1f3c0e-2d7a-4f43-9a1e-5c2b8d9e0f11\"\n}"
            }
          ],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var d = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000);",
                  "pm.collectionVariables.set('expected_date', d.toISOString().slice(0, 10));",
                  "// A separate inbound to cancel, so the main one can be booked in.",
                  "pm.sendRequest({",
                  "  url: pm.variables.replaceIn('{{baseUrl}}/inbounds'),",
                  "  method: 'POST',",
                  "  header: { 'X-Api-Key': pm.variables.get('apiKey'), 'Content-Type': 'application/json' },",
                  "  body: { mode: 'raw', raw: JSON.stringify({ reference: 'ASN-CANCEL-' + Date.now(), expected_date: pm.collectionVariables.get('expected_date'), cartons: 1, lines: [{ sku: pm.collectionVariables.get('sku'), quantity: 1 }] }) },",
                  "}, function (err, res) {",
                  "  var d = !err && res.code === 201 ? res.json().data : null;",
                  "  pm.collectionVariables.set('cancel_inbound_id', d ? d.inbound_id : '');",
                  "  if (!d) { console.log('A separate inbound to cancel, so the main one can be booked in. failed', err || res.code, err ? '' : res.text()); }",
                  "});"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Answers 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "var body = null;",
          "try { body = pm.response.json(); } catch (e) { body = null; }",
          "pm.test('Answered in the Angler envelope', function () { pm.expect(body).to.be.an('object'); pm.expect(body).to.have.property('request_id'); });",
          "var data = body && body.success ? body.data : null;",
          "var isCancel = /\\/cancel$/.test(pm.request.url.getPath());",
          "if (data && typeof data === 'object' && !data.pagination && !isCancel) {",
          "  if (data.return_id) { pm.collectionVariables.set('return_id', data.return_id); }",
          "  else if (data.inbound_id) { pm.collectionVariables.set('inbound_id', data.inbound_id); }",
          "  else if (data.order_id && data.number) { pm.collectionVariables.set('order_id', data.order_id); }",
          "  else if (data.product_id && data.sku) { pm.collectionVariables.set('product_id', data.product_id); }",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://portal.anglerfulfilment.co.uk/api/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string",
      "description": "Your Angler API key (afk_...). Use a sandbox key. Keep it secret."
    },
    {
      "key": "order_id",
      "value": "",
      "type": "string",
      "description": "The order made by \"Create an order\". Set by the collection test script."
    },
    {
      "key": "product_id",
      "value": "",
      "type": "string",
      "description": "The product made by \"Add a product\". Set by the collection test script."
    },
    {
      "key": "return_id",
      "value": "",
      "type": "string",
      "description": "The return made by \"Announce a return\". Set by the collection test script."
    },
    {
      "key": "inbound_id",
      "value": "",
      "type": "string",
      "description": "The inbound made by \"Send an advance shipping notice\". Set by the collection test script."
    },
    {
      "key": "run",
      "value": "",
      "type": "string",
      "description": "Set by \"Add a product\": makes the SKUs and barcodes of this run new."
    },
    {
      "key": "sku",
      "value": "",
      "type": "string",
      "description": "Set by \"Add a product\": the SKU of this run's first product."
    },
    {
      "key": "sku_l",
      "value": "",
      "type": "string",
      "description": "Set by \"Add a product\": the SKU of the second product, which \"Create or update products in bulk\" adds."
    },
    {
      "key": "ean",
      "value": "",
      "type": "string",
      "description": "Set by \"Add a product\": a barcode for this run's product."
    },
    {
      "key": "case_gtin",
      "value": "",
      "type": "string",
      "description": "Set by \"Add a product\": a case barcode for this run's product."
    },
    {
      "key": "external_ref",
      "value": "",
      "type": "string",
      "description": "Set by \"Create an order\": a new order reference each time, so it is never a replay."
    },
    {
      "key": "cancel_order_id",
      "value": "",
      "type": "string",
      "description": "Set by \"Cancel an order\" before it is sent: a separate order made to be cancelled."
    },
    {
      "key": "return_ref",
      "value": "",
      "type": "string",
      "description": "Set by \"Announce a return\": a new RMA number each time."
    },
    {
      "key": "inbound_ref",
      "value": "",
      "type": "string",
      "description": "Set by \"Send an advance shipping notice\": a new ASN number each time."
    },
    {
      "key": "expected_date",
      "value": "",
      "type": "string",
      "description": "Set before an ASN is sent: a week from today."
    },
    {
      "key": "cancel_inbound_id",
      "value": "",
      "type": "string",
      "description": "Set by \"Cancel an inbound\" before it is sent: a separate inbound made to be cancelled."
    }
  ]
}
