{"openapi":"3.1.0","info":{"title":"Holio Workspace API","version":"2026-09-19","summary":"One door into a tenant's products, orders, stock, freight and e-invoicing.","description":"The Holio Workspace API is one door into a tenant's own data: products and\norders, stock, freight and its invoices, parcels, and e-invoicing on Peppol.\n\n**Authentication.** Every call carries a tenant-bound API key, either as\n`Authorization: Bearer holio_<key_id>_<secret>` or as the `X-Holio-Key`\nheader. A key belongs to exactly one tenant and cannot reach another: the\ngateway strips every company-bearing parameter the caller sent and inserts the\nkey's own. There is no parameter that changes which tenant you are.\n\n**Scopes.** `mcp.read` for reads, `mcp.write` for writes. A key without the\nscope gets 403, and a route outside this document gets 404 rather than 403 —\nthe surface is not mappable by reading error codes.\n\n**Rate limit.** Per key, per minute, with `Retry-After` on 429. The default is\n60 requests per minute; a tenant's plan can raise it.\n\n**Listing.** Every resource lists at `GET /api/<resource>` with `limit`\n(default 100), `offset`, `q` for free-text search over the resource's own\nsearch columns, and `sort`/`dir`. The response carries the rows under a key\nnamed after the resource, plus `count`, `limit`, `offset` and `has_more`.\nUse `has_more` rather than comparing `count` to `total`: `total` is skipped on\nthe fast path and is then absent.\n\n**Writing.** `PATCH /api/<resource>/{id}` with only the fields the resource\ndeclares editable — anything else is rejected by name, so a caller can fix the\nrequest without guessing. Writes are optimistic: the response is the accepted\nstate, and propagation to the system of record happens behind it.\n\n**Stability.** Resources marked `beta` may change shape. Everything else is\ncovered by the deprecation promise: a breaking change is announced before it\nships, and the old shape keeps answering for the announced period.\n","contact":{"name":"Holio","url":"https://holio.ai"}},"servers":[{"url":"https://mcp.holioworkspace.com","description":"Production"}],"tags":[{"name":"account","description":"Account — who the key is, and what it may do"},{"name":"commerce","description":"Commerce — the canonical product and order model"},{"name":"inventory","description":"Inventory — stock, locations, counts and receipts"},{"name":"parties","description":"Parties — contacts and the people behind an order"},{"name":"freight","description":"Freight — products, prices, zones and freight invoices"},{"name":"delivery","description":"Delivery — tracking, claims and carrier cases"},{"name":"einvoice","description":"E-invoice — EHF and Peppol"},{"name":"search","description":"Search — one query across the tenant's data"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-Holio-Key","description":"The tenant key, `holio_<key_id>_<secret>`."},"bearerAuth":{"type":"http","scheme":"bearer","description":"The same key as `Authorization: Bearer <key>`."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","example":"denied"},"reason":{"type":"string","description":"Machine-readable cause: `unauthorized`, `no_membership`, `not_allowed`, `too_many_requests`, `upstream_unavailable`."},"detail":{"type":"string"}},"required":["error"]}}},"security":[{"apiKey":[]},{"bearerAuth":[]}],"paths":{"/api/gateway/whoami":{"get":{"operationId":"getWhoami","summary":"Who this key is","description":"The tenant the key is bound to and the scopes it carries. The first call to make with a new key: it answers 200 only when the key, the tenant binding and the access-control row are all in place.","tags":["account"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company_slug":{"type":"string","example":"vbq_holio_as"},"company_name":{"type":"string","example":"Holio AS"},"scopes":{"type":"array","items":{"type":"string"},"example":["mcp.read"]},"can_write":{"type":"boolean"}},"required":["company_slug","scopes","can_write"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/gateway/entities":{"get":{"operationId":"listEntities","summary":"Every entity this deployment mounts","description":"The full entity catalog as THIS process mounts it, including the resources that are not part of the documented contract. Useful for discovery; the promise is what is in this document.","tags":["account"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object"}}},"required":["entities"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/search":{"post":{"operationId":"search","summary":"Search across the tenant's data","description":"One query over customers, suppliers, products, orders, invoices, accounts and shipments. Scoped to the key's tenant — there is no cross-tenant search.","tags":["search"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"The query."},"limit":{"type":"integer","default":20}},"required":["q"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entity_type":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"url":{"type":"string"}}}},"total":{"type":"integer"}},"required":["results","total"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/einvoices":{"get":{"operationId":"listEinvoices","summary":"E-invoice submissions","description":"Every document this tenant has sent on Peppol, newest first, with its lifecycle state and the provider's delivery evidence when it exists. The access point is an implementation detail and is not named in the response.\n\n_Beta: this shape may change._","tags":["einvoice"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","sent","delivered","rejected","failed","no_action_taken"]},"description":"Only submissions in this state."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"submissions":{"type":"array","items":{"type":"object"}}},"required":["submissions"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/einvoice/status":{"get":{"operationId":"getEinvoiceStatus","summary":"Is the e-invoice channel open for this tenant","description":"Registration, sender profile, connection verdict, submission counters and the list of what still needs attention before a document can be sent. Reads stored state only — it spends no provider calls.\n\n_Beta: this shape may change._","tags":["einvoice"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"How many recent submissions to include."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"string","enum":["ok","key_missing","key_rejected","error","unknown"],"description":"`unknown` means no check has run yet, not that it failed."},"profile":{"type":"object"},"submissions":{"type":"array","items":{"type":"object"}},"attention":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/products":{"get":{"operationId":"listProducts","summary":"List products","description":"The canonical product, independent of which webshop or ERP it came from. A product has variants; the variant is what is sold and counted.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `brand`, `name`, `product_group`, `taxonomy_path`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["brand","name","product_group","status","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"category_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `category_id`."},{"name":"incoming","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `incoming`."},{"name":"product_type_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type_id`."},{"name":"product_type_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type_id_from`."},{"name":"product_type_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type_id_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"catalog_products":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The products in this page. The key is `catalog_products` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","catalog_products"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/products/{id}":{"get":{"operationId":"getProduct","summary":"Get one of products","description":"The canonical product, independent of which webshop or ERP it came from. A product has variants; the variant is what is sold and counted.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_product_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProduct","summary":"Update one of products","description":"Send only the editable fields: `brand`, `description`, `external_id`, `handle`, `name`, `product_group`, `seo_description`, `seo_title`, `series`, `short_description`, `status`, `taxonomy_path`, `usp`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_product_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{},"description":{},"external_id":{},"handle":{},"name":{},"product_group":{},"seo_description":{},"seo_title":{},"series":{},"short_description":{},"status":{},"taxonomy_path":{},"usp":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-variants":{"get":{"operationId":"listProductVariants","summary":"List product variants","description":"One sellable variant of a product — the SKU level. Stock balances and order lines point here, not at the product.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `ean`, `sku`, `title`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["price","sku","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"catalog_product_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_product_id`."},{"name":"catalog_product_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_product_id_from`."},{"name":"catalog_product_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_product_id_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"catalog_variants":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The product variants in this page. The key is `catalog_variants` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","catalog_variants"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-variants/{id}":{"get":{"operationId":"getProductVariant","summary":"Get one of product variants","description":"One sellable variant of a product — the SKU level. Stock balances and order lines point here, not at the product.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_variant_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProductVariant","summary":"Update one of product variants","description":"Send only the editable fields: `compare_at_price`, `cost`, `country_of_origin`, `ean`, `height_cm`, `hs_code`, `length_cm`, `mpn`, `price`, `requires_shipping`, `restock_at`, `sale_from`, `sale_price`, `sale_to`, `sell_when_out_of_stock`, `sku`, `status`, `stock_quantity`, `title`, `unit_of_measure`, `vat_code`, `weight`, `width_cm`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_variant_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"compare_at_price":{},"cost":{},"country_of_origin":{},"ean":{},"height_cm":{},"hs_code":{},"length_cm":{},"mpn":{},"price":{},"requires_shipping":{},"restock_at":{},"sale_from":{},"sale_price":{},"sale_to":{},"sell_when_out_of_stock":{},"sku":{},"status":{},"stock_quantity":{},"title":{},"unit_of_measure":{},"vat_code":{},"weight":{},"width_cm":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-descriptions":{"get":{"operationId":"listProductDescriptions","summary":"List product descriptions","description":"Per-language description text for a product. One row per language.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `description`, `product_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["language_no","line_no","product_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"product_descriptions":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The product descriptions in this page. The key is `product_descriptions` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","product_descriptions"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-descriptions/{id}":{"get":{"operationId":"getProductDescription","summary":"Get one of product descriptions","description":"Per-language description text for a product. One row per language.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `product_description_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProductDescription","summary":"Update one of product descriptions","description":"Send only the editable fields: `add_description`, `description`, `external_id`, `language_no`, `line_no`, `product_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `product_description_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"add_description":{},"description":{},"external_id":{},"language_no":{},"line_no":{},"product_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-structures":{"get":{"operationId":"listProductStructures","summary":"List product structures","description":"Bill of materials: which variants a composite product is built from, and how many of each.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `overridden_description`, `product_no`, `sub_product_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["line_no","product_no","sort_sequence_no","sub_product_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"structures":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The product structures in this page. The key is `structures` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","structures"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product-structures/{id}":{"get":{"operationId":"getProductStructure","summary":"Get one of product structures","description":"Bill of materials: which variants a composite product is built from, and how many of each.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `structure_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProductStructure","summary":"Update one of product structures","description":"Send only the editable fields: `external_id`, `line_no`, `overridden_description`, `processing_method1`, `processing_method2`, `processing_method3`, `processing_method4`, `processing_method5`, `product_no`, `quantity_per_structure`, `sort_sequence_no`, `sub_product_no`, `unit`, `warehouse_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `structure_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{},"line_no":{},"overridden_description":{},"processing_method1":{},"processing_method2":{},"processing_method3":{},"processing_method4":{},"processing_method5":{},"product_no":{},"quantity_per_structure":{},"sort_sequence_no":{},"sub_product_no":{},"unit":{},"warehouse_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orders":{"get":{"operationId":"listOrders","summary":"List orders","description":"The canonical sales order. Orders from Shopify, MyStore and the storefronts all land in this shape; the channel is a field, not a different resource.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `customer_email`, `customer_name`, `order_number`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["customer_name","gross_amount","order_date","order_number","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"catalog_orders":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The orders in this page. The key is `catalog_orders` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","catalog_orders"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orders/{id}":{"get":{"operationId":"getOrder","summary":"Get one of orders","description":"The canonical sales order. Orders from Shopify, MyStore and the storefronts all land in this shape; the channel is a field, not a different resource.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_order_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateOrder","summary":"Update one of orders","description":"Send only the editable fields: `channel_status`, `external_id`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `catalog_order_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_status":{},"external_id":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/returns":{"get":{"operationId":"listReturns","summary":"List returns","description":"A return or RMA against an order, with its lines and its state.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `channel_return_id`, `customer_name`, `order_number`, `rma_number`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["customer_name","order_number","refund_amount","requested_at","rma_state","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"return_rmas":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The returns in this page. The key is `return_rmas` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","return_rmas"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/returns/{id}":{"get":{"operationId":"getReturn","summary":"Get one of returns","description":"A return or RMA against an order, with its lines and its state.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `return_rma_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateReturn","summary":"Update one of returns","description":"Send only the editable fields: `external_id`, `reason`, `rma_state`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `return_rma_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{},"reason":{},"rma_state":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/price-lists":{"get":{"operationId":"listPriceLists","summary":"List price lists","description":"A named price list. Which customers it applies to is decided by the agreement, not by the list.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `customer_group`, `customer_no`, `name`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["is_default","name","priority","status","updated_at","valid_from","valid_to"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"active","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active`."},{"name":"active_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active_from`."},{"name":"active_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active_to`."},{"name":"customer_group","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_group`."},{"name":"customer_group_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_group_from`."},{"name":"customer_group_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_group_to`."},{"name":"customer_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no`."},{"name":"customer_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_from`."},{"name":"customer_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_to`."},{"name":"is_default","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default`."},{"name":"is_default_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default_from`."},{"name":"is_default_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"holio_price_lists":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The price lists in this page. The key is `holio_price_lists` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","holio_price_lists"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/price-lists/{id}":{"get":{"operationId":"getPriceList","summary":"Get one of price lists","description":"A named price list. Which customers it applies to is decided by the agreement, not by the list.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `price_list_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePriceList","summary":"Update one of price lists","description":"Send only the editable fields: `active`, `currency`, `customer_group`, `customer_no`, `is_default`, `name`, `priority`, `status`, `valid_from`, `valid_to`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `price_list_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{},"currency":{},"customer_group":{},"customer_no":{},"is_default":{},"name":{},"priority":{},"status":{},"valid_from":{},"valid_to":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/price-list-entries":{"get":{"operationId":"listPriceListEntries","summary":"List price list entries","description":"One price for one variant on one price list.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `catalog_product_id`, `catalog_variant_id`, `sku`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["min_quantity","sku","unit_price","updated_at","valid_from"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"catalog_variant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_variant_id`."},{"name":"catalog_variant_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_variant_id_from`."},{"name":"catalog_variant_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `catalog_variant_id_to`."},{"name":"currency","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `currency`."},{"name":"currency_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `currency_from`."},{"name":"currency_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `currency_to`."},{"name":"price_list_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `price_list_id`."},{"name":"price_list_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `price_list_id_from`."},{"name":"price_list_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `price_list_id_to`."},{"name":"sku","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `sku`."},{"name":"sku_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `sku_from`."},{"name":"sku_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `sku_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"holio_price_list_entrys":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The price list entries in this page. The key is `holio_price_list_entrys` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","holio_price_list_entrys"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/price-list-entries/{id}":{"get":{"operationId":"getPriceListEntry","summary":"Get one of price list entries","description":"One price for one variant on one price list.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `entry_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePriceListEntry","summary":"Update one of price list entries","description":"Send only the editable fields: `catalog_product_id`, `catalog_variant_id`, `currency`, `discount_percent`, `min_quantity`, `price_list_id`, `sku`, `unit_price`, `valid_from`. Any other field is rejected by name. Requires `mcp.write`.","tags":["commerce"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `entry_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalog_product_id":{},"catalog_variant_id":{},"currency":{},"discount_percent":{},"min_quantity":{},"price_list_id":{},"sku":{},"unit_price":{},"valid_from":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-balances":{"get":{"operationId":"listInventoryBalances","summary":"List inventory balances","description":"On-hand quantity per variant per location. Read-only: a balance is a consequence of movements, and writing one directly would make the ledger disagree with itself.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `balance_no`, `description`, `product_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["available","computed_at","incoming","on_hand","product_no","reserved","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"location_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no`."},{"name":"location_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no_from`."},{"name":"location_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no_to`."},{"name":"product_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no`."},{"name":"product_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no_from`."},{"name":"product_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"inventory_balances":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The inventory balances in this page. The key is `inventory_balances` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","inventory_balances"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-balances/{id}":{"get":{"operationId":"getInventoryBalance","summary":"Get one of inventory balances","description":"On-hand quantity per variant per location. Read-only: a balance is a consequence of movements, and writing one directly would make the ledger disagree with itself.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `balance_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-locations":{"get":{"operationId":"listInventoryLocations","summary":"List inventory locations","description":"A warehouse, a shelf, or any other place stock can be.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `code`, `name`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["code","is_default","location_type","name","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"active","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active`."},{"name":"active_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active_from`."},{"name":"active_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `active_to`."},{"name":"is_default","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default`."},{"name":"is_default_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default_from`."},{"name":"is_default_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `is_default_to`."},{"name":"location_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_type`."},{"name":"location_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_type_from`."},{"name":"location_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_type_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"inventory_locations":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The inventory locations in this page. The key is `inventory_locations` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","inventory_locations"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-locations/{id}":{"get":{"operationId":"getInventoryLocation","summary":"Get one of inventory locations","description":"A warehouse, a shelf, or any other place stock can be.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `location_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateInventoryLocation","summary":"Update one of inventory locations","description":"Send only the editable fields: `active`, `address_json`, `code`, `external_id`, `is_default`, `location_type`, `name`, `shopify_location_id`, `visma_warehouse_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `location_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{},"address_json":{},"code":{},"external_id":{},"is_default":{},"location_type":{},"name":{},"shopify_location_id":{},"visma_warehouse_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-counts":{"get":{"operationId":"listInventoryCounts","summary":"List inventory counts","description":"A stocktake: what was counted, where, by whom, and what it corrected.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `search_note`, `status`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["inventory_count_id","status","updated_at","warehouse_location_no"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"warehouse_location_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_location_no`."},{"name":"warehouse_location_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_location_no_from`."},{"name":"warehouse_location_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_location_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"inventory_counts":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The inventory counts in this page. The key is `inventory_counts` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","inventory_counts"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inventory-counts/{id}":{"get":{"operationId":"getInventoryCount","summary":"Get one of inventory counts","description":"A stocktake: what was counted, where, by whom, and what it corrected.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `inventory_count_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateInventoryCount","summary":"Update one of inventory counts","description":"Send only the editable fields: `search_note`, `status`, `warehouse_location_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `inventory_count_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search_note":{},"status":{},"warehouse_location_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/stock-movements":{"get":{"operationId":"listStockMovements","summary":"List stock movements","description":"The append-only ledger every balance is derived from. Read-only.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `ledger_no`, `product_no`, `reason_code`, `ref_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["ledger_no","movement_type","occurred_at","product_no","qty_delta","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"location_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no`."},{"name":"location_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no_from`."},{"name":"location_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `location_no_to`."},{"name":"movement_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `movement_type`."},{"name":"movement_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `movement_type_from`."},{"name":"movement_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `movement_type_to`."},{"name":"product_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no`."},{"name":"product_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no_from`."},{"name":"product_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_no_to`."},{"name":"ref_kind","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_kind`."},{"name":"ref_kind_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_kind_from`."},{"name":"ref_kind_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_kind_to`."},{"name":"ref_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_no`."},{"name":"ref_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_no_from`."},{"name":"ref_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `ref_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"stock_ledgers":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The stock movements in this page. The key is `stock_ledgers` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","stock_ledgers"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/stock-movements/{id}":{"get":{"operationId":"getStockMovement","summary":"Get one of stock movements","description":"The append-only ledger every balance is derived from. Read-only.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `ledger_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/goods-receipts":{"get":{"operationId":"listGoodsReceipts","summary":"List goods receipts","description":"What actually arrived against a purchase order, line by line.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `note`, `po_no`, `receipt_no`, `supplier_name`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["po_no","receipt_no","received_date","status","supplier_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"po_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no`."},{"name":"po_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no_from`."},{"name":"po_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no_to`."},{"name":"received_date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `received_date`."},{"name":"received_date_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `received_date_from`."},{"name":"received_date_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `received_date_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"supplier_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no`."},{"name":"supplier_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_from`."},{"name":"supplier_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_to`."},{"name":"warehouse_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no`."},{"name":"warehouse_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no_from`."},{"name":"warehouse_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"goods_receipts":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The goods receipts in this page. The key is `goods_receipts` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","goods_receipts"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/goods-receipts/{id}":{"get":{"operationId":"getGoodsReceipt","summary":"Get one of goods receipts","description":"What actually arrived against a purchase order, line by line.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `receipt_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateGoodsReceipt","summary":"Update one of goods receipts","description":"Send only the editable fields: `external_id`, `note`, `po_no`, `received_date`, `status`, `supplier_name`, `supplier_no`, `warehouse_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `receipt_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{},"note":{},"po_no":{},"received_date":{},"status":{},"supplier_name":{},"supplier_no":{},"warehouse_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/purchase-orders":{"get":{"operationId":"listPurchaseOrders","summary":"List purchase orders","description":"An order placed with a supplier.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `note`, `po_no`, `supplier_name`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["expected_date","net_amount","order_date","po_no","status","supplier_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"order_date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_date`."},{"name":"order_date_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_date_from`."},{"name":"order_date_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_date_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"supplier_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no`."},{"name":"supplier_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_from`."},{"name":"supplier_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_to`."},{"name":"warehouse_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no`."},{"name":"warehouse_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no_from`."},{"name":"warehouse_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `warehouse_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"hilde_purchase_orders":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The purchase orders in this page. The key is `hilde_purchase_orders` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","hilde_purchase_orders"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/purchase-orders/{id}":{"get":{"operationId":"getPurchaseOrder","summary":"Get one of purchase orders","description":"An order placed with a supplier.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `po_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePurchaseOrder","summary":"Update one of purchase orders","description":"Send only the editable fields: `currency_no`, `expected_date`, `external_id`, `net_amount`, `note`, `order_date`, `status`, `supplier_email`, `supplier_name`, `supplier_no`, `warehouse_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `po_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency_no":{},"expected_date":{},"external_id":{},"net_amount":{},"note":{},"order_date":{},"status":{},"supplier_email":{},"supplier_name":{},"supplier_no":{},"warehouse_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inbound-shipments":{"get":{"operationId":"listInboundShipments","summary":"List inbound shipments","description":"A supplier's shipment on its way in, before it is received.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `po_no`, `shipment_no`, `supplier_name`, `supplier_order_no`, `tracking_number`, `your_reference`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["eta","last_email_at","pickup_deadline","status","supplier_name","supplier_order_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier`."},{"name":"carrier_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_from`."},{"name":"carrier_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_to`."},{"name":"delivery_method","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_method`."},{"name":"delivery_method_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_method_from`."},{"name":"delivery_method_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_method_to`."},{"name":"po_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no`."},{"name":"po_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no_from`."},{"name":"po_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `po_no_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"supplier_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no`."},{"name":"supplier_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_from`."},{"name":"supplier_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_no_to`."},{"name":"supplier_order_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_order_no`."},{"name":"supplier_order_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_order_no_from`."},{"name":"supplier_order_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_order_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"supplier_shipments":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The inbound shipments in this page. The key is `supplier_shipments` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","supplier_shipments"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inbound-shipments/{id}":{"get":{"operationId":"getInboundShipment","summary":"Get one of inbound shipments","description":"A supplier's shipment on its way in, before it is received.","tags":["inventory"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `shipment_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/contacts":{"get":{"operationId":"listContacts","summary":"List contacts","description":"The master contact record — one person or company, whatever system first learned about them.","tags":["parties"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `city`, `company_name`, `display_name`, `email`, `first_name`, `last_name`, `legal_name`, `org_no`, `phone`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["city","company_name","display_name","email","last_order_at","legal_name","lifetime_value","order_count","org_no","status","updated_at","verification_status"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"associate_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `associate_no`."},{"name":"associate_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `associate_no_from`."},{"name":"associate_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `associate_no_to`."},{"name":"contact_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `contact_type`."},{"name":"contact_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `contact_type_from`."},{"name":"contact_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `contact_type_to`."},{"name":"origin","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `origin`."},{"name":"origin_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `origin_from`."},{"name":"origin_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `origin_to`."},{"name":"registration_country_code","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `registration_country_code`."},{"name":"registration_country_code_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `registration_country_code_from`."},{"name":"registration_country_code_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `registration_country_code_to`."},{"name":"role","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `role`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"supplier_category","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `supplier_category`."},{"name":"verification_status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `verification_status`."},{"name":"verification_status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `verification_status_from`."},{"name":"verification_status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `verification_status_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"contacts":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The contacts in this page. The key is `contacts` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","contacts"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/contacts/{id}":{"get":{"operationId":"getContact","summary":"Get one of contacts","description":"The master contact record — one person or company, whatever system first learned about them.","tags":["parties"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `contact_id`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateContact","summary":"Update one of contacts","description":"Send only the editable fields: `address1`, `address2`, `associate_no`, `attributes`, `city`, `company_name`, `contact_type`, `country`, `display_name`, `email`, `external_id`, `first_name`, `job_title`, `last_name`, `legal_name`, `mobile_phone`, `org_no`, `origin`, `phone`, `postal_code`, `region`, `registration_country_code`, `status`, `tags`, `verification_source`, `verification_status`, `verified_at`, `website`. Any other field is rejected by name. Requires `mcp.write`.","tags":["parties"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `contact_id`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address1":{},"address2":{},"associate_no":{},"attributes":{},"city":{},"company_name":{},"contact_type":{},"country":{},"display_name":{},"email":{},"external_id":{},"first_name":{},"job_title":{},"last_name":{},"legal_name":{},"mobile_phone":{},"org_no":{},"origin":{},"phone":{},"postal_code":{},"region":{},"registration_country_code":{},"status":{},"tags":{},"verification_source":{},"verification_status":{},"verified_at":{},"website":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-products":{"get":{"operationId":"listFreightProducts","summary":"List freight products","description":"A sellable freight service, with the carrier product behind it.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `carrier`, `edi_id`, `freight_product_no`, `name`, `service_code`, `source_product_code`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["carrier","edi_id","name","product_type","service_code","status","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier`."},{"name":"carrier_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_from`."},{"name":"carrier_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_to`."},{"name":"edi_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `edi_id`."},{"name":"edi_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `edi_id_from`."},{"name":"edi_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `edi_id_to`."},{"name":"fuel_handling","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `fuel_handling`."},{"name":"fuel_handling_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `fuel_handling_from`."},{"name":"fuel_handling_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `fuel_handling_to`."},{"name":"product_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type`."},{"name":"product_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type_from`."},{"name":"product_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `product_type_to`."},{"name":"profrakt_product_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `profrakt_product_id`."},{"name":"profrakt_product_id_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `profrakt_product_id_from`."},{"name":"profrakt_product_id_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `profrakt_product_id_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"unit","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `unit`."},{"name":"unit_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `unit_from`."},{"name":"unit_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `unit_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_products":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight products in this page. The key is `freight_products` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_products"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-products/{id}":{"get":{"operationId":"getFreightProduct","summary":"Get one of freight products","description":"A sellable freight service, with the carrier product behind it.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `freight_product_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFreightProduct","summary":"Update one of freight products","description":"Send only the editable fields: `carrier`, `description`, `edi_id`, `fuel_handling`, `included_component_pct`, `name`, `parent_freight_product_no`, `product_type`, `profrakt_product_id`, `service_code`, `source_product_code`, `status`, `unit`, `vat_code`, `volumetric_factor_kg_m3`. Any other field is rejected by name. Requires `mcp.write`.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `freight_product_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{},"description":{},"edi_id":{},"fuel_handling":{},"included_component_pct":{},"name":{},"parent_freight_product_no":{},"product_type":{},"profrakt_product_id":{},"service_code":{},"source_product_code":{},"status":{},"unit":{},"vat_code":{},"volumetric_factor_kg_m3":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-price-groups":{"get":{"operationId":"listFreightPriceGroups","summary":"List freight price groups","description":"A named set of freight prices a customer can be placed in.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `description`, `name`, `price_group_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","status","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"markup_model","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `markup_model`."},{"name":"markup_model_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `markup_model_from`."},{"name":"markup_model_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `markup_model_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_price_groups":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight price groups in this page. The key is `freight_price_groups` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_price_groups"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-price-groups/{id}":{"get":{"operationId":"getFreightPriceGroup","summary":"Get one of freight price groups","description":"A named set of freight prices a customer can be placed in.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `price_group_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFreightPriceGroup","summary":"Update one of freight price groups","description":"Send only the editable fields: `description`, `markup_json`, `markup_model`, `name`, `sale_matrix_ref`, `status`. Any other field is rejected by name. Requires `mcp.write`.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `price_group_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{},"markup_json":{},"markup_model":{},"name":{},"sale_matrix_ref":{},"status":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-zones":{"get":{"operationId":"listFreightZones","summary":"List freight zones","description":"A geographic zone a freight price is quoted for.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `carrier`, `description`, `freight_zone_no`, `zone_code`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["carrier","updated_at","zone_code"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier`."},{"name":"carrier_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_from`."},{"name":"carrier_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_zones":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight zones in this page. The key is `freight_zones` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_zones"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-zones/{id}":{"get":{"operationId":"getFreightZone","summary":"Get one of freight zones","description":"A geographic zone a freight price is quoted for.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `freight_zone_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFreightZone","summary":"Update one of freight zones","description":"Send only the editable fields: `carrier`, `description`, `zone_code`. Any other field is rejected by name. Requires `mcp.write`.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `freight_zone_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{},"description":{},"zone_code":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-weight-classes":{"get":{"operationId":"listFreightWeightClasses","summary":"List freight weight classes","description":"The weight bands a freight price uses.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `freight_product_no`, `weight_class_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["freight_product_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"freight_product_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no`."},{"name":"freight_product_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no_from`."},{"name":"freight_product_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_weight_classes":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight weight classes in this page. The key is `freight_weight_classes` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_weight_classes"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-weight-classes/{id}":{"get":{"operationId":"getFreightWeightClass","summary":"Get one of freight weight classes","description":"The weight bands a freight price uses.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `weight_class_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFreightWeightClass","summary":"Update one of freight weight classes","description":"Send only the editable fields: `freight_product_no`, `over_max_per_kg`, `weight_from_kg`, `weight_to_kg`. Any other field is rejected by name. Requires `mcp.write`.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `weight_class_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"freight_product_no":{},"over_max_per_kg":{},"weight_from_kg":{},"weight_to_kg":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-billing-profiles":{"get":{"operationId":"listFreightBillingProfiles","summary":"List freight billing profiles","description":"How a customer is billed for freight: cadence, channel and grouping.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `billing_profile_no`, `invoice_email`, `note`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["customer_no","delivery_channel","invoicing_interval","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"blocked","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `blocked`."},{"name":"blocked_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `blocked_from`."},{"name":"blocked_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `blocked_to`."},{"name":"customer_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no`."},{"name":"customer_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_from`."},{"name":"customer_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_to`."},{"name":"delivery_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel`."},{"name":"delivery_channel_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel_from`."},{"name":"delivery_channel_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel_to`."},{"name":"exclude_from_invoicing","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `exclude_from_invoicing`."},{"name":"exclude_from_invoicing_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `exclude_from_invoicing_from`."},{"name":"exclude_from_invoicing_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `exclude_from_invoicing_to`."},{"name":"invoicing_interval","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `invoicing_interval`."},{"name":"invoicing_interval_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `invoicing_interval_from`."},{"name":"invoicing_interval_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `invoicing_interval_to`."},{"name":"line_granularity","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_granularity`."},{"name":"line_granularity_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_granularity_from`."},{"name":"line_granularity_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_granularity_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_billing_profiles":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight billing profiles in this page. The key is `freight_billing_profiles` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_billing_profiles"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-billing-profiles/{id}":{"get":{"operationId":"getFreightBillingProfile","summary":"Get one of freight billing profiles","description":"How a customer is billed for freight: cadence, channel and grouping.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `billing_profile_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFreightBillingProfile","summary":"Update one of freight billing profiles","description":"Send only the editable fields: `blocked`, `blocked_reason`, `customer_no`, `delivery_channel`, `due_days`, `exclude_from_invoicing`, `invoice_email`, `invoicing_interval`, `line_granularity`, `note`, `sort_order`, `specification`, `specification_formats`, `summary_block`, `surcharge_lines`, `surcharge_optout_json`. Any other field is rejected by name. Requires `mcp.write`.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `billing_profile_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"blocked":{},"blocked_reason":{},"customer_no":{},"delivery_channel":{},"due_days":{},"exclude_from_invoicing":{},"invoice_email":{},"invoicing_interval":{},"line_granularity":{},"note":{},"sort_order":{},"specification":{},"specification_formats":{},"summary_block":{},"surcharge_lines":{},"surcharge_optout_json":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-invoices":{"get":{"operationId":"listFreightInvoices","summary":"List freight invoices","description":"A freight invoice as Holio produced it. Read-only through the API — an invoice is issued by the billing run, not by a caller.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `customer_name`, `freight_invoice_no`, `kid`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["customer_no","gross_amount","invoice_date","invoice_number","status","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"customer_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no`."},{"name":"customer_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_from`."},{"name":"customer_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `customer_no_to`."},{"name":"delivery_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel`."},{"name":"delivery_channel_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel_from`."},{"name":"delivery_channel_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `delivery_channel_to`."},{"name":"shadow","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `shadow`."},{"name":"shadow_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `shadow_from`."},{"name":"shadow_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `shadow_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_invoices":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight invoices in this page. The key is `freight_invoices` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_invoices"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-invoices/{id}":{"get":{"operationId":"getFreightInvoice","summary":"Get one of freight invoices","description":"A freight invoice as Holio produced it. Read-only through the API — an invoice is issued by the billing run, not by a caller.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `freight_invoice_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-invoice-lines":{"get":{"operationId":"listFreightInvoiceLines","summary":"List freight invoice lines","description":"The lines of a freight invoice, at the granularity the customer's billing profile asked for.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `description`, `freight_product_no`, `invoice_line_no`, `package_number`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["amount","line_no","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"freight_invoice_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_invoice_no`."},{"name":"freight_invoice_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_invoice_no_from`."},{"name":"freight_invoice_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_invoice_no_to`."},{"name":"freight_product_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no`."},{"name":"freight_product_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no_from`."},{"name":"freight_product_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `freight_product_no_to`."},{"name":"line_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_type`."},{"name":"line_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_type_from`."},{"name":"line_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `line_type_to`."},{"name":"package_number","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number`."},{"name":"package_number_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number_from`."},{"name":"package_number_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"freight_invoice_lines":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The freight invoice lines in this page. The key is `freight_invoice_lines` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","freight_invoice_lines"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/freight-invoice-lines/{id}":{"get":{"operationId":"getFreightInvoiceLine","summary":"Get one of freight invoice lines","description":"The lines of a freight invoice, at the granularity the customer's billing profile asked for.","tags":["freight"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `invoice_line_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/parcel-tracking":{"get":{"operationId":"listParcelTracking","summary":"List parcel tracking","description":"Tracking state for a parcel, normalised across carriers.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `carrier`, `order_ref`, `package_number`, `shopify_order_id`, `status_text`, `tracking_number`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["carrier","current_status","delivered_at","last_event_at","last_polled_at","order_ref","tracking_number","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"trackings":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The parcel tracking in this page. The key is `trackings` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","trackings"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/parcel-tracking/{id}":{"get":{"operationId":"getParcelTracking","summary":"Get one of parcel tracking","description":"Tracking state for a parcel, normalised across carriers.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `tracking_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/delivery-claims":{"get":{"operationId":"listDeliveryClaims","summary":"List delivery claims","description":"A claim against a delivery — damage, loss or delay.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `carrier`, `delivery_claim_no`, `description`, `order_ref`, `package_number`, `tracking_no`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["claim_type","claimed_amount","closed_at","opened_at","status","status_at","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier`."},{"name":"carrier_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_from`."},{"name":"carrier_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_to`."},{"name":"claim_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `claim_type`."},{"name":"claim_type_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `claim_type_from`."},{"name":"claim_type_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `claim_type_to`."},{"name":"order_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_ref`."},{"name":"order_ref_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_ref_from`."},{"name":"order_ref_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `order_ref_to`."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status`."},{"name":"status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_from`."},{"name":"status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `status_to`."},{"name":"tracking_no","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `tracking_no`."},{"name":"tracking_no_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `tracking_no_from`."},{"name":"tracking_no_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `tracking_no_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"delivery_claims":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The delivery claims in this page. The key is `delivery_claims` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","delivery_claims"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/delivery-claims/{id}":{"get":{"operationId":"getDeliveryClaim","summary":"Get one of delivery claims","description":"A claim against a delivery — damage, loss or delay.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `delivery_claim_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateDeliveryClaim","summary":"Update one of delivery claims","description":"Send only the editable fields: `carrier`, `claim_type`, `claimed_amount`, `closed_at`, `currency`, `description`, `external_id`, `opened_at`, `order_ref`, `package_number`, `resolution_note`, `shipment_no`, `status`, `status_at`, `tracking_no`. Any other field is rejected by name. Requires `mcp.write`.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `delivery_claim_no`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{},"claim_type":{},"claimed_amount":{},"closed_at":{},"currency":{},"description":{},"external_id":{},"opened_at":{},"order_ref":{},"package_number":{},"resolution_note":{},"shipment_no":{},"status":{},"status_at":{},"tracking_no":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Invalid body, or a field that is not editable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/carrier-cases":{"get":{"operationId":"listCarrierCases","summary":"List carrier cases","description":"A case opened with a carrier, and the correspondence on it.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text over `carrier_case_no`, `case_number`, `package_number`, `subject`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["carrier","carrier_last_update","carrier_status","hubspot_updated_at","subject","updated_at"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier`."},{"name":"carrier_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_from`."},{"name":"carrier_status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_status`."},{"name":"carrier_status_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_status_from`."},{"name":"carrier_status_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_status_to`."},{"name":"carrier_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `carrier_to`."},{"name":"case_number","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `case_number`."},{"name":"case_number_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `case_number_from`."},{"name":"case_number_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `case_number_to`."},{"name":"package_number","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number`."},{"name":"package_number_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number_from`."},{"name":"package_number_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `package_number_to`."},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `source`."},{"name":"source_from","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `source_from`."},{"name":"source_to","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on `source_to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string"},"company_no":{"type":"integer"},"count":{"type":"integer","description":"Rows in this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"total":{"type":["integer","null"],"description":"Absent on the fast path — read `has_more` instead."},"carrier_cases":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The carrier cases in this page. The key is `carrier_cases` — the router names the array after the mounted segment, not after the public resource."}},"required":["count","limit","offset","carrier_cases"]}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/carrier-cases/{id}":{"get":{"operationId":"getCarrierCase","summary":"Get one of carrier cases","description":"A case opened with a carrier, and the correspondence on it.","tags":["delivery"],"security":[{"apiKey":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The row's `carrier_case_no`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"No key, or the key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or no such row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Honour `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The platform could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}