{"openapi":"3.1.0","info":{"title":"RunMyHub API","description":"The RunMyHub REST API: what the RunMyHub app can do, for your own tools and integrations. The conventions below hold on every endpoint; read them once before you call one.\n\n## Authentication and hosts\n\nAuthenticate with your workspace's API key in the `x-api-key` header. Create one in RunMyHub under Settings \u2192 API keys.\n\nCall the host of the region your workspace lives in: `https://api.eu.runmyhub.com` (EU) or `https://api.ch.runmyhub.com` (Switzerland).\n\n## Money\n\nAmounts are whole numbers in the minor unit of the workspace's currency (cents, Rappen), never decimals: `350` is 3.50 and `1000` is 10.00. Where a record names a `currency`, it is an ISO 4217 code such as `CHF`, and the record's amounts are in that currency.\n\n## Percentages\n\nMost rates are basis points, in fields whose name ends in `_bps`: `810` is 8.1 %, `1000` is 10 %, `10000` is 100 %. A field named `discount` on an order line, and a field whose name ends in `pct`, is a plain percent instead: `10` is 10 % off.\n\n## Text in several languages\n\nA name or description is an object of language code to text: `{\"de\": \"B\u00fcrli\", \"fr\": \"Petit pain\", \"en\": \"Bread roll\"}`. Keys are language codes, usually two letters (`de`, `fr`, `it`, `en`); the languages the workspace has switched on are the ones its screens and shops show. Send at least the workspace's default language. A reader that asks for a language the record lacks gets the workspace's default language, then `en`, then the first text present.\n\n## Dates and times\n\nA date is a calendar day on the shop's calendar, `YYYY-MM-DD`: `\"order_date\": \"2026-10-22\"`. A timestamp is ISO 8601 with its UTC offset, and a receipt's time is the shop's local time with that offset: `\"occurred_at\": \"2026-10-22T16:41:16+02:00\"`.\n\nWhether `to` is inclusive depends on what it bounds:\n\n- Receipts and the financial report filter on the receipt timestamp, compared as written: `from` inclusive, `to` exclusive. `?from=2026-10-01&to=2026-10-02` is the whole of 1 October.\n- Daily closings filter on the business day: `from` and `to` are both inclusive days. `?from=2026-10-01&to=2026-10-02` is two days.\n- The labour feed takes `from` and `to` as inclusive days, at most 31 at a time.\n\n## Weekdays\n\nTwo numberings exist, per field, so read the field's description:\n\n- Promotions `days` and order types `weekdays` count from Monday as `0` to Sunday as `6`: `\"days\": [0, 1, 2, 3, 4]` is Monday to Friday.\n- Categories `available_days` and the `weekdays` of an `online_time_windows` entry count ISO weekdays, Monday `1` to Sunday `7`: `\"available_days\": [1, 2, 3, 4, 5]` is Monday to Friday.\n\nFor promotions, categories and time windows an empty list means every day.\n\n## Paging\n\nA list takes `limit` (1 to 500, default 100) and `cursor`, and answers `data`, `total` (how many records match across all pages; `null` where counting them would cost too much), `has_more` and `next_cursor`. Pass `next_cursor` back as `cursor` until `has_more` is false: `GET /v1/products?limit=200&cursor=\u2026`. The cursor is opaque, and a page never repeats a record while records are added.\n\nProducts, receipts and categories also take `offset` with `limit`, for a sorted and filtered window: search and sort, and for receipts the `from`/`to` window and `pos_id`. That answer carries `total`, and the next window starts at `offset + limit`. Use cursor paging for an integration: it is the same on every list and stable while records change. Use the offset mode only where you need its filters, such as the receipts of one day.\n\nCursor pages follow the record id, not the time a record was added, so a record added later can sort before a cursor you already passed. Walk the cursor to read a whole list; to pick up new receipts, poll by booking time in the offset mode (`GET /v1/transactions?offset=0&from=\u2026`) or subscribe a webhook to `transactions.created`.\n\n## Rate limit, permissions, idempotency\n\n- Each key may make 6,000 requests a minute. Past that, the answer is `429` with the code `rate_limited` and a `Retry-After` header that says how many seconds to wait.\n- A key holds permissions such as `catalog:read`, `catalog:write`, `customers:read`, `deliveries:write`, `transactions:read` or `webhooks:manage`. An operation that needs one the key does not hold answers `403` with the code `forbidden`, and the message names the permission.\n- A write that takes an `Idempotency-Key` header (creates, the catalog import, the order writes) can be sent again safely after a timeout: the same key with the same request answers the first result again and changes nothing; the same key with a different request is refused with `409` and the code `idempotency_key_reuse`. A key is remembered for 24 hours.\n\n## Errors\n\nEvery error, whatever the status, answers one shape: `{\"error\": {\"code\": \"not_found\", \"message\": \"Product not found.\"}}`. Branch on `code`, which is stable; the message is for a person and may change. Some codes add `details` with structured data. Common answers: `401` `unauthorized` (missing or invalid key), `403` `forbidden` (missing permission) or `not_in_public_api` (an operation a key cannot call), `404` `not_found`, `409` `conflict` and the idempotency codes above, `422` `validation_error`, `429` `rate_limited`, `500` `internal_error`, and `503` (busy, retry shortly). An operation that documents its own codes lists them under its responses, per status.\n\nA refused input answers `422` `validation_error` with every problem at once in `details.problems`, each with `field` (a body field as a dotted path such as `positions.2.vat_code`, a query or path parameter by its name), `reason` (a stable code to branch on, such as `missing`, `extra_forbidden`, `string_pattern_mismatch` or `unknown_reference`; the list is closed and published with the 422 response), `message`, when it is short and not a secret the refused `value`, and in `ctx` the limits the value broke (`max_length`, `ge`, `le`, the `expected` values of a choice, a `pattern` and an `example` of it) for a client that words the problem in its own language. The `message` of the error repeats the first problem. Fix every problem listed, then send the request again.\n\n## Webhooks\n\nWebhooks (`/v1/webhooks`) deliver change events to your endpoint as a signed JSON POST: `X-POS-Signature` carries an HMAC-SHA256 of the exact body, keyed with the webhook's secret, as `sha256=<hex>`, and `X-POS-Event` names the event. Verify the signature before you act on a delivery. The **webhooks** section of this reference lists the events, shows the payload and a signature check in Python and in Node, and says how delivery behaves.","version":"2026-06-01"},"tags":[{"name":"identity","description":"Your organisation: the regions, the shops in them and the tills of each shop. Onboarding a customer creates them in this order, then imports the catalog."},{"name":"catalog","description":"The articles and what describes them: categories and revenue groups, article groups, VAT rates, quantity discounts, price actions and storage locations, and the recipes with the raw materials they are made from. `POST /v1/imports/products` creates a whole catalog in one call."},{"name":"config","description":"What the tills sell with: price levels, modifier groups, discounts and discount groups, assortments, payment methods and order types."},{"name":"promotions","description":"Rules the till applies on its own: a percent or an amount off, buy X get Y, spend thresholds and happy hours."},{"name":"restaurant","description":"The tables of each shop."},{"name":"customers","description":"The customers, their contact persons and the customer groups."},{"name":"loyalty-cards","description":"Loyalty cards, with their balance, points and movements."},{"name":"orders","description":"Orders of business customers for a delivery day: create, change, preview and cancel them, one by one or many in one call, and print the delivery note."},{"name":"invoices","description":"Invoices made in RunMyHub."},{"name":"customer-invoices","description":"The customers' invoices from the accounting system, with whether each is open, overdue or paid."},{"name":"transactions","description":"The receipts the tills settled: sales, refunds and voids. Tills send them; an integration reads them."},{"name":"closures","description":"The end-of-day closing of each till, its Z-report: the sealed totals of a till day, its receipts and its PDF."},{"name":"reports","description":"The financial report: turnover, VAT, revenue groups and payments over a period."},{"name":"labour-feed","description":"Revenue per shop and hour, and the revenue forecast, for staff-planning systems."},{"name":"inventory","description":"Stock levels per article and shop, and the stock movements that change them."},{"name":"suppliers","description":"The suppliers the business buys from."},{"name":"webhooks","description":"A webhook posts a change in your workspace to a URL of yours as it happens. Register one with `POST /v1/webhooks` (the `webhooks:manage` permission), name the events it receives, and verify every delivery with its `secret`: each one carries the `X-POS-Event` and `X-POS-Signature` headers.\n\n**Events.** A record of one of these collections emits `{collection}.created`, `{collection}.updated` or `{collection}.deleted` when it is created, changed or deleted, whoever changed it (the app, a till, an import that writes record by record, or your own call): `products`, `categories`, `article_groups`, `taxes`, `price_levels`, `modifier_groups`, `discounts`, `discount_groups`, `quantity_discounts`, `price_actions`, `promotions`, `assortments`, `recipes`, `raw_materials`, `customers`, `customer_groups`, `loyalty_cards`, `transactions`, `closures`, `orders`, `invoices`, `customer_invoices`, `regions`, `shops`, `pos`, `payment_methods`, `order_types`, `tables`, `inventory`, `stock_movements`, `suppliers`, `storage_locations`, `webhooks`. Subscribe to exact names (`products.updated`, `orders.created`, `transactions.created`), or to `*` for every event. A webhook with an empty `events` list receives nothing. Four workflow events come on top:\n\n- `closures.posted`: A day's closing was posted to the books. `data` is the closure record.\n- `invoices.issued`: An invoice was issued, or re-issued after a change. `data` is the invoice record.\n- `invoices.paid`: An invoice was marked as paid. `data` is the invoice record.\n- `invoices.voided`: An invoice was voided (deleted with a reason). It is sent after the payments entered against it by hand were reversed. `data` is the record, `status` `void`. A self-billing statement, which settles deliveries the customer bills itself by credit note, is voided the same way: its record carries `document_kind` `self_billing_statement`, where an invoice's carries none (its `GET` answers `invoice`).\n\nDeleting a customer or an order archives it: the event is `customers.updated` or `orders.updated` with `\"archived\": true`, and no `deleted` event follows. One call can change records of several collections, and each sends its own event: a new region also creates its VAT rates (`taxes.created`), a sale also moves stock (`inventory`, `stock_movements`). `POST /v1/imports/products` sends one `products.created` per product.\n\n**Receipts.** Every receipt a till books sends one `transactions.created`, the event to build a per-receipt integration on. `data` is the receipt: its number on that till (`seq`), the till (`pos_id`), the booking time in the shop's local time with its offset (`occurred_at`), its kind (`type`) and its lines, each with the article (`product_id`), the article number as sold (`sku`, when the article has one) and the quantity (`qty`). A refund or a void is a receipt of its own and sends its own `transactions.created`, with `type` `refund` or `void` and `references` holding the `client_uuid` of the receipt it reverses. A sale a till sends twice is stored once and sends its event once.\n\nA `*` subscription also receives events of collections outside this list and the platform's other workflow events, such as its own bookkeeping; their names and payloads are not part of this contract and may change, so subscribe by exact name to receive only what you build on. Internal families (support tickets, leave requests, employee documents, team chats, thank-you cards, a person's own preferences) are never delivered, `*` included. Some changes the platform writes in bulk send no per-record events, such as a sync from a connected system or a background recalculation; a receiver that must hold every record reads the records again from time to time.\n\n**Payload.** One POST per event and webhook, `Content-Type: application/json`. The body is canonical JSON (keys sorted, no spaces, non-ASCII characters escaped) of `{\"type\": \"<event>\", \"data\": {\u2026}}`. For `created` and `updated`, `data` is the whole stored record, the shape its `GET` operation answers, with a few more stored fields; for `deleted`, `data` is `{\"_id\": \"\u2026\"}` and nothing else. Every record carries `version`, which grows by one with each change. Credentials stored in a record are replaced by `\"[redacted]\"` before signing: a till's device credentials, a payment provider's key, an integration's token, an employee's login, another webhook's `secret`. An empty value stays empty, so a receiver still sees that a credential is set and that it changed.\n\nA `products.updated` delivery, indented here for reading:\n\n```json\n{\n  \"data\": {\n    \"_id\": \"prd_7f3a9c1e2b4d\",\n    \"barcodes\": [\n      {\n        \"code\": \"7610000000011\",\n        \"primary\": true,\n        \"type\": \"EAN13\"\n      }\n    ],\n    \"name\": {\n      \"de\": \"Gipfeli\",\n      \"en\": \"Croissant\"\n    },\n    \"pricing\": {\n      \"amount\": 120,\n      \"quantity_precision\": 0,\n      \"type\": \"fixed\",\n      \"unit\": \"each\"\n    },\n    \"status\": \"active\",\n    \"tax_ids\": [\n      \"tax_ch_reduced\"\n    ],\n    \"type\": \"good\",\n    \"updated_at\": \"2026-10-22T09:14:03.118000+00:00\",\n    \"version\": 4,\n    \"workspace_id\": \"ws_4b1c0d9e7a22\"\n  },\n  \"type\": \"products.updated\"\n}\n```\n\n**Headers.** `X-POS-Event` carries the event name, the same value as `type` in the body. `X-POS-Signature` carries `sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify over the bytes exactly as received, before parsing, and compare in constant time; a body your framework has parsed and re-serialised will not match. Reject a post that fails the check: anyone who knows the URL can post to it.\n\n```python\nimport hashlib\nimport hmac\n\n\ndef verify(secret: str, raw_body: bytes,\n           signature_header: str) -> bool:\n    \"\"\"True when the delivery was signed with\n    `secret`. `raw_body` is the request body\n    exactly as received, before any parsing.\"\"\"\n    digest = hmac.new(secret.encode(\"utf-8\"),\n                      raw_body, hashlib.sha256)\n    expected = \"sha256=\" + digest.hexdigest()\n    return hmac.compare_digest(\n        expected, signature_header or \"\")\n```\n\n```javascript\nconst crypto = require(\"node:crypto\");\n\n// rawBody: a Buffer with the request body\n// exactly as received, before any parsing.\nfunction verify(secret, rawBody, signatureHeader) {\n  const expected = \"sha256=\" + crypto\n    .createHmac(\"sha256\", secret)\n    .update(rawBody)\n    .digest(\"hex\");\n  const a = Buffer.from(expected);\n  const b = Buffer.from(signatureHeader || \"\");\n  return a.length === b.length\n    && crypto.timingSafeEqual(a, b);\n}\n```\n\n**Delivery.** One attempt per event and webhook, with a 5 second timeout for the whole request, from a pool of senders. Answer any 2xx within that time and do the work afterwards; the answer body is ignored. A delivery that fails, times out or is answered with another status is not sent again, and the webhook stays active. Deliveries are not ordered: two changes to one record can arrive in either order, and `version` tells the newer apart; a `deleted` event carries no version, so treat the record as gone. There is no delivery id and no timestamp in the payload: a receiver that must not miss a change reads the record again with its `GET` operation, which also makes an occasional duplicate harmless.\n\n**Secret.** You choose it on `POST /v1/webhooks`, at least 16 characters, and change it with `PATCH`. Every read of the webhook (`GET /v1/webhooks`, `GET /v1/webhooks/{rid}`) returns it as stored, so the `webhooks:manage` permission stays with the people who may know it. A delivery to another webhook of yours on `webhooks.created` or `webhooks.updated` shows it as `\"[redacted]\"`."},{"name":"compute","description":"Jobs a call queued with 202: ask for one until it has ended, then read its result."},{"name":"health","description":"Whether the API host takes requests. Needs no API key."}],"webhooks":{"{collection}.created":{"post":{"summary":"A record was created","description":"Delivered when a record of a subscribed collection is created (`products`, `categories`, `article_groups`, `taxes`, `price_levels`, `modifier_groups`, `discounts`, `discount_groups`, `quantity_discounts`, `price_actions`, `promotions`, `assortments`, `recipes`, `raw_materials`, `customers`, `customer_groups`, `loyalty_cards`, `transactions`, `closures`, `orders`, `invoices`, `customer_invoices`, `regions`, `shops`, `pos`, `payment_methods`, `order_types`, `tables`, `inventory`, `stock_movements`, `suppliers`, `storage_locations`, `webhooks`). Verify `X-POS-Signature` before you read the body.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"products.created","data":{"_id":"prd_7f3a9c1e2b4d","workspace_id":"ws_4b1c0d9e7a22","type":"good","name":{"de":"Gipfeli","en":"Croissant"},"status":"active","tax_ids":["tax_ch_reduced"],"pricing":{"type":"fixed","amount":120,"unit":"each","quantity_precision":0},"barcodes":[{"code":"7610000000011","type":"EAN13","primary":true}],"version":1,"updated_at":"2026-10-22T09:14:03.118000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"{collection}.updated":{"post":{"summary":"A record was changed","description":"Delivered when a record of a subscribed collection is changed, whichever fields changed. Compare `version` with the one you hold: deliveries are not ordered.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"products.updated","data":{"_id":"prd_7f3a9c1e2b4d","workspace_id":"ws_4b1c0d9e7a22","type":"good","name":{"de":"Gipfeli","en":"Croissant"},"status":"active","tax_ids":["tax_ch_reduced"],"pricing":{"type":"fixed","amount":120,"unit":"each","quantity_precision":0},"barcodes":[{"code":"7610000000011","type":"EAN13","primary":true}],"version":4,"updated_at":"2026-10-22T09:14:03.118000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"{collection}.deleted":{"post":{"summary":"A record was deleted","description":"Delivered when a record of a subscribed collection is deleted. `data` carries the id only. Customers and orders are archived instead: their delete sends `.updated` with `\"archived\": true`.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The deleted record's id, `{\"_id\": \"\u2026\"}`, and nothing else."}}},"example":{"type":"products.deleted","data":{"_id":"prd_7f3a9c1e2b4d"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"closures.posted":{"post":{"summary":"A day's closing was posted to the books","description":"A day's closing was posted to the books. `data` is the closure record. Subscribe to `closures.posted` by name, or with `*`. The record's own change events (`closures.updated`) arrive as well.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"closures.posted","data":{"_id":"clo_2c9e0a7b5d13","workspace_id":"ws_4b1c0d9e7a22","pos_id":"pos_1f0e9d8c7b6a","business_date":"2026-10-21","status":"posted","version":3,"updated_at":"2026-10-22T05:30:11.402000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"invoices.issued":{"post":{"summary":"An invoice was issued, or re-issued after a change","description":"An invoice was issued, or re-issued after a change. `data` is the invoice record. Subscribe to `invoices.issued` by name, or with `*`. The record's own change events (`invoices.updated`) arrive as well.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"invoices.issued","data":{"_id":"inv_8d2e1f0a9b3c","workspace_id":"ws_4b1c0d9e7a22","number":"INV-2026-000417","customer_id":"cus_5a4b3c2d1e0f","status":"issued","currency":"EUR","total":24850,"version":2,"updated_at":"2026-10-22T07:02:45.910000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"invoices.paid":{"post":{"summary":"An invoice was marked as paid","description":"An invoice was marked as paid. `data` is the invoice record. Subscribe to `invoices.paid` by name, or with `*`. The record's own change events (`invoices.updated`) arrive as well.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"invoices.paid","data":{"_id":"inv_8d2e1f0a9b3c","workspace_id":"ws_4b1c0d9e7a22","number":"INV-2026-000417","customer_id":"cus_5a4b3c2d1e0f","status":"paid","currency":"EUR","total":24850,"version":3,"updated_at":"2026-10-29T11:48:02.077000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}},"invoices.voided":{"post":{"summary":"An invoice was voided (deleted with a reason)","description":"An invoice was voided (deleted with a reason). It is sent after the payments entered against it by hand were reversed. `data` is the record, `status` `void`. A self-billing statement, which settles deliveries the customer bills itself by credit note, is voided the same way: its record carries `document_kind` `self_billing_statement`, where an invoice's carries none (its `GET` answers `invoice`). Subscribe to `invoices.voided` by name, or with `*`. The record's own change events (`invoices.updated`) arrive as well.","security":[],"parameters":[{"name":"X-POS-Event","in":"header","required":true,"schema":{"type":"string"},"description":"The event name, the same value as `type` in the body."},{"name":"X-POS-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"description":"`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's `secret`. Verify it over the bytes as received, before parsing, in constant time."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","description":"The event name, the same value as the `X-POS-Event` header."},"data":{"type":"object","additionalProperties":true,"description":"The whole stored record, the shape its `GET` operation answers, with every stored credential replaced by `\"[redacted]\"`. `version` grows by one with each change."}}},"example":{"type":"invoices.voided","data":{"_id":"inv_3b7c2d9e0f41","workspace_id":"ws_4b1c0d9e7a22","number":"AB-2026-00012","document_kind":"self_billing_statement","customer_id":"cus_9e8d7c6b5a40","status":"void","void_reason":"Wrong delivery period","currency":"EUR","total":118215,"version":4,"voided_at":"2026-11-04T08:15:27.512000+00:00","updated_at":"2026-11-04T08:15:27.519000+00:00"}}}}},"responses":{"2XX":{"description":"Received. Any 2xx answer within 5 seconds counts as delivered; the answer body is ignored."},"default":{"description":"Not delivered. The event is not sent again; read the record with its `GET` operation."}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Check the API host","description":"Whether this API host takes requests; it needs no API key. It answers 200 with `status: ok`, or 503 with `status: unfit` while the host is being replaced: retry after a few seconds, and the next request reaches a healthy host.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}}}}},"503":{"description":"This host is unfit and is being replaced. The body is the probe's own answer, not the error envelope: `{\"status\": \"unfit\", \"reason\": \"memory_pressure\", \u2026}`. Retry: the next request reaches a healthy host."}},"security":[]}},"/v1/assortments":{"get":{"tags":["config"],"summary":"List assortments","description":"The assortments of the workspace, one page per call (`limit`, `cursor`). An assortment is the set of articles one shop or till offers: `scope` names the shop (`shop_id`) or the till (`pos_id`), `include` and `exclude` pick articles by category, `overrides` adds or removes single articles, and `valid_from` and `valid_to` bound when it applies.","operationId":"list_assortments_v1_assortments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Assortments V1 Assortments Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["config"],"summary":"Create an assortment","description":"Create an assortment. The body is checked whole before anything is written: an unknown field, a day that is not `YYYY-MM-DD` and a product group, article, shop or till the workspace does not have are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second assortment.","operationId":"create_assortment_v1_assortments_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssortmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Assortment V1 Assortments Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/assortments/{assortment_id}":{"get":{"tags":["config"],"summary":"Get one assortment","description":"One assortment by its id: its scope, the articles it includes and excludes, and when it applies. 404 when the workspace has no assortment with this id.","operationId":"get_assortment_v1_assortments__assortment_id__get","parameters":[{"name":"assortment_id","in":"path","required":true,"schema":{"type":"string","title":"Assortment Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Assortment V1 Assortments  Assortment Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["config"],"summary":"Update an assortment","description":"Change one assortment: the body holds only the fields that change, and `scope`, `include`, `exclude` and `overrides` merge key by key into the stored ones (a list inside them is replaced whole). None of the four may be null; the checks of the create apply to the ids the body changes. 404 when the workspace has no assortment with this id.","operationId":"update_assortment_v1_assortments__assortment_id__patch","parameters":[{"name":"assortment_id","in":"path","required":true,"schema":{"type":"string","title":"Assortment Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssortmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Assortment V1 Assortments  Assortment Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["config"],"summary":"Delete an assortment","description":"Delete one assortment. 404 when the workspace has no assortment with this id.","operationId":"delete_assortment_v1_assortments__assortment_id__delete","parameters":[{"name":"assortment_id","in":"path","required":true,"schema":{"type":"string","title":"Assortment Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/categories":{"get":{"tags":["catalog"],"summary":"List categories","description":"The categories of the workspace. A sales category sorts articles on the till and in the online shop (`kind=sales`); a revenue group groups turnover in reports and the accounting export (`kind=reporting`). Categories nest through `parent_id`.\n\nWith `offset`, the answer is a window of `limit` short rows from that offset, with `total` and the count per kind in `counts`. It is narrowed by free text (`q`), `kind`, `scope` (`root` or `child`) and `source` (`imported` or `manual`), and ordered by `sort` and `desc`.\n\nWithout `offset`, the answer is a cursor page (`limit`, `cursor`) of whole categories in the order they were stored, and the filters do not apply.","operationId":"list_categories_v1_categories_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(sales|reporting)$"},{"type":"null"}],"title":"Kind"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(root|child)$"},{"type":"null"}],"title":"Scope"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(imported|manual)$"},{"type":"null"}],"title":"Source"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(nr|name|kind|parent|children|ordinal|discounts|account)$","default":"nr","title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Categories V1 Categories Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create a category","description":"Create a category: `name`, optionally `parent_id` and `kind`. The body is checked whole before anything is written: an unknown field, a weekday outside 1 to 7, a colour that is not `#RRGGBB`, a parent the workspace does not have and a loyalty-card discount outside 0 to 10000 basis points are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second category. 409 `source_owned` while the workspace's catalog is managed in its previous system, whose import keeps it here.","operationId":"create_category_v1_categories_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Category V1 Categories Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/categories/{category_id}":{"get":{"tags":["catalog"],"summary":"Get one category","description":"One category by its id. 404 when the workspace has no category with this id.","operationId":"get_category_v1_categories__category_id__get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","title":"Category Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Category V1 Categories  Category Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a category","description":"Change one category: the body holds only the fields that change, and `revenue_accounts` and `online_visibility` merge key by key into the stored ones. `name`, `kind` and `ordinal` may not be null, and a new `parent_id` may not lead back to the category itself (`cycle`); the checks of the create apply to what the body changes. 404 when the workspace has no category with this id. 409 `source_owned` while the workspace's catalog is managed in its previous system, whose import keeps it here.","operationId":"update_category_v1_categories__category_id__patch","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","title":"Category Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Category V1 Categories  Category Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a category","description":"Delete one category. 404 when the workspace has no category with this id. 409 `source_owned` while the workspace's catalog is managed in its previous system, whose import keeps it here.","operationId":"delete_category_v1_categories__category_id__delete","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","title":"Category Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/modifier-groups":{"get":{"tags":["config"],"summary":"List modifier groups","description":"The modifier groups of the workspace. A modifier group is a set of options picked for an article when it is sold, such as a size or extras, with the fewest and most picks allowed (`min_select`, `max_select`). An article names its groups in `modifier_group_ids`. `q` searches `name`. `required` takes `true` or `false`. `sort` orders by `name`, `min_select`, `max_select`, `required`, and `desc=true` reverses the order. One page per call (`limit`, `cursor`).","operationId":"list__v1_modifier_groups_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring search across `name`, applied over the whole workspace set."},{"name":"required","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return only records whose `required` flag has this value."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","min_select","max_select","required"]},"description":"Order the whole set by this stored field before paging."},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean"},"description":"Reverse the `sort` order."}],"responses":{"200":{"description":"One page of modifier groups.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Modifier Groups Get","$ref":"#/components/schemas/ModifierGroupPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["config"],"summary":"Create a modifier group","description":"Create a modifier group. A modifier group is a set of options picked for an article when it is sold, such as a size or extras, with the fewest and most picks allowed (`min_select`, `max_select`). An article names its groups in `modifier_group_ids`. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second modifier group.","operationId":"create__v1_modifier_groups_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifierGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Modifier Groups Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/modifier-groups/{rid}":{"get":{"tags":["config"],"summary":"Get one modifier group","description":"One modifier group by its id (`mod_\u2026`). 404 when the workspace has no modifier group with this id.","operationId":"get__v1_modifier_groups__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The modifier group.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Modifier Groups  Rid  Get","$ref":"#/components/schemas/ModifierGroupRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["config"],"summary":"Update a modifier group","description":"Change one modifier group: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no modifier group with this id.","operationId":"update__v1_modifier_groups__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifierGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Modifier Groups  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["config"],"summary":"Delete a modifier group","description":"Delete one modifier group. 404 when the workspace has no modifier group with this id.","operationId":"delete__v1_modifier_groups__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/payment-methods":{"get":{"tags":["config"],"summary":"List payment methods","description":"The payment methods of the workspace. A payment method is a way the tills take payment, such as cash, card or a voucher (`kind`). `pos_ids` names the tills that offer it. `kind` keeps the records with that value. `q` searches `name`, `code`, `provider`. `pos_ids=set` keeps the records that have `pos_ids`, `pos_ids=unset` those without. `active` takes `true` or `false`. `summary=true` returns short rows (`_id`, `name`, `kind`, `provider`, `code`, `pos_ids`, `active`, `ordinal`, `requires_terminal`), and `fields=a,b` keeps only the named ones of those. `sort` orders by `ordinal`, `name`, `kind`, `provider`, `code`, `active`, and `desc=true` reverses the order. One page per call (`limit`, `cursor`).","operationId":"list__v1_payment_methods_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring search across `name`, `code`, `provider`, applied over the whole workspace set."},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"Return only records whose `kind` equals this value."},{"name":"pos_ids","in":"query","required":false,"schema":{"type":"string","enum":["set","unset"]},"description":"Return only records whose `pos_ids` is filled (`set`) or empty/absent (`unset`)."},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return only records whose `active` flag has this value."},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return SLIM rows \u2014 `_id` plus `name`, `kind`, `provider`, `code`, `pos_ids`, `active`, `ordinal`, `requires_terminal` \u2014 for a record grid whose editor fetches the full record by id."},{"name":"fields","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated subset of the slim-row fields above \u2014 `_id` plus exactly these. For a grid that draws fewer columns than another consumer of the same window."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["ordinal","name","kind","provider","code","active"]},"description":"Order the whole set by this stored field before paging."},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean"},"description":"Reverse the `sort` order."}],"responses":{"200":{"description":"One page of payment methods.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Payment Methods Get","$ref":"#/components/schemas/PaymentMethodPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/payment-methods/{rid}":{"get":{"tags":["config"],"summary":"Get one payment method","description":"One payment method by its id (`pm_\u2026`). 404 when the workspace has no payment method with this id.","operationId":"get__v1_payment_methods__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The payment method.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Payment Methods  Rid  Get","$ref":"#/components/schemas/PaymentMethodRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/order-types":{"get":{"tags":["config"],"summary":"List order types","description":"The order types of the workspace. An order type is a kind of order a till takes for a later day, such as an order, a preorder, a return or a sale on a customer account, with the days it may be placed for. One page per call (`limit`, `cursor`).","operationId":"list__v1_order_types_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of order types.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Order Types Get","$ref":"#/components/schemas/OrderTypePage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/order-types/{rid}":{"get":{"tags":["config"],"summary":"Get one order type","description":"One order type by its id (`oty_\u2026`). 404 when the workspace has no order type with this id.","operationId":"get__v1_order_types__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The order type.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Order Types  Rid  Get","$ref":"#/components/schemas/OrderTypeRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/price-levels":{"get":{"tags":["config"],"summary":"List price levels","description":"The price levels of the workspace. A price level is one named step of the price list every article carries: an article holds one price per level (`price_levels` on the product), and `ordinal` is the step. One page per call (`limit`, `cursor`).","operationId":"list__v1_price_levels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of price levels.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Price Levels Get","$ref":"#/components/schemas/PriceLevelPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["config"],"summary":"Create a price level","description":"Create a price level. A price level is one named step of the price list every article carries: an article holds one price per level (`price_levels` on the product), and `ordinal` is the step. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second price level.","operationId":"create__v1_price_levels_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceLevelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Price Levels Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/price-levels/{rid}":{"get":{"tags":["config"],"summary":"Get one price level","description":"One price level by its id (`plv_\u2026`). 404 when the workspace has no price level with this id.","operationId":"get__v1_price_levels__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The price level.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Price Levels  Rid  Get","$ref":"#/components/schemas/PriceLevelRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["config"],"summary":"Update a price level","description":"Change one price level: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no price level with this id.","operationId":"update__v1_price_levels__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceLevelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Price Levels  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["config"],"summary":"Delete a price level","description":"Delete one price level. 404 when the workspace has no price level with this id.","operationId":"delete__v1_price_levels__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `in_use`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"in_use":{"summary":"in_use","value":{"error":{"code":"in_use","message":"Other records still use this one, so it cannot be deleted. The message says what uses it, and `details` how many."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/discount-groups":{"get":{"tags":["config"],"summary":"List discount groups","description":"The discount groups of the workspace. A discount group is a numbered group a loyalty card belongs to: the card names the group by its `ordinal` (`discount_group` on the card), and an article or a revenue group sets a discount percent per group. `q` searches `name`. `active` takes `true` or `false`. `sort` orders by `name`, `ordinal`, `active`, and `desc=true` reverses the order. One page per call (`limit`, `cursor`).","operationId":"list__v1_discount_groups_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring search across `name`, applied over the whole workspace set."},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return only records whose `active` flag has this value."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","ordinal","active"]},"description":"Order the whole set by this stored field before paging."},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean"},"description":"Reverse the `sort` order."}],"responses":{"200":{"description":"One page of discount groups.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Discount Groups Get","$ref":"#/components/schemas/DiscountGroupPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["config"],"summary":"Create a discount group","description":"Create a discount group. A discount group is a numbered group a loyalty card belongs to: the card names the group by its `ordinal` (`discount_group` on the card), and an article or a revenue group sets a discount percent per group. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second discount group.","operationId":"create__v1_discount_groups_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Discount Groups Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/discount-groups/{rid}":{"get":{"tags":["config"],"summary":"Get one discount group","description":"One discount group by its id (`dgrp_\u2026`). 404 when the workspace has no discount group with this id.","operationId":"get__v1_discount_groups__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The discount group.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Discount Groups  Rid  Get","$ref":"#/components/schemas/DiscountGroupRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["config"],"summary":"Update a discount group","description":"Change one discount group: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no discount group with this id.","operationId":"update__v1_discount_groups__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Discount Groups  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["config"],"summary":"Delete a discount group","description":"Delete one discount group. 404 when the workspace has no discount group with this id.","operationId":"delete__v1_discount_groups__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/discounts":{"get":{"tags":["config"],"summary":"List discounts","description":"The discounts of the workspace. A discount is a named percent off (`value` in basis points, 1000 = 10 %) that the cashier applies on the till. One page per call (`limit`, `cursor`).","operationId":"list__v1_discounts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of discounts.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Discounts Get","$ref":"#/components/schemas/DiscountPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["config"],"summary":"Create a discount","description":"Create a discount. A discount is a named percent off (`value` in basis points, 1000 = 10 %) that the cashier applies on the till. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second discount.","operationId":"create__v1_discounts_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCreate"},"example":{"name":{"de":"Personalrabatt","en":"Staff discount"},"type":"percent","value":1000}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Discounts Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/discounts/{rid}":{"get":{"tags":["config"],"summary":"Get one discount","description":"One discount by its id (`disc_\u2026`). 404 when the workspace has no discount with this id.","operationId":"get__v1_discounts__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The discount.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Discounts  Rid  Get","$ref":"#/components/schemas/DiscountRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["config"],"summary":"Update a discount","description":"Change one discount: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no discount with this id.","operationId":"update__v1_discounts__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Discounts  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["config"],"summary":"Delete a discount","description":"Delete one discount. 404 when the workspace has no discount with this id.","operationId":"delete__v1_discounts__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customer-groups":{"get":{"tags":["customers"],"summary":"List customer groups","description":"The customer groups of the workspace, one page per call (`limit`, `cursor`). `GET /v1/customers` lists the customers of one group with `group_id`. `source_owned` is true for a group the workspace's previous system manages; such a group cannot be changed here.","operationId":"list_customer_groups_v1_customer_groups_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Customer Groups V1 Customer Groups Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["customers"],"summary":"Create a customer group","description":"Create a customer group: `name`, optionally `active`. A name another customer group already has, in any letter case, is refused with 422 `not_unique`. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second group. 409 `source_owned` while the workspace's customers are managed in its previous system.","operationId":"create_customer_groups_v1_customer_groups_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Customer Groups V1 Customer Groups Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customer-groups/{entry_id}":{"get":{"tags":["customers"],"summary":"Get one customer group","description":"One customer group by its id (`cgrp_\u2026`), with `source_owned`. 404 when the workspace has no customer group with this id.","operationId":"get_customer_groups_v1_customer_groups__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Customer Groups V1 Customer Groups  Entry Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["customers"],"summary":"Update a customer group","description":"Rename a customer group, retire it (`active: false`) or bring it back. A new name another customer group already has, in any letter case, is refused with 422 `not_unique`; a name the group keeps is not judged again. 404 when the workspace has no customer group with this id. 409 `source_owned` for a group the workspace's previous system manages.","operationId":"update_customer_groups_v1_customer_groups__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Customer Groups V1 Customer Groups  Entry Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["customers"],"summary":"Delete a customer group","description":"Delete one customer group. 409 `in_use` while customers still belong to it: `details.customers` says how many, and `active: false` retires the group instead. 409 `source_owned` for a group the workspace's previous system manages, or while the workspace's customers are managed in its previous system. 404 when the workspace has no customer group with this id.","operationId":"delete_customer_groups_v1_customer_groups__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `in_use`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"in_use":{"summary":"in_use","value":{"error":{"code":"in_use","message":"Other records still use this one, so it cannot be deleted. The message says what uses it, and `details` how many."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/imports/products":{"post":{"tags":["catalog"],"summary":"Import products","description":"Create many articles in one call, to onboard a catalog: at most 200 per call. Each item takes the fields, and passes the checks, of `POST /v1/products`. One invalid item refuses the whole batch, and nothing is written: a field problem answers 422 naming the item (`items.3.name`), an article number or barcode another item or article already has answers 409 with the item's position in `details.index`. The answer names how many articles were created and their ids, in the order sent. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second set of articles. 409 `source_owned` while the workspace's catalog is managed in its previous system, whose import keeps it here.","operationId":"import_products_v1_imports_products_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImport"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Import Products V1 Imports Products Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `conflict`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"conflict":{"summary":"conflict","value":{"error":{"code":"conflict","message":"A value that must be unique already belongs to another record, such as a customer number, an article number or a barcode. The message names it."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/regions":{"get":{"tags":["identity"],"summary":"List regions","description":"The regions of the workspace. A region groups shops, for example by country, and carries their country and currency. A region sent without them takes the company's country and that country's currency, and a region in a country the workspace has no VAT rates for yet adds that country's rates to the taxes. One page per call (`limit`, `cursor`).","operationId":"list__v1_regions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of regions.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Regions Get","$ref":"#/components/schemas/RegionPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["identity"],"summary":"Create a region","description":"Create a region. A region groups shops, for example by country, and carries their country and currency. A region sent without them takes the company's country and that country's currency, and a region in a country the workspace has no VAT rates for yet adds that country's rates to the taxes. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second region.","operationId":"create__v1_regions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Regions Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/regions/{rid}":{"get":{"tags":["identity"],"summary":"Get one region","description":"One region by its id (`reg_\u2026`). 404 when the workspace has no region with this id.","operationId":"get__v1_regions__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The region.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Regions  Rid  Get","$ref":"#/components/schemas/RegionRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/shops":{"get":{"tags":["identity"],"summary":"List shops","description":"The shops of the workspace. A shop is one branch of the business: its address, opening hours and the region it belongs to (`region_id`). One page per call (`limit`, `cursor`).","operationId":"list__v1_shops_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of shops.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Shops Get","$ref":"#/components/schemas/ShopPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["identity"],"summary":"Create a shop","description":"Create a shop. A shop is one branch of the business: its address, opening hours and the region it belongs to (`region_id`). It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second shop.","operationId":"create__v1_shops_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Shops Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `currency_is_home`, `currency_code_conflict`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"currency_is_home":{"summary":"currency_is_home","value":{"error":{"code":"currency_is_home","message":"A shop's own currency cannot also be one of its foreign currencies."}}},"currency_code_conflict":{"summary":"currency_code_conflict","value":{"error":{"code":"currency_code_conflict","message":"A shop can have only one active currency per ISO code."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/shops/{rid}":{"get":{"tags":["identity"],"summary":"Get one shop","description":"One shop by its id (`shp_\u2026`). 404 when the workspace has no shop with this id.","operationId":"get__v1_shops__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The shop.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Shops  Rid  Get","$ref":"#/components/schemas/ShopRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/pos":{"get":{"tags":["identity"],"summary":"List tills","description":"The tills of the workspace. A till is one cash register of a shop (`shop_id`). A device is paired to a till in the RunMyHub app. `shop_id` keeps the records with that value. One page per call (`limit`, `cursor`).","operationId":"list__v1_pos_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"shop_id","in":"query","required":false,"schema":{"type":"string"},"description":"Return only records whose `shop_id` matches this value."}],"responses":{"200":{"description":"One page of tills.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Pos Get","$ref":"#/components/schemas/PosPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `db_busy`.","content":{"application/json":{"examples":{"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["identity"],"summary":"Create a till","description":"Create a till. A till is one cash register of a shop (`shop_id`). A device is paired to a till in the RunMyHub app. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second till.","operationId":"create__v1_pos_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Pos Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `no_floor_configured`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"no_floor_configured":{"summary":"no_floor_configured","value":{"error":{"code":"no_floor_configured","message":"Restaurant mode as the default needs tables configured in this shop first."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `db_busy`.","content":{"application/json":{"examples":{"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/pos/{rid}":{"get":{"tags":["identity"],"summary":"Get one till","description":"One till by its id (`pos_\u2026`). 404 when the workspace has no till with this id.","operationId":"get__v1_pos__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The till.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Pos  Rid  Get","$ref":"#/components/schemas/PosRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `db_busy`.","content":{"application/json":{"examples":{"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/promotions":{"get":{"tags":["promotions"],"summary":"List promotions","description":"The promotions of the workspace. A promotion is a rule the till applies on its own when a sale meets it: a percent or an amount off, buy X get Y, a spend threshold or a happy hour, within its dates, weekdays and hours. `type` keeps the records with that value. `q` searches `name`. `active` takes `true` or `false`. `sort` orders by `name`, `type`, `active`, `valid_from`, and `desc=true` reverses the order. One page per call (`limit`, `cursor`).","operationId":"list__v1_promotions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring search across `name`, applied over the whole workspace set."},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Return only records whose `type` equals this value."},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return only records whose `active` flag has this value."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","type","active","valid_from"]},"description":"Order the whole set by this stored field before paging."},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean"},"description":"Reverse the `sort` order."}],"responses":{"200":{"description":"One page of promotions.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Promotions Get","$ref":"#/components/schemas/PromotionPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["promotions"],"summary":"Create a promotion","description":"Create a promotion. A promotion is a rule the till applies on its own when a sale meets it: a percent or an amount off, buy X get Y, a spend threshold or a happy hour, within its dates, weekdays and hours. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second promotion.","operationId":"create__v1_promotions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCreate"},"example":{"name":{"de":"Happy Hour","en":"Happy hour"},"type":"happy_hour","days":[0,1,2,3,4],"hour_from":"17:00","hour_to":"19:00","applies_to":{"scope":"categories","ids":["cat_drinks"]},"effect":{"percent_bps":2000}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Promotions Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/promotions/{rid}":{"get":{"tags":["promotions"],"summary":"Get one promotion","description":"One promotion by its id (`promo_\u2026`). 404 when the workspace has no promotion with this id.","operationId":"get__v1_promotions__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The promotion.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Promotions  Rid  Get","$ref":"#/components/schemas/PromotionRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["promotions"],"summary":"Update a promotion","description":"Change one promotion: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no promotion with this id.","operationId":"update__v1_promotions__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Promotions  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["promotions"],"summary":"Delete a promotion","description":"Delete one promotion. 404 when the workspace has no promotion with this id.","operationId":"delete__v1_promotions__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/closures":{"get":{"tags":["closures"],"summary":"List closures","description":"The closures of the workspace, newest first. A closure is the end-of-day closing of one till (its Z-report): the sealed totals of that till day.\n\nNarrow by business day (`from`, `to`, both `YYYY-MM-DD` and inclusive), by till (`pos_id`, repeatable), by origin (`source`: `live` for closures made on RunMyHub tills, `cashassist` for closures imported from the previous till system) or by free text (`q`: a closure number or a till name), and to the closures that carry a note (`flagged`). One page per call (`limit`, `cursor`).\n\nWithout `q`, `total` is null: the page comes without a count. With `q`, `total` counts every closure that matches.","operationId":"list_closures_v1_closures_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"First business day to include, `YYYY-MM-DD`, inclusive.","examples":["2026-10-01"],"title":"From"},"description":"First business day to include, `YYYY-MM-DD`, inclusive."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Last business day to include, `YYYY-MM-DD`, inclusive.","examples":["2026-10-31"],"title":"To"},"description":"Last business day to include, `YYYY-MM-DD`, inclusive."},{"name":"pos_id","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Only closings of these tills (`pos_\u2026`); repeat the parameter for several.","title":"Pos Id"},"description":"Only closings of these tills (`pos_\u2026`); repeat the parameter for several."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where the closing was made: `live` = on a runmyhub till, `cashassist` = imported from the CashAssist till system. Omit for both.","title":"Source"},"description":"Where the closing was made: `live` = on a runmyhub till, `cashassist` = imported from the CashAssist till system. Omit for both."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Part of a closing number (a leading `Z` is ignored) or of a till's name.","title":"Q"},"description":"Part of a closing number (a leading `Z` is ignored) or of a till's name."},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`grid` returns only the fields a list needs: id, till, closing number, receipt count, net total, tips, when it was closed, source, kind, currency, the cash variance and the note. Omit for the whole closing.","title":"Fields"},"description":"`grid` returns only the fields a list needs: id, till, closing number, receipt count, net total, tips, when it was closed, source, kind, currency, the cash variance and the note. Omit for the whole closing."},{"name":"flagged","in":"query","required":false,"schema":{"type":"boolean","description":"`true`: only closures that carry a `validation` note, those a till sent with a detail the cloud could not read, or that the cloud sealed although the till's closing settings ask for a cash count, a SafeBag number or a card terminal close the closure lacks.","default":false,"title":"Flagged"},"description":"`true`: only closures that carry a `validation` note, those a till sent with a detail the cloud could not read, or that the cloud sealed although the till's closing settings ask for a cash count, a SafeBag number or a card terminal close the closure lacks."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Closures V1 Closures Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/closures/{closure_id}":{"get":{"tags":["closures"],"summary":"Get one closure","description":"One closure as it was sealed: the totals, the VAT and payment breakdown and the cash count of that till day, with the receipts it sealed in `receipts`. Pass `receipts=false` to leave the receipts out and page them through `GET /v1/closures/{closure_id}/receipts` instead. 404 when the workspace has no closure with this id.","operationId":"get_closure_v1_closures__closure_id__get","parameters":[{"name":"closure_id","in":"path","required":true,"schema":{"type":"string","title":"Closure Id"}},{"name":"receipts","in":"query","required":false,"schema":{"type":"boolean","description":"`false` leaves the sealed receipts out (`receipts: []`) for a reader that pages them through `/{closure_id}/receipts`.","default":true,"title":"Receipts"},"description":"`false` leaves the sealed receipts out (`receipts: []`) for a reader that pages them through `/{closure_id}/receipts`."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Closure V1 Closures  Closure Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `archive_busy`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/closures/{closure_id}/receipts":{"get":{"tags":["closures"],"summary":"List the receipts of one closure","description":"The receipts one closure sealed, ordered by receipt number, one page per call (`limit`, `cursor`). Each row is a short form of the receipt (number, time, type, cashier, total, currency, till); `GET /v1/transactions/{tx_id}` returns the whole receipt. `q` keeps the receipts whose number contains it. `receipts_unavailable` counts the receipts of this closure that are not available to read. 404 when the workspace has no closure with this id.","operationId":"list_closure_receipts_v1_closures__closure_id__receipts_get","parameters":[{"name":"closure_id","in":"path","required":true,"schema":{"type":"string","title":"Closure Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Receipt number \u2014 matches as a substring of `seq`.","title":"Q"},"description":"Receipt number \u2014 matches as a substring of `seq`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Closure Receipts V1 Closures  Closure Id  Receipts Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `archive_busy`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/closures/{closure_id}/z-report.pdf":{"get":{"tags":["closures"],"summary":"Get the Z-report PDF of one closure","description":"The closure as the receipt-width (80 mm) PDF a till prints at the end of the day, rendered from the sealed closure; nothing is recomputed. The answer is `application/pdf`. 404 when the workspace has no closure with this id.","operationId":"z_report_pdf_v1_closures__closure_id__z_report_pdf_get","parameters":[{"name":"closure_id","in":"path","required":true,"schema":{"type":"string","title":"Closure Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `archive_busy`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/reports/financial":{"get":{"tags":["reports"],"summary":"Get the financial report","description":"The sales figures of a period in one answer: the summary (turnover, receipts, refunds, discounts), VAT per rate, turnover per revenue group, the payments taken, the top items, and the turnover per hour and per day.\n\n`from` and `to` bound the receipt time (ISO 8601; `from` inclusive, `to` exclusive; a time that does not exist answers 422 `validation_error` naming it); `pos_id` (repeatable) limits the report to those tills. A workspace that sells in more than one currency gets the report in one of them: `currencies_available` names the others and `currency` (repeatable) chooses.\n\nFor a long period send `Prefer: respond-async`: the call answers 202 with the job to poll at `GET /v1/compute/jobs/{task_id}`, whose `result` is this report.","operationId":"financial_v1_reports_financial_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?)?$","format":"date-time"},{"type":"null"}],"description":"The first receipt time, inclusive: a day or an ISO 8601 moment.","title":"From"},"description":"The first receipt time, inclusive: a day or an ISO 8601 moment."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?)?$","format":"date-time"},{"type":"null"}],"description":"The receipt time the report stops before, exclusive: a day or an ISO 8601 moment.","title":"To"},"description":"The receipt time the report stops before, exclusive: a day or an ISO 8601 moment."},{"name":"pos_id","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$"},"maxItems":500,"description":"Only these tills (repeatable).","title":"Pos Id"},"description":"Only these tills (repeatable)."},{"name":"currency","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","pattern":"^\\s*[A-Za-z]{3}\\s*$"},"maxItems":10,"description":"The currency to report in (repeatable), an ISO 4217 code.","title":"Currency"},"description":"The currency to report in (repeatable), an ISO 4217 code."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Financial V1 Reports Financial Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `type_disabled`.","content":{"application/json":{"examples":{"type_disabled":{"summary":"type_disabled","value":{"error":{"code":"type_disabled","message":"This kind of background job is switched off at the moment."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `compute_busy`, `archive_busy`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"compute_busy":{"summary":"compute_busy","value":{"error":{"code":"compute_busy","message":"Too many reports are running for this workspace. Retry after the seconds `Retry-After` names."}}},"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/tables":{"get":{"tags":["restaurant"],"summary":"List tables","description":"The tables of the workspace. A table is a restaurant table of a shop (`shop_id`), in one of its rooms (`room_id`), with its seats. `shop_id` keeps the records with that value. One page per call (`limit`, `cursor`).","operationId":"list__v1_tables_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"shop_id","in":"query","required":false,"schema":{"type":"string"},"description":"Return only records whose `shop_id` matches this value."}],"responses":{"200":{"description":"One page of tables.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Tables Get","$ref":"#/components/schemas/TablePage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/tables/{rid}":{"get":{"tags":["restaurant"],"summary":"Get one table","description":"One table by its id (`tbl_\u2026`). 404 when the workspace has no table with this id.","operationId":"get__v1_tables__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The table.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Tables  Rid  Get","$ref":"#/components/schemas/TableRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/taxes":{"get":{"tags":["catalog"],"summary":"List taxes","description":"The VAT rates (Mehrwertsteuer, TVA, IVA) of the workspace: name, rate, the country it applies in and whether prices include it. A rate can change on a date: `rates` holds that schedule. These are the rates set up; the financial report shows the VAT actually booked. `q` searches the name, country and revenue code, `country` and `inclusive` narrow the list, and `sort` and `desc` order it. One page per call (`limit`, `cursor`).","operationId":"list_taxes_v1_taxes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring over name, country and revenue code, applied over the whole workspace set."},{"name":"country","in":"query","required":false,"schema":{"type":"string"},"description":"Return only rates of this ISO-3166 alpha-2 country (`global` selects the ones with no country)."},{"name":"inclusive","in":"query","required":false,"schema":{"type":"boolean"},"description":"Return only inclusive (or only exclusive) rates."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","country","inclusive","revenue_code","code"]},"description":"Order the whole set by this stored field before paging."},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean"},"description":"Reverse the `sort` order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Taxes V1 Taxes Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create a tax","description":"Create a VAT rate: `name` and `rate_bps`, the rate in basis points (810 = 8.1 %). The body is checked whole before anything is written: an unknown field, a rate outside 0 to 10000, a country that is not two capitals, a schedule date that is not `YYYY-MM-DD` and a region the workspace does not have are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second tax.","operationId":"create_tax_v1_taxes_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Tax V1 Taxes Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/taxes/{tax_id}":{"get":{"tags":["catalog"],"summary":"Get one tax","description":"One VAT rate by its id. 404 when the workspace has no tax with this id.","operationId":"get_tax_v1_taxes__tax_id__get","parameters":[{"name":"tax_id","in":"path","required":true,"schema":{"type":"string","title":"Tax Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Tax V1 Taxes  Tax Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a tax","description":"Change one VAT rate: the body holds only the fields that change, and `rates`, when sent, replaces the schedule whole. `name`, `rate_bps`, `inclusive` and `rates` may not be null; the checks of the create apply. 404 when the workspace has no tax with this id.","operationId":"update_tax_v1_taxes__tax_id__patch","parameters":[{"name":"tax_id","in":"path","required":true,"schema":{"type":"string","title":"Tax Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Tax V1 Taxes  Tax Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a tax","description":"Delete one VAT rate. 404 when the workspace has no tax with this id.","operationId":"delete_tax_v1_taxes__tax_id__delete","parameters":[{"name":"tax_id","in":"path","required":true,"schema":{"type":"string","title":"Tax Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/transactions":{"get":{"tags":["transactions"],"summary":"List transactions","description":"The transactions of the workspace: every receipt a till settled, as a sale, a refund or a void.\n\nWith `offset`, the answer is a window of `limit` rows from that offset with `total`, narrowed by receipt time (`from`, `to`), till (`pos_id`), kind (`type`: `sale`, `refund` or `void`), free text (`q`: the receipt number or the cashier), credit customer (`customer_id`) and receipts with a note (`flagged`). A row of this window can be a short form of the receipt (its header and line count, without the lines); `GET /v1/transactions/{tx_id}` returns the whole one.\n\nWithout `offset`, the answer is a cursor page (`limit`, `cursor`) of whole receipts ordered by `_id`, and the filters do not apply. A receipt's `_id` is the random id its till gave it (`client_uuid`), not a time, so a new receipt can sort before a cursor you already passed: walk the cursor pages to read the whole list once, not to pick up new receipts.\n\nTo pick up new receipts, poll in offset mode by booking time: `offset=0&from=<occurred_at>`, where `<occurred_at>` is the `occurred_at` of the newest receipt you hold minus an overlap of a few minutes, then page on with `next_offset` and skip the `_id`s you already hold. Or read each day closing's receipts with `GET /v1/closures/{closure_id}/receipts`, or subscribe a webhook to `transactions.created`, sent once for every receipt a till books.","operationId":"list_transactions_v1_transactions_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Offset mode: the number of receipts to skip, newest first. With it the answer carries `total` and `next_offset` and the filters below apply; without it the list is paged by `cursor` alone.","title":"Offset"},"description":"Offset mode: the number of receipts to skip, newest first. With it the answer carries `total` and `next_offset` and the filters below apply; without it the list is paged by `cursor` alone."},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Earliest booking time to include, inclusive, compared as text against the receipt's `occurred_at`: the shop's local time, written with its offset (`2026-10-22T16:41:16+02:00`) or, on an imported receipt, without one. A date alone (`2026-10-22`) means the start of that day.","examples":["2026-10-01"],"title":"From"},"description":"Earliest booking time to include, inclusive, compared as text against the receipt's `occurred_at`: the shop's local time, written with its offset (`2026-10-22T16:41:16+02:00`) or, on an imported receipt, without one. A date alone (`2026-10-22`) means the start of that day."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latest booking time, exclusive: receipts before this value. A date alone means the start of that day, so for the whole of October send `from=2026-10-01&to=2026-11-01`.","examples":["2026-11-01"],"title":"To"},"description":"Latest booking time, exclusive: receipts before this value. A date alone means the start of that day, so for the whole of October send `from=2026-10-01&to=2026-11-01`."},{"name":"pos_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only receipts of this till (`pos_\u2026`).","title":"Pos Id"},"description":"Only receipts of this till (`pos_\u2026`)."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(sale|refund|void)$"},{"type":"null"}],"description":"Only receipts of this kind: `sale`, `refund` or `void`.","title":"Type"},"description":"Only receipts of this kind: `sale`, `refund` or `void`."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A receipt number (digits: exact match on `seq`) or part of a cashier's name, case-insensitive.","title":"Q"},"description":"A receipt number (digits: exact match on `seq`) or part of a cashier's name, case-insensitive."},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only receipts charged to this credit customer (`GET /v1/customers`): sales and refunds booked to the customer's account at the till, and receipts imported from CashAssist that name the customer, whether or not the company counts credit-customer sales in the daily turnover.","title":"Customer Id"},"description":"Only receipts charged to this credit customer (`GET /v1/customers`): sales and refunds booked to the customer's account at the till, and receipts imported from CashAssist that name the customer, whether or not the company counts credit-customer sales in the daily turnover."},{"name":"flagged","in":"query","required":false,"schema":{"type":"boolean","description":"`true`: only receipts that carry a `validation` note, those a till sent with a detail the cloud could not read, or that the cloud kept under a business verdict (a refund over its original, a loyalty payment without its card).","default":false,"title":"Flagged"},"description":"`true`: only receipts that carry a `validation` note, those a till sent with a detail the cloud could not read, or that the cloud kept under a business verdict (a refund over its original, a loyalty payment without its card)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of receipts (offset or cursor mode).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Transactions V1 Transactions Get","$ref":"#/components/schemas/TransactionPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `archive_busy`, `rate_limited`.","content":{"application/json":{"examples":{"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `archive_unreadable`, `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `db_busy`.","content":{"application/json":{"examples":{"archive_unreadable":{"summary":"archive_unreadable","value":{"error":{"code":"archive_unreadable","message":"A day of the receipt history in this range could not be read."}}},"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/transactions/{tx_id}":{"get":{"tags":["transactions"],"summary":"Get one transaction","description":"One receipt with everything the till settled: its lines, payments, VAT and discounts, and `pos_name`, the name of the till that booked it. `day` (the business day, `YYYY-MM-DD`) makes the lookup of an older receipt faster. 404 when the workspace has no receipt with this id; a till's own credential reads the receipts of its own shop's tills only, and a receipt of another shop is a 404 for it too.","operationId":"get_transaction_v1_transactions__tx_id__get","parameters":[{"name":"tx_id","in":"path","required":true,"schema":{"type":"string","title":"Tx Id"}},{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business day of the receipt as `YYYY-MM-DD`. Optional: a recent receipt is found without it; for an old one it makes the lookup direct instead of a search through the whole history.","examples":["2026-10-20"],"title":"Day"},"description":"Business day of the receipt as `YYYY-MM-DD`. Optional: a recent receipt is found without it; for an old one it makes the lookup direct instead of a search through the whole history."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The whole receipt.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Transaction V1 Transactions  Tx Id  Get","$ref":"#/components/schemas/TransactionRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `db_busy`.","content":{"application/json":{"examples":{"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/transactions/{tx_id}/receipt":{"get":{"tags":["transactions"],"summary":"Get the VAT lines of one transaction","description":"The VAT block of one receipt as the till printed it: per VAT rate, the net amount, the turnover including VAT and the VAT amount, in minor units. Where the till recorded them, the amount tendered and the change given come with it. A sale that was later cancelled or refunded lists those receipts in `reversals` (id, number, type, total, when, by whom, why), whatever day they were booked on; a refund or void names the sale it reverses in `reverses` (id, number, when). `day` (the business day, `YYYY-MM-DD`) makes the lookup of an older receipt faster. 404 when the workspace has no receipt with this id.","operationId":"transaction_receipt_view_v1_transactions__tx_id__receipt_get","parameters":[{"name":"tx_id","in":"path","required":true,"schema":{"type":"string","title":"Tx Id"}},{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business day of the receipt as `YYYY-MM-DD`. Optional: a recent receipt is found without it; for an old one it makes the lookup direct instead of a search through the whole history.","examples":["2026-10-20"],"title":"Day"},"description":"Business day of the receipt as `YYYY-MM-DD`. Optional: a recent receipt is found without it; for an old one it makes the lookup direct instead of a search through the whole history."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Transaction Receipt View V1 Transactions  Tx Id  Receipt Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `db_busy`.","content":{"application/json":{"examples":{"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhooks","description":"The webhooks of the workspace. A webhook is a URL that RunMyHub calls when a record of the workspace changes. One page per call (`limit`, `cursor`).\n\nEach record is returned as stored, its `secret` included; the list needs the `webhooks:manage` permission. The introduction of this section covers the event names, the payload, the two headers and the signature check.","operationId":"list__v1_webhooks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of webhooks.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List  V1 Webhooks Get","$ref":"#/components/schemas/WebhookPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a webhook","description":"Create a webhook. A webhook is a URL that RunMyHub calls when a record of the workspace changes. It is answered with 201 and the stored record. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second webhook.\n\nRegisters a receiver: `url` (a public http or https address), `events` (exact event names, or `*`), `secret` (at least 16 characters, chosen by you; every delivery is signed with it) and `active`. Deliveries start with the next change. The answer carries the record with its new id. The introduction of this section covers the event names, the payload, the two headers and the signature check.","operationId":"create__v1_webhooks_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create  V1 Webhooks Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/webhooks/{rid}":{"get":{"tags":["webhooks"],"summary":"Get one webhook","description":"One webhook by its id (`whk_\u2026`). 404 when the workspace has no webhook with this id.\n\nThe record as stored, `secret` included. The introduction of this section covers the event names, the payload, the two headers and the signature check.","operationId":"get__v1_webhooks__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get  V1 Webhooks  Rid  Get","$ref":"#/components/schemas/WebhookRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["webhooks"],"summary":"Update a webhook","description":"Change one webhook: the body holds only the fields that change, and every other field keeps its value. 404 when the workspace has no webhook with this id.\n\nA changed `secret` signs every delivery from then on; `active: false` pauses deliveries and keeps the registration. Events that happen while it is paused are never sent. The introduction of this section covers the event names, the payload, the two headers and the signature check.","operationId":"update__v1_webhooks__rid__patch","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update  V1 Webhooks  Rid  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete a webhook","description":"Delete one webhook. 404 when the workspace has no webhook with this id.\n\nDeliveries stop at once. A delivery already on its way still arrives.","operationId":"delete__v1_webhooks__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/article-groups":{"get":{"tags":["catalog"],"summary":"List article groups","description":"Every article group of the workspace, in one answer. An article group is a named group of articles of one `kind`: `discount`, `production`, `marketing`, or one of three groupings for statistics (`statistic_1` to `statistic_3`). An article names its discount, production and marketing group in `discount_group_id`, `production_group_id` and `marketing_group_id`. `kind` keeps the groups of one kind; a kind outside the six is refused with 422.","operationId":"list_article_groups_v1_article_groups_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["discount","production","marketing","statistic_1","statistic_2","statistic_3"],"type":"string"},{"type":"null"}],"description":"Only the groups of this kind; a kind outside the six is a 422.","title":"Kind"},"description":"Only the groups of this kind; a kind outside the six is a 422."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Article Groups V1 Article Groups Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create an article group","description":"Create an article group: `kind` and `name`, optionally `code` and `sort_order`. A name another group of the same kind already has, in any letter case, is refused with 422 `not_unique`. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second group.","operationId":"create_article_group_v1_article_groups_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Article Group V1 Article Groups Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/article-groups/{group_id}":{"get":{"tags":["catalog"],"summary":"Get one article group","description":"One article group by its id. 404 when the workspace has no article group with this id.","operationId":"get_article_group_v1_article_groups__group_id__get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Article Group V1 Article Groups  Group Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update an article group","description":"Change one article group: the body holds only the fields that change, and `kind` is not one of them. A new name another group of the same kind already has, in any letter case, is refused with 422 `not_unique`; a name the group keeps is not judged again. 404 when the workspace has no article group with this id. 409 `source_owned` for a group the workspace's previous system manages.","operationId":"update_article_group_v1_article_groups__group_id__patch","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Article Group V1 Article Groups  Group Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete an article group","description":"Delete one article group and take it off every article that carries it. 404 when the workspace has no article group with this id. 409 `source_owned` for a group the workspace's previous system manages, or while articles that carry it are managed there.","operationId":"delete_article_group_v1_article_groups__group_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/compute/jobs/{task_id}":{"get":{"tags":["compute"],"summary":"Get one compute job","description":"The state of one job that a call queued with 202, such as a long financial report or a large batch of orders: `status`, `progress`, and once it has ended its `result` or `error`. `pending` says whether to ask again, and `retry_after_s` how soon. A key reads the jobs of its own workspace whose permission it holds; any other job answers 404.","operationId":"compute_job_v1_compute_jobs__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compute Job V1 Compute Jobs  Task Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customers":{"get":{"tags":["customers"],"summary":"List customers","description":"The customers of the workspace, business and consumer alike, one page per call (`limit`, `cursor`). Archived customers are left out. One-time customers, created for a single order, are left out too, and `one_time=true` lists only them. `active` takes `true` or `false`; `q` searches the number, name, e-mail, street, postcode, city and every phone number, a phone number with its spaces, dashes, slashes, dots and brackets ignored; `group_id`, `list_id` and `tour_id` keep the customers of one customer group, customer list or delivery tour. `sort` and `desc` order the list, and `summary=true` returns short rows: number, name, active, e-mail, group name, postcode and city.","operationId":"list_customers_v1_customers_get","parameters":[{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"one_time","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Time"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id"}},{"name":"list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"List Id"}},{"name":"tour_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tour Id"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of customers.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Customers V1 Customers Get","$ref":"#/components/schemas/CustomerPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["customers"],"summary":"Create a customer","description":"Create a customer; only `name` is required. The `wawi` block holds the customer's ordering, billing and delivery settings. `profile_id` picks a profile of default settings that fills that block, and the fields the body sends win over the profile; left out, the workspace's default profile applies. Leave `customer_number` out to get the next free number. Every id the body names (`profile_id`, `wawi.group_id`, `wawi.delivery_note_group`, `wawi.besr_bank_id`, the tour slots' `plan_id`) must exist in the workspace, and `wawi.price_group` and `wawi.sunday_price_group` must each be 0 or one of its price categories: each refused value is one problem of the 422. A field the body does not know is refused. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second customer. 409 `source_owned` while the workspace's customers are managed in its previous system.","operationId":"create_customer_v1_customers_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Customer V1 Customers Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `conflict`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"conflict":{"summary":"conflict","value":{"error":{"code":"conflict","message":"A value that must be unique already belongs to another record, such as a customer number, an article number or a barcode. The message names it."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customers/{customer_id}":{"get":{"tags":["customers"],"summary":"Get one customer","description":"One customer with everything stored on it: name, addresses, contact data, payment terms, discount group, delivery settings, and the ordering and billing settings in the `wawi` block. 404 when the workspace has no customer with this id.","operationId":"get_customer_v1_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The customer record.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Customer V1 Customers  Customer Id  Get","$ref":"#/components/schemas/CustomerRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["customers"],"summary":"Update a customer","description":"Change one customer with a JSON merge patch (RFC 7396): the body holds only the fields that change. A field left out stays as it is, null clears it, and an object merges key by key at every depth, in `wawi` too, so `{\"address\": {\"city\": \"Bern\"}}` keeps the street and `{\"wawi\": {\"tour\": {\"note\": \"x\"}}}` keeps the tour slots. A list replaces the stored one whole. Null on `name`, `customer_number`, `active` or `wawi` is refused. `unset_wawi` names dotted paths inside `wawi` to clear, the same as a null there. An id you change (`wawi.group_id`, `wawi.delivery_note_group`, `wawi.besr_bank_id`, a tour slot's `plan_id`) must exist in the workspace, and a changed `wawi.price_group` or `wawi.sunday_price_group` must be 0 or one of its price categories; a value sent back unchanged is not judged again. A field the body does not know is refused, and so are the embedded lists (special prices, reseller prices, delivery periods, lists, assortment groups) and the contacts: each has its own PUT. 404 when the workspace has no customer with this id, or it was deleted.","operationId":"update_customer_v1_customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Customer V1 Customers  Customer Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `conflict`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"conflict":{"summary":"conflict","value":{"error":{"code":"conflict","message":"A value that must be unique already belongs to another record, such as a customer number, an article number or a barcode. The message names it."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["customers"],"summary":"Delete a customer","description":"Archive one customer: it leaves the customer list and keeps its history. 404 when the workspace has no customer with this id, or it is archived already. 409 `source_owned` for a customer the workspace's previous system manages.","operationId":"delete_customer_v1_customers__customer_id__delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customers/{customer_id}/contacts":{"get":{"tags":["customers"],"summary":"Get the contacts of one customer","description":"The contact persons at one customer under `items`, each with an `id`, name, role, e-mail, phone and the documents they receive (`receives`). 404 when the workspace has no customer with this id.","operationId":"get_customer_contacts_v1_customers__customer_id__contacts_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Customer Contacts V1 Customers  Customer Id  Contacts Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"tags":["customers"],"summary":"Replace the contacts of one customer","description":"Replace the contact persons of one customer with `items`: the list sent is the whole new list. A contact sent without an `id` gets one, and the answer holds the list as stored, ids included; send the ids back unchanged, because invoices remember who they went to by it. A field a contact does not know is refused. 404 when the workspace has no customer with this id, or it was deleted.","operationId":"put_customer_contacts_v1_customers__customer_id__contacts_put","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerContacts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Customer Contacts V1 Customers  Customer Id  Contacts Put"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/inventory":{"get":{"tags":["inventory"],"summary":"List stock levels","description":"The stock levels of the workspace: one row per article, variant and shop with the quantity on hand, the article's `product_name` and `sku`, and the branch's `shop_name`. One page per call (`limit`, `cursor`), with `total`.\n\n`q` searches the article name, SKU, shop and variant; `shop_id` keeps one shop; `low=true` keeps the levels at or below their reorder point. `sort` and `desc` order the whole list before it is paged, and `summary=true` returns short rows.\n\nA level exists once a movement created it. `with_unstocked=true` adds the stock-kept articles that have none yet, as zero rows marked `unstocked: true`. It needs one shop, given as `shop_id` or as the workspace's only shop; without one the answer says `unstocked_needs_shop: true` instead.","operationId":"list_inventory_v1_inventory_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"low","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Low"}},{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Id"}},{"name":"with_unstocked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Unstocked"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Inventory V1 Inventory Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/inventory/movements":{"get":{"tags":["inventory"],"summary":"List stock movements","description":"The stock movements of the workspace, newest first: goods received, corrections, counts, sales, returns, waste and transfers, with the article's `product_name` and `sku`. One page per call (`limit`, `cursor`).\n\n`q` searches the article name, SKU, shop and reason; `type` and `shop_id` keep one kind or one shop; `date_from` and `date_to` bound the time the movement happened (ISO 8601, both inclusive). `sort` orders by `occurred_at`, `type`, `qty_delta`, `product` or `shop_id`, and `desc=false` turns the order around.","operationId":"list_movements_v1_inventory_movements_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Id"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Desc"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Movements V1 Inventory Movements Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["inventory"],"summary":"Create a stock movement","description":"Book one stock movement and apply it to the level of its article, variant and shop. `qty_delta` is signed: a negative value takes stock out. For a stocktake, send `counted_qty`, the quantity counted: the movement books the difference to the stock on hand at that moment. The body is checked whole before anything is booked: an unknown field and an article or shop the workspace does not have are each a problem of one 422. A movement whose `client_uuid` was booked already is not booked again, so a retry is safe.","operationId":"post_movement_v1_inventory_movements_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMovementCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Movement V1 Inventory Movements Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/inventory/{level_id}":{"get":{"tags":["inventory"],"summary":"Get one stock level","description":"One stock level by its id, `inv_<shop_id>_<product_id>_<variant_id>` (`base` for an article without variants), with the article's `product_name` and `sku`. 404 when the workspace has no stock level with this id.","operationId":"get_level_v1_inventory__level_id__get","parameters":[{"name":"level_id","in":"path","required":true,"schema":{"type":"string","title":"Level Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Level V1 Inventory  Level Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"tags":["invoices"],"summary":"Get one invoice","description":"One invoice made in RunMyHub: its customer, lines, totals per VAT rate, due date and status (`draft`, `issued`, `paid` or `void`). `source_owned` is true for an invoice the workspace's previous system manages. `document_kind` is `invoice`, or `self_billing_statement` for the control statement written for a customer who settles by its own credit note (no tax invoice: never sent, e-invoiced or dunned). 404 when the workspace has no invoice with this id.","operationId":"get_invoice_v1_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Invoice V1 Invoices  Invoice Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/loyalty-cards/{card_id}/ledger":{"get":{"tags":["loyalty-cards"],"summary":"List the movements of one loyalty card","description":"The movements of one loyalty card, newest first: each change of its balance or points. All of them in one answer, or one page per call with `limit` (and `cursor`). A row's id is in `id`. 404 when the workspace has no loyalty card with this id.","operationId":"card_ledger_v1_loyalty_cards__card_id__ledger_get","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Card Ledger V1 Loyalty Cards  Card Id  Ledger Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/loyalty-cards":{"get":{"tags":["loyalty-cards"],"summary":"List loyalty cards","description":"The loyalty cards of the workspace, ordered by card number, one page per call (`limit`, `cursor`), with `total`. A loyalty card holds a balance, points and a discount group. `active` takes `true` or `false`, `type` keeps one kind of card (a card without `type` is a `loyalty` card), `is_employee` keeps the staff cards (`true`) or the others (`false`), `points_below_zero=true` keeps the cards whose points are below zero, `discount_group` keeps the cards of one discount group (its number), `has_balance=true` keeps the cards that hold money, and `q` searches the number, name, RFID and barcode. `sort=card_number` with `desc=true` reverses the order, and `summary=true` returns short rows.","operationId":"list_cards_v1_loyalty_cards_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"is_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Employee"}},{"name":"points_below_zero","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only cards whose points are below zero \u2014 two tills spent the same points, offline or in two shops, or a sale was reversed after the points it earned had been spent.","title":"Points Below Zero"},"description":"true: only cards whose points are below zero \u2014 two tills spent the same points, offline or in two shops, or a sale was reversed after the points it earned had been spent."},{"name":"discount_group","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Only the cards of this discount group, by its number (`/v1/discount-groups` `ordinal`).","title":"Discount Group"},"description":"Only the cards of this discount group, by its number (`/v1/discount-groups` `ordinal`)."},{"name":"has_balance","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only the cards that hold money (balance above zero); `total` is how many.","title":"Has Balance"},"description":"true: only the cards that hold money (balance above zero); `total` is how many."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cards V1 Loyalty Cards Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["loyalty-cards"],"summary":"Create a loyalty card","description":"Create a loyalty card. The body is checked whole before anything is written: an unknown field, a day that is not `YYYY-MM-DD`, a negative limit and a discount outside 0 to 10000 basis points are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second card.","operationId":"create_card_v1_loyalty_cards_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyCardCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Card V1 Loyalty Cards Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `CARD_NUMBER_TAKEN`, `BARCODE_HELD_BY_PASS`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"CARD_NUMBER_TAKEN":{"summary":"CARD_NUMBER_TAKEN","value":{"error":{"code":"CARD_NUMBER_TAKEN","message":"Card number is already in use."}}},"BARCODE_HELD_BY_PASS":{"summary":"BARCODE_HELD_BY_PASS","value":{"error":{"code":"BARCODE_HELD_BY_PASS","message":"This barcode is the serial number of a wallet pass, of this card or another; changing it would break the pass."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `EMPLOYEE_CARD_NEEDS_CASHIER`, `validation_error`.","content":{"application/json":{"examples":{"EMPLOYEE_CARD_NEEDS_CASHIER":{"summary":"EMPLOYEE_CARD_NEEDS_CASHIER","value":{"error":{"code":"EMPLOYEE_CARD_NEEDS_CASHIER","message":"An employee card must be linked to a cashier (`operator_id`)."}}},"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/loyalty-cards/{card_id}":{"get":{"tags":["loyalty-cards"],"summary":"Get one loyalty card","description":"One loyalty card by its id. 404 when the workspace has no loyalty card with this id.","operationId":"get_card_v1_loyalty_cards__card_id__get","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Card V1 Loyalty Cards  Card Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["loyalty-cards"],"summary":"Update a loyalty card","description":"Change one loyalty card: the body holds only the fields that change. The balance and the points change only through movements, so a body that sets `balance` or `points` is refused with 422 `LEDGER_FIELD_READONLY` before anything else is judged. Then the body is checked whole: an unknown field, a day that is not `YYYY-MM-DD`, a negative limit, a discount outside 0 to 10000 basis points and a null `type`, `active` or switch are each a problem of one 422. 404 when the workspace has no loyalty card with this id.","operationId":"update_card_v1_loyalty_cards__card_id__patch","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyCardUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Card V1 Loyalty Cards  Card Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `CARD_NUMBER_TAKEN`, `BARCODE_HELD_BY_PASS`.","content":{"application/json":{"examples":{"CARD_NUMBER_TAKEN":{"summary":"CARD_NUMBER_TAKEN","value":{"error":{"code":"CARD_NUMBER_TAKEN","message":"Card number is already in use."}}},"BARCODE_HELD_BY_PASS":{"summary":"BARCODE_HELD_BY_PASS","value":{"error":{"code":"BARCODE_HELD_BY_PASS","message":"This barcode is the serial number of a wallet pass, of this card or another; changing it would break the pass."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `LEDGER_FIELD_READONLY`, `EMPLOYEE_CARD_NEEDS_CASHIER`, `CARD_NUMBER_REQUIRED`, `validation_error`.","content":{"application/json":{"examples":{"LEDGER_FIELD_READONLY":{"summary":"LEDGER_FIELD_READONLY","value":{"error":{"code":"LEDGER_FIELD_READONLY","message":"`balance` and `points` cannot be set directly; book a movement instead."}}},"EMPLOYEE_CARD_NEEDS_CASHIER":{"summary":"EMPLOYEE_CARD_NEEDS_CASHIER","value":{"error":{"code":"EMPLOYEE_CARD_NEEDS_CASHIER","message":"An employee card must be linked to a cashier (`operator_id`)."}}},"CARD_NUMBER_REQUIRED":{"summary":"CARD_NUMBER_REQUIRED","value":{"error":{"code":"CARD_NUMBER_REQUIRED","message":"Card number cannot be empty."}}},"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["loyalty-cards"],"summary":"Delete a loyalty card","description":"Delete one loyalty card. 404 when the workspace has no loyalty card with this id.","operationId":"delete_card_v1_loyalty_cards__card_id__delete","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders/tours":{"get":{"tags":["orders"],"summary":"List delivery tours","description":"The delivery tours an order may name in `tour_id`, all in one answer. `required` says whether this workspace requires a tour on every order: true when it has tours and its settings ask for one. There, an order without one of these tours is refused with 422 `tour_required`.","operationId":"list_order_tours_v1_orders_tours_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The tours, and whether an order needs one.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Order Tours V1 Orders Tours Get","$ref":"#/components/schemas/OrderTourPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders":{"get":{"tags":["orders"],"summary":"List the orders of one customer on one day","description":"Every order of one customer (`customer_id`) for one delivery day (`date`, `YYYY-MM-DD`), with its lines, sorted by order number. A customer can have several orders on a day, for example an order, a later addition and a return: only the order number is unique. Without `customer_id`, the day's orders that belong to no customer, such as a branch's own return sent from a till. A `date` that is not `YYYY-MM-DD` answers 422 `validation_error`, and a customer the workspace does not have answers 404 `not_found`.","operationId":"list_orders_v1_orders_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$"},{"type":"null"}],"description":"The customer whose orders to list. Omitted: the day's orders that belong to no customer, such as a branch's own return sent from a till.","title":"Customer Id"},"description":"The customer whose orders to list. Omitted: the day's orders that belong to no customer, such as a branch's own return sent from a till."},{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The delivery day, `YYYY-MM-DD`.","format":"date","title":"Date"},"description":"The delivery day, `YYYY-MM-DD`."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The customer's orders on the day.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Orders V1 Orders Get","$ref":"#/components/schemas/OrderPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["orders"],"summary":"Create an order","description":"Create an order for one customer and delivery day.\n\nThe lines come as `positions`; or as `line_changes`, articles with a quantity, priced from the customer's conditions on the day; or from an older order: `copy_from` repeats one (the latest before the day, the one on a date, or one by number) with its lines priced again for the new day. `add_delivery_cost` adds the customer's delivery line, priced from the tariff. Where the workspace requires a delivery tour, `tour_id` names one of `GET /v1/orders/tours`.\n\n`POST /v1/orders/preview` shows the result without storing it, and `POST /v1/orders/bulk` creates many orders in one call. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second order.","operationId":"create_order_v1_orders_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"The order as stored.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Order V1 Orders Post","$ref":"#/components/schemas/OrderRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`, `copy_source_not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}},"copy_source_not_found":{"summary":"copy_source_not_found","value":{"error":{"code":"copy_source_not_found","message":"There is no order of this customer to repeat: none before the delivery day, none on the date named, or none with the number named."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `order_type_limit_reached`, `order_type_not_on_till`, `order_date_not_allowed`, `not_a_credit_customer`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"order_type_limit_reached":{"summary":"order_type_limit_reached","value":{"error":{"code":"order_type_limit_reached","message":"This order type allows only so many orders per day at this till, and they are used up for the day."}}},"order_type_not_on_till":{"summary":"order_type_not_on_till","value":{"error":{"code":"order_type_not_on_till","message":"A credit customer's pre-order names an order type that is switched off or not offered on this till."}}},"order_date_not_allowed":{"summary":"order_date_not_allowed","value":{"error":{"code":"order_date_not_allowed","message":"A credit customer's pre-order is for a day its order type does not allow: before the first day, past the days ahead, or on a weekday not ticked."}}},"not_a_credit_customer":{"summary":"not_a_credit_customer","value":{"error":{"code":"not_a_credit_customer","message":"A credit customer's pre-order names a customer this till may not book on account: not a credit customer, inactive, archived or not on this till."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `tour_required`, `receiver_customer_unresolved`, `copy_source_not_repeatable`, `unknown_article`, `order_validation`, `no_orderable_articles`, `empty_order`, `validation_error`.","content":{"application/json":{"examples":{"tour_required":{"summary":"tour_required","value":{"error":{"code":"tour_required","message":"This workspace needs a delivery tour on every order, and the order names no active one. Send a `tour_id` from `GET /v1/orders/tours`."}}},"receiver_customer_unresolved":{"summary":"receiver_customer_unresolved","value":{"error":{"code":"receiver_customer_unresolved","message":"The receiving shop has no customer for this transfer order type, so the goods cannot be booked to it. Set one up for that shop first."}}},"copy_source_not_repeatable":{"summary":"copy_source_not_repeatable","value":{"error":{"code":"copy_source_not_repeatable","message":"The order named to repeat is a return or a credit, which cannot be repeated as an order."}}},"unknown_article":{"summary":"unknown_article","value":{"error":{"code":"unknown_article","message":"An article on the order being repeated no longer exists. Remove that line with `line_changes`, or send the lines yourself."}}},"order_validation":{"summary":"order_validation","value":{"error":{"code":"order_validation","message":"The lines break the articles' ordering rules, such as the lead time, the lot size or a minimum or maximum quantity; `details.warnings` lists each line and rule. Change the lines or the day, or accept them with `creation_options`."}}},"no_orderable_articles":{"summary":"no_orderable_articles","value":{"error":{"code":"no_orderable_articles","message":"Every line of the order being repeated is an article that cannot go on an order; `details.dropped` names them."}}},"empty_order":{"summary":"empty_order","value":{"error":{"code":"empty_order","message":"The order has no line with a quantity. Add at least one article."}}},"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders/bulk":{"post":{"tags":["orders"],"summary":"Create many orders","description":"Create up to 500 orders in one call: each item of `orders` is a body of `POST /v1/orders` and is created exactly as that call creates it.\n\nEach order succeeds or fails on its own. The result per item, at its `index`, says `created` with the `order`, or `failed` with the `error` and the `http_status` that `POST /v1/orders` answers for the same body. A malformed item fails the whole request with 422 before any order is created.\n\nUp to 50 orders are answered at once (200). A larger batch, or a request with `Prefer: respond-async`, is queued (202): ask `GET /v1/compute/jobs/{task_id}` until `pending` is false, and its `result` is the same answer.\n\nWith an `Idempotency-Key`, each order is safe to retry on its own: the same batch sent again answers the orders already created without creating them twice, and tries the failed ones again. A queued batch sent again answers the same job.","operationId":"create_orders_bulk_v1_orders_bulk_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderBulkCreate"}}}},"responses":{"200":{"description":"Every order was tried: one result per item, in order.","content":{"application/json":{"schema":{"title":"Response Create Orders Bulk V1 Orders Bulk Post","$ref":"#/components/schemas/OrderBulkResult"}}}},"202":{"description":"The batch is queued. Poll `poll` until `pending` is false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderBulkAccepted"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `too_many_attempts`, `type_disabled`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"too_many_attempts":{"summary":"too_many_attempts","value":{"error":{"code":"too_many_attempts","message":"This batch was sent too many times under one `Idempotency-Key` without finishing. Send it again with a new key."}}},"type_disabled":{"summary":"type_disabled","value":{"error":{"code":"type_disabled","message":"This kind of background job is switched off at the moment."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Error. `code` is one of: `payload_too_large`.","content":{"application/json":{"examples":{"payload_too_large":{"summary":"payload_too_large","value":{"error":{"code":"payload_too_large","message":"The request body is larger than this operation takes; the message names the limit. Send it in smaller parts."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `queue_full`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"queue_full":{"summary":"queue_full","value":{"error":{"code":"queue_full","message":"Too many background jobs are waiting for this workspace. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders/preview":{"post":{"tags":["orders"],"summary":"Preview an order","description":"What an order write would store, computed and not stored: a create (the body of `POST /v1/orders`), an edit (`order_id` beside the body of `PATCH /v1/orders/{order_id}`) or a cancel (`order_id` and `cancel: true`).\n\nThe lines, prices and totals are the ones the write would store. The answer holds `order` as it would be stored, `current` (the order as it is, for an edit or a cancel), `warnings` (the lines a lead-time, lot, minimum, maximum or split rule leaves out), `line_marks` (per line: a manual discount, or the line of the repeated order it came from), `copied_from` (the repeated order with its line prices) and `refusal` (what the write would answer for those lines instead of storing them, or null). Every other refusal, such as an invoiced or imported order or a missing tour, is answered as the write answers it. It needs the `deliveries:write` permission, like the write.","operationId":"preview_order_v1_orders_preview_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrderCreate"},{"$ref":"#/components/schemas/OrderPreviewUpdate"},{"$ref":"#/components/schemas/OrderPreviewCancel"}],"title":"Body"}}}},"responses":{"200":{"description":"What the write would store, not stored.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Order V1 Orders Preview Post","$ref":"#/components/schemas/OrderPreviewResult"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`, `copy_source_not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}},"copy_source_not_found":{"summary":"copy_source_not_found","value":{"error":{"code":"copy_source_not_found","message":"There is no order of this customer to repeat: none before the delivery day, none on the date named, or none with the number named."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `order_type_limit_reached`, `order_type_not_on_till`, `order_date_not_allowed`, `not_a_credit_customer`, `invalid_state`, `version_conflict`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"order_type_limit_reached":{"summary":"order_type_limit_reached","value":{"error":{"code":"order_type_limit_reached","message":"This order type allows only so many orders per day at this till, and they are used up for the day."}}},"order_type_not_on_till":{"summary":"order_type_not_on_till","value":{"error":{"code":"order_type_not_on_till","message":"A credit customer's pre-order names an order type that is switched off or not offered on this till."}}},"order_date_not_allowed":{"summary":"order_date_not_allowed","value":{"error":{"code":"order_date_not_allowed","message":"A credit customer's pre-order is for a day its order type does not allow: before the first day, past the days ahead, or on a weekday not ticked."}}},"not_a_credit_customer":{"summary":"not_a_credit_customer","value":{"error":{"code":"not_a_credit_customer","message":"A credit customer's pre-order names a customer this till may not book on account: not a credit customer, inactive, archived or not on this till."}}},"invalid_state":{"summary":"invalid_state","value":{"error":{"code":"invalid_state","message":"The order cannot be changed in its state: it is on an invoice, was imported from another system, is cancelled, or is one side of a transfer between shops that cannot follow. The message says which."}}},"version_conflict":{"summary":"version_conflict","value":{"error":{"code":"version_conflict","message":"The order changed after you read it: `expected_version` is not its version any more. Read it again and send your change once more."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `tour_required`, `receiver_customer_unresolved`, `copy_source_not_repeatable`, `unknown_article`, `validation_error`.","content":{"application/json":{"examples":{"tour_required":{"summary":"tour_required","value":{"error":{"code":"tour_required","message":"This workspace needs a delivery tour on every order, and the order names no active one. Send a `tour_id` from `GET /v1/orders/tours`."}}},"receiver_customer_unresolved":{"summary":"receiver_customer_unresolved","value":{"error":{"code":"receiver_customer_unresolved","message":"The receiving shop has no customer for this transfer order type, so the goods cannot be booked to it. Set one up for that shop first."}}},"copy_source_not_repeatable":{"summary":"copy_source_not_repeatable","value":{"error":{"code":"copy_source_not_repeatable","message":"The order named to repeat is a return or a credit, which cannot be repeated as an order."}}},"unknown_article":{"summary":"unknown_article","value":{"error":{"code":"unknown_article","message":"An article on the order being repeated no longer exists. Remove that line with `line_changes`, or send the lines yourself."}}},"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders/{order_id}":{"get":{"tags":["orders"],"summary":"Get one order","description":"One order as a row of the order list: its number, delivery day, type, customer, total and status, without the lines. `GET /v1/orders` with the row's `customer_id` and `order_date` returns the whole order with its lines. A cancelled order still reads, with `is_deleted: true`. 404 when the workspace has no order with this id.","operationId":"get_created_order_v1_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The order's row.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Created Order V1 Orders  Order Id  Get","$ref":"#/components/schemas/CreatedOrderRow"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["orders"],"summary":"Update an order","description":"Change the details of one order, its lines, or both; the totals are computed again.\n\n`positions` replaces all the lines. `line_changes` names only the lines that change: a `position_id` with its new quantity (0 removes the line) or a manual discount, or an `article_id` that adds a line priced from the customer's conditions. Every other line stays as stored. `order_date` moves the order to another delivery day: it keeps its number and its agreed prices, and the checks run for the new day. `POST /v1/orders/preview` shows the result first.\n\nWith an `Idempotency-Key`, the same request sent again answers the first result and changes nothing a second time. An order that moves goods between two shops has a second order for the receiving shop: a line change is made on both, and 409 means the other one cannot change, because it is on an invoice or imported.","operationId":"update_order_v1_orders__order_id__patch","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdate"}}}},"responses":{"200":{"description":"The order as stored.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Order V1 Orders  Order Id  Patch","$ref":"#/components/schemas/OrderRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `invalid_state`, `version_conflict`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"invalid_state":{"summary":"invalid_state","value":{"error":{"code":"invalid_state","message":"The order cannot be changed in its state: it is on an invoice, was imported from another system, is cancelled, or is one side of a transfer between shops that cannot follow. The message says which."}}},"version_conflict":{"summary":"version_conflict","value":{"error":{"code":"version_conflict","message":"The order changed after you read it: `expected_version` is not its version any more. Read it again and send your change once more."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `tour_required`, `order_validation`, `empty_order`, `validation_error`.","content":{"application/json":{"examples":{"tour_required":{"summary":"tour_required","value":{"error":{"code":"tour_required","message":"This workspace needs a delivery tour on every order, and the order names no active one. Send a `tour_id` from `GET /v1/orders/tours`."}}},"order_validation":{"summary":"order_validation","value":{"error":{"code":"order_validation","message":"The lines break the articles' ordering rules, such as the lead time, the lot size or a minimum or maximum quantity; `details.warnings` lists each line and rule. Change the lines or the day, or accept them with `creation_options`."}}},"empty_order":{"summary":"empty_order","value":{"error":{"code":"empty_order","message":"The order has no line with a quantity. Add at least one article."}}},"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["orders"],"summary":"Cancel an order","description":"Cancel one order: it stays readable as cancelled and keeps its number. 404 when the workspace has no such order or it is cancelled already. 409 when it is on an invoice, imported, or the order of a pickup booked on the till (cancel the pickup there). Cancelling one of the two orders of a transfer between shops cancels the other too. With an `Idempotency-Key`, the same request sent again answers 204 as the first one did.","operationId":"delete_order_v1_orders__order_id__delete","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `invalid_state`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"invalid_state":{"summary":"invalid_state","value":{"error":{"code":"invalid_state","message":"The order cannot be changed in its state: it is on an invoice, was imported from another system, is cancelled, or is one side of a transfer between shops that cannot follow. The message says which."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/orders/{order_id}/pdf":{"get":{"tags":["orders"],"summary":"Get the delivery note PDF of one order","description":"The order as a delivery note PDF, on the customer's own delivery-note form and in the workspace's letterhead. `priced=false` prints it without prices and `priced=true` with them, whatever the customer's form says; without `priced` the form decides. 404 when the workspace has no order with this id. 503 when this host cannot render PDFs.","operationId":"order_pdf_v1_orders__order_id__pdf_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"priced","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"`false` prints the delivery note without prices, `true` with them. Omit it to follow the customer's delivery-note form.","title":"Priced"},"description":"`false` prints the delivery note without prices, `true` with them. Omit it to follow the customer's delivery-note form."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `invalid_state`.","content":{"application/json":{"examples":{"invalid_state":{"summary":"invalid_state","value":{"error":{"code":"invalid_state","message":"The order cannot be changed in its state: it is on an invoice, was imported from another system, is cancelled, or is one side of a transfer between shops that cannot follow. The message says which."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `renderer_unavailable`, `render_unavailable`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"renderer_unavailable":{"summary":"renderer_unavailable","value":{"error":{"code":"renderer_unavailable","message":"Documents cannot be printed at the moment. Try again shortly."}}},"render_unavailable":{"summary":"render_unavailable","value":{"error":{"code":"render_unavailable","message":"Documents cannot be printed at the moment. Try again shortly."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/price-actions":{"get":{"tags":["catalog"],"summary":"List price actions","description":"The price actions of the workspace, each whole: the action and every article in it with its price. A price action gives its articles a special price or a discount (`kind`: `fixed_price`, `promo_price`, `promo_price_time` for certain hours, `quantity` for a quantity offer, or `discount`) within its dates, weekdays and hours. `product_id` keeps the actions one article belongs to. All of them in one answer, or one page per call with `limit` (and `cursor`).","operationId":"list_price_actions_v1_price_actions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Price Actions V1 Price Actions Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create a price action","description":"Create a price action: `name` and `kind`, then its dates, hours, weekdays and `members`, the articles with their prices. The body is checked whole before anything is written: an unknown field, a name without text in any language, a `discount_bps` outside 0 to 10000 and an article or VAT rate the workspace does not have are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second price action.","operationId":"create_price_action_v1_price_actions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceActionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Price Action V1 Price Actions Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/price-actions/{action_id}":{"get":{"tags":["catalog"],"summary":"Get one price action","description":"One price action with its articles. 404 when the workspace has no price action with this id.","operationId":"get_price_action_v1_price_actions__action_id__get","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Price Action V1 Price Actions  Action Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a price action","description":"Change one price action: the body holds only the fields that change, and `assignment` merges key by key into the stored one. `kind` stays as created; a `kind` sent back from a read is ignored. `members`, when sent, replaces the articles whole. `name`, `active`, `days` and `members` may not be null. The checks of the create apply to what the body changes. 404 when the workspace has no price action with this id.","operationId":"update_price_action_v1_price_actions__action_id__patch","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceActionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Price Action V1 Price Actions  Action Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a price action","description":"Delete one price action. 404 when the workspace has no price action with this id.","operationId":"delete_price_action_v1_price_actions__action_id__delete","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/products":{"get":{"tags":["catalog"],"summary":"List products","description":"The articles of the catalog.\n\nWith `offset`, the answer is a window of `limit` articles from that offset, with `total`, ordered by `sort` (`sku` or `name`) and `desc`. It is narrowed by free text (`q`), `status` (`active` or `archived`), `sellable`, and the groups an article belongs to: `reporting_category_id`, `discount_group_id`, `production_group_id`, `marketing_group_id`, `list_id`, `assortment_group_id` and `shipping_point_id`, and the VAT rates `tax_id` (take-away) and `dine_in_tax_id` (eaten in). Each of these may be sent several times: the values of one parameter are alternatives, and different parameters must all match. `orderable=true` keeps the articles an order may hold, and `available_on_till` the ones a till sells. `named=true` leaves out articles without a name. `summary=true` returns shorter rows.\n\nWithout `offset` and without a filter, the answer is a cursor page (`limit`, `cursor`) of whole articles in the order they were stored. Without `offset` but with a filter, the answer is the filtered window from the start, with `has_more` and a `next_cursor` that continues it with the same filters.","operationId":"list_products_v1_products_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(sku|name)$","default":"sku","title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"sellable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sellable"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|archived)$"},{"type":"null"}],"title":"Status"}},{"name":"orderable","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Orderable"}},{"name":"schablone_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Schablone Id"}},{"name":"placement_layout_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Placement Layout Id"}},{"name":"reporting_category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Reporting Category Id"}},{"name":"list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"List Id"}},{"name":"discount_group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Discount Group Id"}},{"name":"production_group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Production Group Id"}},{"name":"marketing_group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Marketing Group Id"}},{"name":"shipping_point_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Shipping Point Id"}},{"name":"assortment_group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Assortment Group Id"}},{"name":"tax_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tax Id"}},{"name":"dine_in_tax_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Dine In Tax Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^(dough|fraction)?$","description":"Narrow to a production role: `dough` = articles that are a dough (`production.is_dough`), `fraction` = fraction articles, a part of another article (`production.is_fraction_article`). Empty = no narrowing.","default":"","title":"Kind"},"description":"Narrow to a production role: `dough` = articles that are a dough (`production.is_dough`), `fraction` = fraction articles, a part of another article (`production.is_fraction_article`). Empty = no narrowing."},{"name":"points","in":"query","required":false,"schema":{"type":"string","pattern":"^(legacy|per_unit)?$","description":"Narrow to the loyalty points model: `legacy` = CashAssist points articles (`loyalty.points_cost` above 0), `per_unit` = articles a card's points redeem (`points_per_unit` above 0). Empty = no narrowing.","default":"","title":"Points"},"description":"Narrow to the loyalty points model: `legacy` = CashAssist points articles (`loyalty.points_cost` above 0), `per_unit` = articles a card's points redeem (`points_per_unit` above 0). Empty = no narrowing."},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}},{"name":"named","in":"query","required":false,"schema":{"type":"boolean","description":"Only articles that have a name; a picker leaves out number-only records.","default":false,"title":"Named"},"description":"Only articles that have a name; a picker leaves out number-only records."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"available_on_till","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Only records available on this till (a pos id): everywhere, or narrowed to include it.","title":"Available On Till"},"description":"Only records available on this till (a pos id): everywhere, or narrowed to include it."},{"name":"assigned_nowhere","in":"query","required":false,"schema":{"type":"boolean","description":"Only records narrowed so that they reach no till of the workspace. A record available everywhere never counts.","default":false,"title":"Assigned Nowhere"},"description":"Only records narrowed so that they reach no till of the workspace. A record available everywhere never counts."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of products (offset or cursor mode).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Products V1 Products Get","$ref":"#/components/schemas/ProductPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create a product","description":"Create an article; only `name` is required. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second article. 409 `conflict` when the article number or a barcode already belongs to another article, archived ones included. 409 `source_owned` while the workspace's catalog is managed in its previous system, whose import keeps it here; a points top-up article (`function` `loyalty_points_topup`) is this system's own and is created here as well. `POST /v1/imports/products` creates many articles in one call.","operationId":"create_product_v1_products_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Product V1 Products Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `conflict`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"conflict":{"summary":"conflict","value":{"error":{"code":"conflict","message":"A value that must be unique already belongs to another record, such as a customer number, an article number or a barcode. The message names it."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/products/by-code/{code}":{"get":{"tags":["catalog"],"summary":"Get one product by its code","description":"The one article a scanned or typed code names, as a short row (id, name, number, price) to put on an order. The code is matched against the article's barcodes first, then its EAN, then its article number. 404 when nothing matches, and also when the match may not go on an order: a dough or raw material, an article not for sale, archived, or sold on the till only. `include_inactive=true` also finds an archived article, for a return.","operationId":"product_by_code_v1_products_by_code__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Product By Code V1 Products By Code  Code  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/products/{product_id}":{"get":{"tags":["catalog"],"summary":"Get one product","description":"One article with everything stored on it: prices, VAT, categories, barcodes, variants and the rest. 404 when the workspace has no article with this id.","operationId":"get_product_v1_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The product record.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Product V1 Products  Product Id  Get","$ref":"#/components/schemas/ProductRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a product","description":"Change one article: the body holds only the fields that change. Each position of a `recipe` names an article of the workspace that is a raw material or has a recipe of its own, and a recipe may not come to contain itself; each refused position is one problem of the 422. 404 when the workspace has no article with this id. 409 `conflict` when a new article number or barcode already belongs to another article. 409 `source_owned` for a field the workspace's previous system manages. On such a workspace a points top-up article (`function` `loyalty_points_topup`) is this system's own: any of its fields changes here, and a new `function` answers 409 `source_owned`.","operationId":"update_product_v1_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Product V1 Products  Product Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `conflict`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"conflict":{"summary":"conflict","value":{"error":{"code":"conflict","message":"A value that must be unique already belongs to another record, such as a customer number, an article number or a barcode. The message names it."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a product","description":"Delete one article. 409 `product_in_use` while another record still uses it, such as a recipe, a menu or a customer's standing order; the message names them. Archiving the article (`status: archived`) retires it instead. Orders and sales keep their own copy of the article. 404 when the workspace has no article with this id.","operationId":"delete_product_v1_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `product_in_use`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"product_in_use":{"summary":"product_in_use","value":{"error":{"code":"product_in_use","message":"Another record still uses this article, such as a recipe, a menu, a production calculation or a customer's standing order; `details.references` names it. Remove the article there first, or archive it instead of deleting it."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/quantity-discounts":{"get":{"tags":["catalog"],"summary":"List quantity discounts","description":"Every quantity discount of the workspace, in one answer. A quantity discount is a scale of amounts a customer can be given: from each threshold (`from_amount`, in minor units) the invoice amount gets `discount_all_pct` percent off. `source_owned` is true for one the workspace's previous system manages.","operationId":"list_quantity_discounts_v1_quantity_discounts_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Quantity Discounts V1 Quantity Discounts Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["catalog"],"summary":"Create a quantity discount","description":"Create a quantity discount: `name` and its `tiers`. The body is checked whole before anything is written: an unknown field, a blank name, a negative threshold and a percentage outside 0 to 100 are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second quantity discount. 409 `source_owned` while the workspace's quantity discounts are managed in its previous system.","operationId":"create_quantity_discount_v1_quantity_discounts_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantityDiscountCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Quantity Discount V1 Quantity Discounts Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`, `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}},"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/quantity-discounts/{discount_id}":{"get":{"tags":["catalog"],"summary":"Get one quantity discount","description":"One quantity discount by its id, with `source_owned`. 404 when the workspace has no quantity discount with this id.","operationId":"get_quantity_discount_v1_quantity_discounts__discount_id__get","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string","title":"Discount Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Quantity Discount V1 Quantity Discounts  Discount Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a quantity discount","description":"Change one quantity discount: the body holds only the fields that change, and `tiers`, when sent, replaces the scale whole. `name` and `tiers` may not be null; the checks of the create apply. 404 when the workspace has no quantity discount with this id. 409 `source_owned` for one the workspace's previous system manages.","operationId":"update_quantity_discount_v1_quantity_discounts__discount_id__patch","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string","title":"Discount Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantityDiscountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Quantity Discount V1 Quantity Discounts  Discount Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a quantity discount","description":"Delete one quantity discount. 404 when the workspace has no quantity discount with this id. 409 `source_owned` while the workspace's quantity discounts are managed in its previous system.","operationId":"delete_quantity_discount_v1_quantity_discounts__discount_id__delete","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string","title":"Discount Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `source_owned`.","content":{"application/json":{"examples":{"source_owned":{"summary":"source_owned","value":{"error":{"code":"source_owned","message":"A connected legacy system manages this data, because the workspace runs beside it or because the record came from it. Change it there."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/recipes":{"get":{"tags":["catalog"],"summary":"List recipes","description":"The recipes of the workspace, sorted by name. Each recipe carries its ingredients (`positions`: a quantity in grams of a raw material, or of another recipe used as a semi-finished product), its production steps and stages, and its costing and declaration settings. Without `limit` every recipe comes back in one answer; pass `limit` and then `cursor` to read them a page at a time. `updated_since` lists only the recipes changed since a moment.","operationId":"list_recipes_v1_recipes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only records changed at or after this moment (ISO 8601, e.g. `2026-10-01T00:00:00Z`; without an offset it is read as UTC). Pass the time of your previous sync to read only what changed since.","title":"Updated Since"},"description":"Only records changed at or after this moment (ISO 8601, e.g. `2026-10-01T00:00:00Z`; without an offset it is read as UTC). Pass the time of your previous sync to read only what changed since."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The recipes, or one page of them.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Recipes V1 Recipes Get","$ref":"#/components/schemas/RecipePage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/recipes/{recipe_id}":{"get":{"tags":["catalog"],"summary":"Get one recipe","description":"One recipe by its id (`rec_\u2026`): its ingredients with quantity and the raw material or recipe each one references (`ref_kind`, `ref_id`), its production steps and stages, and its master data. 404 when the workspace has no recipe with this id.","operationId":"get_recipe_v1_recipes__recipe_id__get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The recipe record.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Recipe V1 Recipes  Recipe Id  Get","$ref":"#/components/schemas/RecipeRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/raw-materials":{"get":{"tags":["catalog"],"summary":"List raw materials","description":"The raw materials of the workspace, the ingredients recipes are made from, sorted by name. Each carries its master data: article number, name, cost, allergens, nutrition values, composition and supplier (`supplier_id`). Without `limit` every raw material comes back in one answer; pass `limit` and then `cursor` to read them a page at a time. `updated_since` lists only the raw materials changed since a moment.","operationId":"list_raw_materials_v1_raw_materials_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only records changed at or after this moment (ISO 8601, e.g. `2026-10-01T00:00:00Z`; without an offset it is read as UTC). Pass the time of your previous sync to read only what changed since.","title":"Updated Since"},"description":"Only records changed at or after this moment (ISO 8601, e.g. `2026-10-01T00:00:00Z`; without an offset it is read as UTC). Pass the time of your previous sync to read only what changed since."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The raw materials, or one page of them.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Raw Materials V1 Raw Materials Get","$ref":"#/components/schemas/RawMaterialPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/raw-materials/{raw_id}":{"get":{"tags":["catalog"],"summary":"Get one raw material","description":"One raw material by its id (`rm_\u2026`) with its master data: article number, name, cost, allergens, nutrition values, composition and supplier (`supplier_id`, read it at `GET /v1/suppliers/{supplier_id}`). 404 when the workspace has no raw material with this id.","operationId":"get_raw_material_v1_raw_materials__raw_id__get","parameters":[{"name":"raw_id","in":"path","required":true,"schema":{"type":"string","title":"Raw Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The raw-material record.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Raw Material V1 Raw Materials  Raw Id  Get","$ref":"#/components/schemas/RawMaterialRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customer-invoices":{"get":{"tags":["customer-invoices"],"summary":"List customer invoices","description":"The invoices of the workspace's customers from its accounting system, newest first, each with its status: `open`, `overdue`, `paid` or `cancelled`. Narrow by `status`, by invoice date (`from`, `to`), by customer name (`q`), by how far past due they are (`aging`: `not_due`, `d1_30`, `d31_60`, `d61_90` or `d90_plus`) and by `country` (`CH` or `DE`, the accounting the invoice comes from, so the amounts stay in one currency). `sort` is `date`, the default, or `customer`. One page per call (`limit`, `cursor`).","operationId":"list_invoices_v1_customer_invoices_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"aging","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aging"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Invoices V1 Customer Invoices Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/customer-invoices/detail/{invoice_id}":{"get":{"tags":["customer-invoices"],"summary":"Get one customer invoice","description":"One customer invoice with its status and its VAT. 404 when the workspace has no customer invoice with this id.","operationId":"invoice_detail_v1_customer_invoices_detail__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Invoice Detail V1 Customer Invoices Detail  Invoice Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/labour-feed/revenue":{"get":{"tags":["labour-feed"],"summary":"Get the revenue per shop and hour","description":"Till revenue and customers per shop, day and hour, for staff planning. Revenue is what the RunMyHub dashboard shows, in minor units with VAT: sales less refunds, without stored-value top-ups, sales on a customer account and comps. Hours are the shop's wall clock, and a shop's revenue is in its own currency.\n\nOne call covers at most 31 days; read a longer history one window at a time. Only cells with sales are listed, so an absent cell had none. A day that is not `complete` is still trading, and a late receipt can change a past day, so read the last few days again on every poll. Test tills are left out.\n\nA refused window answers 422 `validation_error` naming every problem: a `from` or `to` that is no day `YYYY-MM-DD`, a `to` before `from`, a window longer than 31 days.","operationId":"revenue_v1_labour_feed_revenue_get","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day, YYYY-MM-DD, inclusive.","format":"date","title":"From"},"description":"First day, YYYY-MM-DD, inclusive."},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day, YYYY-MM-DD, inclusive.","format":"date","title":"To"},"description":"Last day, YYYY-MM-DD, inclusive."},{"name":"granularity","in":"query","required":false,"schema":{"enum":["hour","day"],"type":"string","description":"`hour` for one row per shop, day and hour; `day` for day totals.","default":"hour","title":"Granularity"},"description":"`hour` for one row per shop, day and hour; `day` for day totals."},{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$"},{"type":"null"}],"description":"Only this shop.","title":"Shop Id"},"description":"Only this shop."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueFeed"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `compute_busy`, `archive_busy`, `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"compute_busy":{"summary":"compute_busy","value":{"error":{"code":"compute_busy","message":"Too many reports are running for this workspace. Retry after the seconds `Retry-After` names."}}},"archive_busy":{"summary":"archive_busy","value":{"error":{"code":"archive_busy","message":"The receipt archive is busy. Retry after the seconds `Retry-After` names."}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `archive_unavailable`, `archive_unreadable`, `analytics_worker_failed`, `analytics_worker_throttled`, `analytics_worker_unconfigured`, `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"archive_unavailable":{"summary":"archive_unavailable","value":{"error":{"code":"archive_unavailable","message":"The receipt archive could not be read. Try again shortly."}}},"archive_unreadable":{"summary":"archive_unreadable","value":{"error":{"code":"archive_unreadable","message":"A day of the receipt history in this range could not be read."}}},"analytics_worker_failed":{"summary":"analytics_worker_failed","value":{"error":{"code":"analytics_worker_failed","message":"The archive computation failed. Retry later."}}},"analytics_worker_throttled":{"summary":"analytics_worker_throttled","value":{"error":{"code":"analytics_worker_throttled","message":"The archive computation is throttled. Retry shortly."}}},"analytics_worker_unconfigured":{"summary":"analytics_worker_unconfigured","value":{"error":{"code":"analytics_worker_unconfigured","message":"The archive computation is not available for this workspace yet."}}},"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/labour-feed/forecast":{"get":{"tags":["labour-feed"],"summary":"Get the revenue forecast","description":"The daily revenue forecast of one shop from tomorrow on, with its range, in minor units with VAT: the forecast the RunMyHub Forecast page shows, learnt from the shop's sales history, the weather, holidays and nearby events.\n\nIt is computed once per shop and day. The first request of a day answers 202 with `Retry-After`; send it again after that many seconds and it answers 200 with the forecast, as does every later request that day. `status` says when too little history stands behind it.","operationId":"forecast_v1_labour_feed_forecast_get","parameters":[{"name":"shop_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"The shop to forecast.","title":"Shop Id"},"description":"The shop to forecast."},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":28,"minimum":1,"description":"Days ahead, starting tomorrow.","default":14,"title":"Days"},"description":"Days ahead, starting tomorrow."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastFeed"}}}},"202":{"description":"The forecast is being computed. Repeat the request after `Retry-After` seconds."},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `type_disabled`.","content":{"application/json":{"examples":{"type_disabled":{"summary":"type_disabled","value":{"error":{"code":"type_disabled","message":"This kind of background job is switched off at the moment."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/storage-locations":{"get":{"tags":["catalog"],"summary":"List storage locations","description":"The storage locations of the workspace: the places stock is kept, which an article can name. All of them in one answer, or one page per call with `limit` (and `cursor`); a page holds its rows under `items` and `data` alike, with `total`, `has_more` and `next_cursor`. `q` searches the name, and `desc=true` reverses the order.","operationId":"list_storage_locations_v1_storage_locations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Storage Locations V1 Storage Locations Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/storage-locations/{location_id}":{"get":{"tags":["catalog"],"summary":"Get one storage location","description":"One storage location by its id, with `source_owned`. 404 when the workspace has no storage location with this id.","operationId":"get_storage_location_v1_storage_locations__location_id__get","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","title":"Location Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Storage Location V1 Storage Locations  Location Id  Get"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/suppliers":{"get":{"tags":["suppliers"],"summary":"List suppliers","description":"The suppliers of the workspace, sorted by name, one page per call (`limit`, `cursor`).","operationId":"list_suppliers_v1_suppliers_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"One page of suppliers.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Suppliers V1 Suppliers Get","$ref":"#/components/schemas/SupplierPage"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["suppliers"],"summary":"Create a supplier","description":"Create a supplier; only `name` is required. The body is checked whole before anything is written: an unknown field, a blank name and a country that is not two capitals are each a problem of one 422. Send an `Idempotency-Key` header: a retry with the same key and body returns the first answer instead of creating a second supplier.","operationId":"create_supplier_v1_suppliers_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Supplier V1 Suppliers Post"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Error. `code` is one of: `idempotency_key_reuse`, `idempotency_in_progress`.","content":{"application/json":{"examples":{"idempotency_key_reuse":{"summary":"idempotency_key_reuse","value":{"error":{"code":"idempotency_key_reuse","message":"This Idempotency-Key was already used with a different request."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with this Idempotency-Key is still running. Retry shortly."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/suppliers/{supplier_id}":{"get":{"tags":["suppliers"],"summary":"Get one supplier","description":"One supplier by its id. 404 when the workspace has no supplier with this id.","operationId":"get_supplier_v1_suppliers__supplier_id__get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","title":"Supplier Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The supplier record.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Supplier V1 Suppliers  Supplier Id  Get","$ref":"#/components/schemas/SupplierRecord"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["suppliers"],"summary":"Update a supplier","description":"Change one supplier: the body holds only the fields that change, and `address` merges key by key into the stored one. `name` and `active` may not be null; the checks of the create apply. 404 when the workspace has no supplier with this id.","operationId":"update_supplier_v1_suppliers__supplier_id__patch","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","title":"Supplier Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Supplier V1 Suppliers  Supplier Id  Patch"}}}},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["suppliers"],"summary":"Delete a supplier","description":"Delete one supplier. 404 when the workspace has no supplier with this id.","operationId":"delete_supplier_v1_suppliers__supplier_id__delete","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","title":"Supplier Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"default":{"description":"Any answer outside 2xx has this shape. The codes this operation answers are listed per status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Error. `code` is one of: `unauthorized`.","content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"code":"unauthorized","message":"Missing or invalid credentials. Send your API key in the `x-api-key` header."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Error. `code` is one of: `forbidden`, `not_in_public_api`, `workspace_suspended`, `workspace_deleted`, `trial_expired`.","content":{"application/json":{"examples":{"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The key lacks a permission this operation needs; the message names it."}}},"not_in_public_api":{"summary":"not_in_public_api","value":{"error":{"code":"not_in_public_api","message":"API keys can call the operations of the published spec only."}}},"workspace_suspended":{"summary":"workspace_suspended","value":{"error":{"code":"workspace_suspended","message":"This workspace is suspended."}}},"workspace_deleted":{"summary":"workspace_deleted","value":{"error":{"code":"workspace_deleted","message":"This workspace has been deleted."}}},"trial_expired":{"summary":"trial_expired","value":{"error":{"code":"trial_expired","message":"The trial period of this workspace has ended."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Error. `code` is one of: `not_found`.","content":{"application/json":{"examples":{"not_found":{"summary":"not_found","value":{"error":{"code":"not_found","message":"The record this operation addresses does not exist in your workspace."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Error. `code` is one of: `validation_error`.","content":{"application/json":{"examples":{"validation_error":{"summary":"validation_error","value":{"error":{"code":"validation_error","message":"A parameter or body field is missing or invalid; `details.problems` names every one."}}}},"schema":{"$ref":"#/components/schemas/ValidationErrorEnvelope"}}}},"429":{"description":"Error. `code` is one of: `rate_limited`, `request_budget`.","content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests. Wait the seconds `Retry-After` names."}}},"request_budget":{"summary":"request_budget","value":{"error":{"code":"request_budget","message":"This request needed more memory or time than one request may take and was stopped. Narrow it, or retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Error. `code` is one of: `internal_error`.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"code":"internal_error","message":"Something failed on our side. Retry later."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Error. `code` is one of: `memory_pressure`, `db_busy`.","content":{"application/json":{"examples":{"memory_pressure":{"summary":"memory_pressure","value":{"error":{"code":"memory_pressure","message":"Busy. Retry after the seconds `Retry-After` names."}}},"db_busy":{"summary":"db_busy","value":{"error":{"code":"db_busy","message":"The database is busy. Retry after the seconds `Retry-After` names."}}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your workspace's API key. Create one in RunMyHub under Settings \u2192 API keys."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The access token of a signed-in RunMyHub user, as the app sends it. Integrations use an API key instead."}},"schemas":{"Additive":{"properties":{"e_nr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E Nr","description":"The E number, e.g. `E202`."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The additive's name."},"function":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function","description":"Its function class (preservative, colour, \u2026)."},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"A warning the label must print with it."}},"additionalProperties":false,"type":"object","title":"Additive","description":"A food additive declared on the label: its function class and its name or E-number, and any warning the law requires, such as 'source of phenylalanine'."},"AddressKind":{"type":"string","enum":["company","company_with_delivery","private"],"title":"AddressKind","description":"How a customer's address block is laid out: `company`, `company_with_delivery` (a company with a separate delivery address) or `private`."},"AppliesTo":{"properties":{"scope":{"type":"string","enum":["all","products","categories"],"title":"Scope","description":"`all` = every line of the cart, `products` = only the articles listed in `ids`, `categories` = only lines whose article is in one of the listed categories.","default":"all"},"ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Ids","description":"Article ids (`prd_\u2026`) or category ids (`cat_\u2026`), as `scope` says, each one the workspace has; empty for `all`.","examples":[["cat_drinks"]]}},"additionalProperties":false,"type":"object","title":"AppliesTo","description":"Which cart lines a promotion can touch. `all` = every line; `products` /\n`categories` restrict to the given ids (a line matches if its product_id is\nlisted, or any of its category_ids is listed)."},"ArticleGroupCreate":{"properties":{"kind":{"type":"string","enum":["discount","production","marketing","statistic_1","statistic_2","statistic_3"],"title":"Kind","description":"Which list the group belongs to: `discount`, `production` or `marketing`, or one of the three groupings for statistics, `statistic_1` to `statistic_3`. Set on create; it never changes."},"name":{"type":"string","minLength":1,"title":"Name","description":"The group's name, unique within its kind regardless of case. Leading and trailing spaces are dropped; a name of spaces only is refused."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"The group's number, shown beside a group for statistics; null for none."},"sort_order":{"type":"integer","title":"Sort Order","description":"Where the group stands in the pickers: lower first, then by name.","default":0}},"additionalProperties":false,"type":"object","required":["kind","name"],"title":"ArticleGroupCreate","description":"A new article group of one of the six kinds."},"ArticleGroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"The group's name, unique within its kind regardless of case. Leading and trailing spaces are dropped; a name of spaces only is refused. May be left out, never null."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"The group's number, shown beside a group for statistics; null for none."},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order","description":"Where the group stands in the pickers: lower first, then by name. May be left out, never null."}},"additionalProperties":false,"type":"object","title":"ArticleGroupUpdate","description":"A change to an article group: only the fields sent change. The kind is\nnot among them."},"ArticleRecipe":{"properties":{"yield_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yield Unit","description":"The unit one unit of the recipe yields (the piece it is sold as), so a cost per unit compares with the price per unit."},"positions":{"items":{"$ref":"#/components/schemas/ArticleRecipePosition"},"type":"array","title":"Positions","description":"The ingredients."},"resource":{"anyOf":[{"$ref":"#/components/schemas/ArticleResource"},{"type":"null"}],"description":"People or machine time it takes."},"lot_size_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lot Size Min","description":"The smallest production lot."},"lot_size_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lot Size Max","description":"The largest production lot."},"lot_size_multiple":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lot Size Multiple","description":"Lots are a multiple of this."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Where the recipe came from (an import's name); null = typed here."}},"additionalProperties":false,"type":"object","title":"ArticleRecipe","description":"What an article is made of and what making it costs: its own recipe, stored on the article. Declarations, allergens and nutrition values are not part of it."},"ArticleRecipePosition":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The ingredient article (id)."},"quantity":{"type":"number","title":"Quantity","description":"How much of it one unit of the recipe takes.","default":0.0},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The unit `quantity` is in."}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"ArticleRecipePosition","description":"One line of an article's recipe: a `quantity` of another article. An ingredient that is bought in is an article without a recipe; an intermediate product, such as a pre-dough, is an article with one."},"ArticleResource":{"properties":{"work_centre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Centre","description":"The production line or work centre, free text."},"resource_type":{"type":"string","enum":["person","machine"],"title":"Resource Type","description":"Whether people or a machine do the work.","default":"person"},"duration_ms":{"type":"integer","title":"Duration Ms","description":"How long it takes, in milliseconds.","default":0},"basis":{"type":"string","enum":["per_unit","per_lot"],"title":"Basis","description":"Whether `duration_ms` is per unit or per lot.","default":"per_unit"},"rate":{"type":"integer","title":"Rate","description":"The cost in minor units: per hour for a person, per lot for a machine.","default":0}},"additionalProperties":false,"type":"object","title":"ArticleResource","description":"What making the article takes in staff or machine time (`resource_type`: `person` or `machine`). `basis` says whether `duration_ms` is per unit (`per_unit`) or per batch (`per_lot`), so a large order is costed right."},"Assignment-Input":{"properties":{"mode":{"type":"string","enum":["all","only","except"],"title":"Mode","description":"`all` = everywhere (the lists are ignored), `only` = only on the tills of the listed regions, shops and tills, `except` = everywhere but there.","default":"all"},"regions":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Regions","description":"Region ids (`reg_\u2026`); covers every shop and till below."},"shops":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Shops","description":"Shop ids (`shp_\u2026`); covers every till of the shop."},"pos":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Pos","description":"Till ids (`pos_\u2026`). Prefer shops or regions, so a new till is covered by itself."},"groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groups","description":"Legacy: till groups, no longer read. A read may still answer it; a write ignores it.","readOnly":true}},"additionalProperties":false,"type":"object","title":"Assignment","description":"Where a record is available. `mode` `all` makes it available everywhere; `only` limits it to, and `except` excludes, the named `regions`, `shops` and tills (`pos`). Prefer regions and shops, so a new till takes the record over."},"Assignment-Output":{"properties":{"mode":{"type":"string","enum":["all","only","except"],"title":"Mode","description":"`all` = everywhere (the lists are ignored), `only` = only on the tills of the listed regions, shops and tills, `except` = everywhere but there.","default":"all"},"regions":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Regions","description":"Region ids (`reg_\u2026`); covers every shop and till below."},"shops":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Shops","description":"Shop ids (`shp_\u2026`); covers every till of the shop."},"pos":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Pos","description":"Till ids (`pos_\u2026`). Prefer shops or regions, so a new till is covered by itself."}},"type":"object","title":"Assignment","description":"Where a record is available. `mode` `all` makes it available everywhere; `only` limits it to, and `except` excludes, the named `regions`, `shops` and tills (`pos`). Prefer regions and shops, so a new till takes the record over."},"AssortmentCreate":{"properties":{"scope":{"$ref":"#/components/schemas/AssortmentScope","description":"Where the assortment applies; an empty scope = the whole workspace."},"include":{"$ref":"#/components/schemas/AssortmentSelector","description":"What the assortment offers: `category_ids` = every article of these product groups (`cat_\u2026`), `tags` = every article carrying one of these tags.","examples":[{"category_ids":["cat_bakery","cat_coffee"],"tags":["summer"]}]},"exclude":{"$ref":"#/components/schemas/AssortmentSelector","description":"What to take out again, in the same shape as `include` (`category_ids`, `tags`); exclude wins over include.","examples":[{"category_ids":["cat_wine"],"tags":["alcohol"]}]},"overrides":{"$ref":"#/components/schemas/AssortmentOverrides","description":"Article-level corrections applied last: `add` = article ids (`prd_\u2026`) offered anyway, `remove` = article ids dropped anyway.","examples":[{"add":["prd_croissant"],"remove":["prd_espresso"]}]},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the assortment applies, `YYYY-MM-DD`; `null` = no start."},"valid_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid To","description":"Last day the assortment applies, `YYYY-MM-DD`; `null` = no end."}},"additionalProperties":false,"type":"object","title":"AssortmentCreate","description":"Which articles a till or a shop may sell: product groups and tags in, groups\nand tags out, then article-level corrections.","examples":[{"exclude":{"category_ids":["cat_wine"],"tags":["alcohol"]},"include":{"category_ids":["cat_bakery","cat_coffee"],"tags":["summer"]},"overrides":{"add":["prd_croissant"],"remove":["prd_espresso"]},"scope":{"shop_id":"shp_luzern"}}]},"AssortmentOverrides":{"properties":{"add":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Add","description":"Articles (`prd_\u2026`) offered anyway."},"remove":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Remove","description":"Articles (`prd_\u2026`) dropped anyway."}},"additionalProperties":false,"type":"object","title":"AssortmentOverrides","description":"Article-level corrections an assortment applies last."},"AssortmentScope":{"properties":{"shop_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shop Id","description":"Shop (`shp_\u2026`) the assortment applies to, every till of it; with `pos_id` also `null` it applies to the whole workspace."},"pos_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Pos Id","description":"One till (`pos_\u2026`) the assortment applies to; wins over `shop_id`."}},"additionalProperties":false,"type":"object","title":"AssortmentScope","description":"Where an assortment applies: one till, one shop, or the whole workspace."},"AssortmentSelector":{"properties":{"category_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Category Ids","description":"Every article of these product groups (`cat_\u2026`)."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Every article carrying one of these tags."}},"additionalProperties":false,"type":"object","title":"AssortmentSelector","description":"Which articles an assortment takes in, or out again: whole product groups\nand tags."},"AssortmentUpdate":{"properties":{"scope":{"anyOf":[{"$ref":"#/components/schemas/AssortmentScope"},{"type":"null"}],"description":"Where the assortment applies; an empty scope = the whole workspace."},"include":{"anyOf":[{"$ref":"#/components/schemas/AssortmentSelector"},{"type":"null"}],"description":"What the assortment offers: `category_ids` = every article of these product groups (`cat_\u2026`), `tags` = every article carrying one of these tags.","examples":[{"category_ids":["cat_bakery","cat_coffee"],"tags":["summer"]}]},"exclude":{"anyOf":[{"$ref":"#/components/schemas/AssortmentSelector"},{"type":"null"}],"description":"What to take out again, in the same shape as `include` (`category_ids`, `tags`); exclude wins over include.","examples":[{"category_ids":["cat_wine"],"tags":["alcohol"]}]},"overrides":{"anyOf":[{"$ref":"#/components/schemas/AssortmentOverrides"},{"type":"null"}],"description":"Article-level corrections applied last: `add` = article ids (`prd_\u2026`) offered anyway, `remove` = article ids dropped anyway.","examples":[{"add":["prd_croissant"],"remove":["prd_espresso"]}]},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the assortment applies, `YYYY-MM-DD`; `null` = no start."},"valid_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid To","description":"Last day the assortment applies, `YYYY-MM-DD`; `null` = no end."}},"additionalProperties":false,"type":"object","title":"AssortmentUpdate","description":"Fields of an assortment that may change; only the fields sent are changed."},"Atm":{"properties":{"max_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Amount","description":"The most a cashier may pay out, in minor units; null or 0 = no limit."}},"additionalProperties":false,"type":"object","title":"Atm","description":"The settings of a cash-withdrawal article (`function` `atm`): the amount the cashier enters may not exceed `max_amount`, in minor units; 0 or empty means no limit."},"Attribute":{"properties":{"k":{"type":"string","title":"K","description":"The attribute's key, e.g. `allergens`, `vegan`."},"v":{"title":"V","description":"Its value: text, a number, true/false or a list; one of the definition's `options` when it has them (`{\"k\": \"allergens\", \"v\": [\"gluten\", \"milk\"]}`)."}},"additionalProperties":false,"type":"object","required":["k","v"],"title":"Attribute","description":"One free attribute of the article. An attribute a write adds or changes must\nbe one the workspace's attribute registry defines (`GET /v1/attribute-definitions`),\nwith a value it allows when the definition lists them."},"AvailabilityPeriod":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"A label for the window."},"channel":{"type":"string","enum":["sale","order","both"],"title":"Channel","description":"What the window governs: `sale` = selling at the till, `order` = orders and pre-orders, `both`.","default":"both"},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day of the window, `YYYY-MM-DD`; null = open start."},"valid_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid To","description":"Last day of the window, `YYYY-MM-DD`; null = open end."},"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekdays","description":"ISO weekdays inside the window, 1 = Monday to 7 = Sunday; empty = every day."},"week_from":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week From","description":"First ISO calendar week, 1 to 53; null = open."},"week_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week To","description":"Last ISO calendar week, 1 to 53, at or after `week_from` (the band does not wrap the year); null = open."},"week_parity":{"type":"string","enum":["all","even","odd"],"title":"Week Parity","description":"`all` weeks, or only the `even` or `odd` calendar weeks.","default":"all"},"is_break":{"type":"boolean","title":"Is Break","description":"true makes this a break: the article is NOT available during the window.","default":false},"repeat_yearly":{"type":"boolean","title":"Repeat Yearly","description":"true repeats the window every year by month and day; a window over New Year runs from its start to its end in the next year.","default":false}},"additionalProperties":false,"type":"object","title":"AvailabilityPeriod","description":"One period in which an article is available, or, with `is_break`, not available (a delivery break): a date range, optionally repeating every year, optionally limited to weekdays and to calendar weeks (`week_from`, `week_to`, `week_parity`). `channel` says what it limits: selling on the till (`sale`), orders and preorders (`order`) or `both`, the default.\n\nA calendar-week range does not wrap at the turn of the year: `week_from` is at or before `week_to`. A season across New Year is a date range with `repeat_yearly`. An article without periods is always available."},"Barcode":{"properties":{"code":{"type":"string","title":"Code","description":"The code as scanned; unique in the workspace."},"type":{"type":"string","title":"Type","description":"The symbology, e.g. `EAN13`, `EAN8`, `CODE128`.","default":"EAN13"},"primary":{"type":"boolean","title":"Primary","description":"true: the code printed on labels.","default":false}},"additionalProperties":false,"type":"object","required":["code"],"title":"Barcode","description":"A code the till scans for this article."},"CanContainAllergen-Output":{"properties":{"allergen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergen Id","description":"The allergen (id)."},"allergen_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergen Ref","description":"The previous system's key of the allergen, kept as sent."}},"type":"object","title":"CanContainAllergen","description":"An allergen the recipe may carry as a trace."},"CardDiscountGroup":{"properties":{"ordinal":{"type":"integer","title":"Ordinal","description":"The discount group's number, as a customer card names it."},"discount_bps":{"type":"integer","title":"Discount Bps","description":"The discount in basis points: 500 = 5 %.","default":0}},"additionalProperties":false,"type":"object","required":["ordinal"],"title":"CardDiscountGroup","description":"The discount an article gives one discount group: `ordinal` is the group's number (the `ordinal` of a discount group, which a loyalty card names in `discount_group`), and `discount_bps` the discount in basis points (500 = 5 %). Only groups with a discount need an entry."},"CashAssistPriceSource":{"type":"string","enum":["disc_wawi_price_cash","disc_wawi_price_wawi","no_disc_price_cash","disc_cash_price_wawi","disc_cash_price_cash","disc_special_price_cash"],"title":"CashAssistPriceSource","description":"For a customer whose orders are also taken on a till: where the price and the discount of such a line come from. `price_cash` takes the till's price and `price_wawi` the customer's order price; `disc_wawi` takes the customer's order discount, `disc_cash` the discount the till sent, `disc_special` the customer's special till discount, and `no_disc` none."},"CategoryCardDiscount":{"properties":{"ordinal":{"type":"integer","title":"Ordinal","description":"The discount group's number, as a loyalty card names it."},"discount_bps":{"type":"integer","title":"Discount Bps","description":"The discount in basis points, 0 to 10000 (500 = 5 %).","default":0}},"additionalProperties":false,"type":"object","required":["ordinal"],"title":"CategoryCardDiscount","description":"The loyalty-card discount a revenue group gives one discount group: `ordinal` is the group's number, as a loyalty card names it in `discount_group`, and `discount_bps` the discount in basis points (500 = 5 %) on the articles of this revenue group. An article's own discount for that group wins. Only groups with a discount are stored."},"CategoryCreate":{"properties":{"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the group as the till and the reports show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"parent_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent category (`cat_\u2026`); `null` = a top-level category."},"kind":{"type":"string","enum":["sales","reporting","recipe_group"],"title":"Kind","description":"What the group is for: `sales` = a product group on the till (the default), `reporting` = a revenue group the daily closing and the statistics total by, `recipe_group` = a group of recipes on the scale station.","default":"sales"},"ordinal":{"type":"integer","title":"Ordinal","description":"Sort position among its siblings; lower comes first.","default":0},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Color","description":"Colour of the group's chip on the scale station, a hex RGB string (`#RRGGBB`); read for `recipe_group` only.","examples":["#2563eb"]},"i18n_meta":{"anyOf":[{"$ref":"#/components/schemas/CategoryI18nMetaIn"},{"type":"null"}],"description":"Translation hints for the texts; the server keeps the rest."},"cashassist_intern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashassist Intern","description":"Key of this group in the CashAssist till system it was imported from; `null` on a category made here."},"cashassist_kontonr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashassist Kontonr","description":"The group's number as the cashier sees it on a CashAssist till (`001`), a string that keeps its leading zeros; `null` on a category made here.","examples":["001"]},"card_discount_groups":{"items":{"$ref":"#/components/schemas/CategoryCardDiscount"},"type":"array","title":"Card Discount Groups","description":"Revenue groups only: the loyalty-card discount per discount group; empty = none."},"revenue_accounts":{"anyOf":[{"$ref":"#/components/schemas/CategoryRevenueAccounts"},{"type":"null"}],"description":"Revenue groups only: the revenue account per VAT rate."},"available_days":{"anyOf":[{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array"},{"type":"null"}],"title":"Available Days","description":"Weekdays the group and its products are offered in the guest apps, as ISO weekday numbers 1 = Monday \u2026 7 = Sunday; `null` or empty = every day. Online ordering only: the till ignores it.","examples":[[1,2,3,4,5]]},"online_hidden":{"type":"boolean","title":"Online Hidden","description":"`true` keeps the group and its products out of both guest apps (QR menu and Click & Collect) on every day, whatever `available_days` says.","default":false},"online_visibility":{"anyOf":[{"$ref":"#/components/schemas/OnlineVisibility"},{"type":"null"}],"description":"Per guest app (QR menu, Click & Collect, delivery): shown, hidden, or only in some shops; left out = shown."},"online_time_windows":{"items":{"$ref":"#/components/schemas/OnlineTimeWindow"},"type":"array","title":"Online Time Windows","description":"Times of day the group is offered in the guest apps (breakfast 07:00\u201311:00); empty = all day. The weekday half is `available_days`."}},"additionalProperties":false,"type":"object","required":["name"],"title":"CategoryCreate","description":"A product group: what the till groups articles by, what the closing totals\nrevenue by, or a recipe group on the scale station (see `kind`)."},"CategoryI18nMetaIn":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/CategoryNameMeta"},{"type":"null"}],"description":"Hints for `name`."}},"additionalProperties":false,"type":"object","title":"CategoryI18nMetaIn","description":"Translation hints for a category's texts, per text field (today `name`)."},"CategoryNameMeta":{"properties":{"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"A hint for translators."},"status":{"additionalProperties":{"type":"string","enum":["machine","reviewed"]},"type":"object","title":"Status","description":"Per language: `machine` = an unedited machine translation, `reviewed` = written or checked by a person."}},"additionalProperties":false,"type":"object","title":"CategoryNameMeta","description":"Translation hints for a category's `name`: a hint for translators, and per language whether the text is an unedited machine translation (`machine`) or written or checked by a person (`reviewed`). A language left out counts as `reviewed` when its text changed."},"CategoryRevenueAccounts":{"properties":{"normal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normal","description":"Revenue account at the normal VAT rate."},"reduced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reduced","description":"Revenue account at the reduced VAT rate."},"zero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zero","description":"Revenue account at 0 % VAT."},"special":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special","description":"Revenue account at the special VAT rate."}},"additionalProperties":false,"type":"object","title":"CategoryRevenueAccounts","description":"The revenue account number of a revenue group per VAT rate, for the accounting export. Each is optional; an empty one uses the workspace's accounting settings."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"Name of the group as the till and the reports show it, per language."},"parent_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent category (`cat_\u2026`); `null` = a top-level category."},"kind":{"anyOf":[{"type":"string","enum":["sales","reporting","recipe_group"]},{"type":"null"}],"title":"Kind","description":"What the group is for: `sales` = a product group on the till (the default), `reporting` = a revenue group the daily closing and the statistics total by, `recipe_group` = a group of recipes on the scale station."},"ordinal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ordinal","description":"Sort position among its siblings; lower comes first."},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Color","description":"Colour of the group's chip on the scale station, a hex RGB string (`#RRGGBB`); read for `recipe_group` only.","examples":["#2563eb"]},"i18n_meta":{"anyOf":[{"$ref":"#/components/schemas/CategoryI18nMetaIn"},{"type":"null"}],"description":"Translation hints for the texts; the server keeps the rest."},"cashassist_intern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashassist Intern","description":"Key of this group in the CashAssist till system it was imported from; `null` on a category made here."},"cashassist_kontonr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashassist Kontonr","description":"The group's number as the cashier sees it on a CashAssist till (`001`), a string that keeps its leading zeros; `null` on a category made here.","examples":["001"]},"card_discount_groups":{"anyOf":[{"items":{"$ref":"#/components/schemas/CategoryCardDiscount"},"type":"array"},{"type":"null"}],"title":"Card Discount Groups","description":"Revenue groups only: the loyalty-card discount per discount group; empty = none."},"revenue_accounts":{"anyOf":[{"$ref":"#/components/schemas/CategoryRevenueAccounts"},{"type":"null"}],"description":"Revenue groups only: the revenue account per VAT rate. Sent, it merges key by key into the stored one."},"available_days":{"anyOf":[{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array"},{"type":"null"}],"title":"Available Days","description":"Weekdays the group and its products are offered in the guest apps, as ISO weekday numbers 1 = Monday \u2026 7 = Sunday; `null` or empty = every day. Online ordering only: the till ignores it.","examples":[[1,2,3,4,5]]},"online_hidden":{"type":"boolean","title":"Online Hidden","description":"`true` keeps the group and its products out of both guest apps (QR menu and Click & Collect) on every day, whatever `available_days` says.","default":false},"online_visibility":{"anyOf":[{"$ref":"#/components/schemas/OnlineVisibility"},{"type":"null"}],"description":"Per guest app (QR menu, Click & Collect, delivery): shown, hidden, or only in some shops; left out = shown."},"online_time_windows":{"items":{"$ref":"#/components/schemas/OnlineTimeWindow"},"type":"array","title":"Online Time Windows","description":"Times of day the group is offered in the guest apps (breakfast 07:00\u201311:00); empty = all day. The weekday half is `available_days`."}},"additionalProperties":false,"type":"object","title":"CategoryUpdate","description":"Fields of a product group that may change; only the fields sent are changed."},"Combo":{"properties":{"price_difference_calc_mode":{"type":"string","enum":["none","move","reduction","move_with_total","difference_with_total"],"title":"Price Difference Calc Mode","description":"How the day's closing splits a menu's revenue onto its components' revenue groups: `none`, `move`, `reduction`, `move_with_total`, `difference_with_total`. The receipt total does not change.","default":"none"},"auto_pick_single":{"type":"boolean","title":"Auto Pick Single","description":"true: a step with exactly one candidate is picked by itself.","default":false},"is_menu_name":{"type":"boolean","title":"Is Menu Name","description":"true: the menu's name is on the bill.","default":false},"in_cafe_default":{"type":"boolean","title":"In Cafe Default","description":"true: the menu opens, and is priced, as eaten in.","default":false},"channel_locked":{"type":"boolean","title":"Channel Locked","description":"true: the cashier may not switch the menu between eating in and take-away.","default":false},"sets":{"items":{"$ref":"#/components/schemas/ComboSet"},"type":"array","title":"Sets","description":"The menu's steps; an article with one or more is a menu."}},"additionalProperties":false,"type":"object","title":"Combo","description":"A menu: an article with at least one selection slot in `sets` is a menu. `auto_pick_single` picks a slot's only candidate by itself. Optional."},"ComboFixedProduct":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The article (id) always part of the set."},"amount":{"type":"integer","title":"Amount","description":"How many.","default":1},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price","description":"Its price inside the set, in minor units; null = its own price."},"can_deselect":{"type":"boolean","title":"Can Deselect","description":"true: pre-selected, and the cashier may swap it for another candidate.","default":false}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"ComboFixedProduct","description":"An article a menu slot always includes, not chosen by the guest: `product_id`, its `amount`, and an optional `price` for it in this slot, in minor units."},"ComboSet":{"properties":{"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The step's name, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"component_ids":{"items":{"type":"string"},"type":"array","title":"Component Ids","description":"Hand-picked candidates (article ids); ignored when `layout_id` is set."},"layout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layout Id","description":"The till template (id) whose articles are the candidates; null = the hand-picked `component_ids`."},"min":{"type":"integer","title":"Min","description":"The fewest picks.","default":1},"max":{"type":"integer","title":"Max","description":"The most picks.","default":1},"price_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Level","description":"The price level a pick is charged at; null = its base price."},"course":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Course","description":"The course, 1 to 8."},"weekdays":{"items":{"type":"integer"},"type":"array","title":"Weekdays","description":"ISO weekdays the step is offered on, 1 = Monday to 7 = Sunday; empty = every day."},"collect_points":{"type":"boolean","title":"Collect Points","description":"true: picks earn loyalty points.","default":true},"fixed_products":{"items":{"$ref":"#/components/schemas/ComboFixedProduct"},"type":"array","title":"Fixed Products","description":"Articles always part of the set."}},"additionalProperties":false,"type":"object","title":"ComboSet","description":"One selection slot of a menu. Its candidates are the articles of a till layout (`layout_id`) or a hand-picked list (`component_ids`), with the fewest and most picks, the price level applied to the picks, and `fixed_products` always included. `course` is the course it is served in (1 to 8), and `weekdays` limit when it is offered."},"ConceptText":{"properties":{"ordinal":{"type":"integer","maximum":6.0,"minimum":2.0,"title":"Ordinal","description":"The concept these texts are for, 2 to 6 (concept 1 is the article's own texts)."},"product_name":{"type":"string","title":"Product Name","description":"The article's name in that concept.","default":""},"button_caption":{"type":"string","title":"Button Caption","description":"The till tile's label in that concept.","default":""},"name_in_order":{"type":"string","title":"Name In Order","description":"The kitchen ticket's line in that concept.","default":""},"sales_info":{"type":"string","title":"Sales Info","description":"The sales information for staff in that concept.","default":""}},"additionalProperties":false,"type":"object","required":["ordinal"],"title":"ConceptText","description":"One concept's texts for an article. A till set to concept N shows these instead of the article's own name, tile caption, kitchen ticket name and sales information; `ordinal` is that N, from 2, because concept 1 is the article's own texts. Texts only: a concept has no prices of its own."},"Concepts":{"properties":{"self_checkout":{"type":"boolean","title":"Self Checkout","description":"Offered on the self-checkout.","default":false},"click_and_collect":{"type":"boolean","title":"Click And Collect","description":"Offered in Click & Collect.","default":false},"min_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Age","description":"Minimum age of the buyer (age check); null or 0 = none."},"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Time Days","description":"Days of notice the online shop needs before the pickup day."},"online_min_qty":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Online Min Qty","description":"Smallest online order: pieces, or grams for a weighed good; null or 0 = none."},"online_max_qty":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Online Max Qty","description":"Largest online order: pieces, or grams for a weighed good; null or 0 = none."},"online_pickup_only":{"type":"boolean","title":"Online Pickup Only","description":"Webshop: pickup at a branch only, never shipped.","default":false},"online_upload":{"type":"boolean","title":"Online Upload","description":"Webshop: the guest adds a photo or logo (a photo cake), reviewed before production.","default":false}},"additionalProperties":false,"type":"object","title":"Concepts","description":"The article's settings for self-checkout, online ordering (Click & Collect, quantities, lead time, pickup only) and the minimum age to buy it (`min_age`). Optional."},"CopyFrom":{"properties":{"mode":{"type":"string","enum":["last_order","from_date","by_number"],"title":"Mode","description":"`last_order` the customer's latest order before the new day (a return or credit is passed over); `from_date` the latest order on `source_date`; `by_number` the order numbered `source_order_no`."},"source_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Source Date","description":"The delivery day to repeat, with `from_date`."},"source_order_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Order No","description":"The number of the order to repeat, with `by_number`."}},"additionalProperties":false,"type":"object","required":["mode"],"title":"CopyFrom","description":"The older order a new order repeats: the customer's latest order before the new day, the order on `source_date`, or the order numbered `source_order_no`. Its article lines are taken with their quantities and priced again for the new day, and so is its delivery line. `last_order` and `from_date` pass over a return or a credit. Example: `{\"mode\": \"last_order\"}` or `{\"mode\": \"by_number\", \"source_order_no\": \"10452\"}`."},"CorrespondenceLanguage":{"type":"string","enum":["en","de","fr","it"],"title":"CorrespondenceLanguage","description":"The language of the customer's documents and messages."},"CostReference":{"properties":{"master":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Master","description":"The other system's article master cost, in minor units."},"plan":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Plan","description":"The other system's planned cost of its newest production order, in minor units."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The unit both costs are for."},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","description":"The day of the order `plan` was read from, `YYYY-MM-DD`."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"The other system's name."}},"additionalProperties":false,"type":"object","title":"CostReference","description":"What another system says one unit of a produced article costs, kept beside RunMyHub's own calculation and never used by it: `master` is the article master's cost price, `plan` the planned cost of the newest production order. Minor units per one `unit` of the article, with decimals."},"CreatedOrderRow":{"properties":{"order_id":{"type":"string","title":"Order Id"},"order_no":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Order No"},"order_date":{"type":"string","title":"Order Date"},"order_type":{"type":"string","title":"Order Type","description":"`order`, `additional`, `return`, `credit`, `special`, `internet` or `catering`."},"till_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Till Kind","description":"The till booking kind, on an order booked at a till."},"erp_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Erp Kind","description":"The ERP document kind, on an order the `special` bucket does not name: a stock count, a loss, a conversion or a transfer."},"customer_id":{"type":"string","title":"Customer Id"},"customer_no":{"type":"string","title":"Customer No"},"customer_name":{"type":"string","title":"Customer Name"},"delivery_note_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Note Group"},"delivery_note_group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Note Group Name"},"total_gross":{"type":"integer","title":"Total Gross","description":"Minor units."},"total_net_before_discount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Net Before Discount"},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money"},"is_invoiced":{"type":"boolean","title":"Is Invoiced"},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"True for a cancelled order."},"source_owned":{"type":"boolean","title":"Source Owned"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"is_editable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Editable","description":"Present (false) only while another system keeps the workspace's order ledger."},"ledger_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ledger Owned"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Business"},"phone_mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Mobile"}},"type":"object","required":["order_id","order_no","order_date","order_type","customer_id","customer_no","customer_name","delivery_note_group","delivery_note_group_name","total_gross","is_invoiced","is_deleted","source_owned"],"title":"CreatedOrderRow","description":"The answer of `GET /v1/orders/{order_id}`: the order as one row of the order list, with its customer. It holds no lines: `GET /v1/orders` with the row's `customer_id` and `order_date` returns the whole order."},"CreationOptions":{"properties":{"ignore_days_to_produce":{"type":"boolean","title":"Ignore Days To Produce","description":"Take a line although the article needs more days to produce than are left before the delivery day.","default":false},"ignore_min_max":{"type":"boolean","title":"Ignore Min Max","description":"Take a line outside the customer's minimum or maximum quantity for the weekday (plain `order` types only).","default":false},"ignore_quantity_per_lot":{"type":"boolean","title":"Ignore Quantity Per Lot","description":"Take a quantity that is not a whole number of lots.","default":false},"ignore_splitting":{"type":"boolean","title":"Ignore Splitting","description":"Take a line whose `splitting` parts do not add up to its quantity.","default":false},"skip_only_affected":{"type":"boolean","title":"Skip Only Affected","description":"Leave out only the lines that break a rule (true), or refuse the whole order (false).","default":true}},"additionalProperties":false,"type":"object","title":"CreationOptions","description":"Checks an order write may skip. Each `ignore_*` flag turns one off: the lot size (`ignore_quantity_per_lot`), the days needed to produce (`ignore_days_to_produce`), the customer's minimum and maximum per article (`ignore_min_max`, from the customer's standing order for that weekday, on plain orders only) and the split of a line into part deliveries (`ignore_splitting`). With `skip_only_affected`, the default, a line that fails a check is left out and named in the warnings; without it the whole order is refused."},"CustomerAddress":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Recipient line above the street."},"addon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon","description":"Address addition (c/o, floor, department)."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and house number."},"pobox":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pobox","description":"P.O. box."},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Town or city."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as an ISO 3166 alpha-2 code, for example CH, DE, MT."},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat","description":"Latitude of the address, when known."},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng","description":"Longitude of the address, when known."}},"type":"object","title":"CustomerAddress","description":"A postal address as documents print it. `name` and `addon` are the\nrecipient lines above the street; on a delivery address they let a branch\nreceive the goods under its own name while the invoice goes to the company.\nLeft empty, a document names the customer."},"CustomerAddressInput":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Recipient line above the street. On the delivery address it lets a branch take the goods under its own name; empty, documents name the customer."},"addon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon","description":"Address addition (c/o, floor, department)."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and house number."},"pobox":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pobox","description":"P.O. box."},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Town or city."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as an ISO 3166 alpha-2 code, for example CH, DE, MT."},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat","description":"Latitude of the address, when known."},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng","description":"Longitude of the address, when known."}},"additionalProperties":false,"type":"object","title":"CustomerAddressInput","description":"A postal address. On a PATCH send only the parts that change: the address\nmerges key by key, and null clears a part."},"CustomerAssignmentInput":{"properties":{"mode":{"type":"string","enum":["all","only","except"],"title":"Mode","description":"`all` = every till; `only` = the regions, shops and tills listed; `except` = every till but those.","default":"all"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions","description":"Region ids (`reg_\u2026`)."},"shops":{"items":{"type":"string"},"type":"array","title":"Shops","description":"Shop ids (`shp_\u2026`)."},"pos":{"items":{"type":"string"},"type":"array","title":"Pos","description":"Till ids (`pos_\u2026`); prefer shops or regions."}},"additionalProperties":false,"type":"object","title":"CustomerAssignmentInput","description":"The tills the customer can be picked on. Mode `all` is every till."},"CustomerB2b":{"properties":{"rights":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Rights","description":"Each portal right, on or off."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"The customer's ordering settings in the portal."}},"type":"object","title":"CustomerB2b","description":"What the customer may do in the B2B ordering portal, as the business set it\nup for them."},"CustomerBank":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the bank."},"bin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bin","description":"Bank code or clearing number."},"account_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account No","description":"Account number."},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"IBAN."},"bic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bic","description":"BIC."},"mandate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mandate","description":"SEPA mandate reference."},"mandate_signed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mandate Signed","description":"The day the mandate was signed, YYYY-MM-DD."}},"type":"object","title":"CustomerBank","description":"One of the customer's own bank accounts, for direct debit (`wawi.bank`,\n`wawi.bank2`); `wawi.direct_debit_bank` says which one a direct debit draws\non. Every caller that may read customers reads it, an API key with\n`customers:read` included."},"CustomerBankInput":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the bank."},"bin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bin","description":"Bank code or clearing number."},"account_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account No","description":"Account number."},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"IBAN."},"bic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bic","description":"BIC."},"mandate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mandate","description":"SEPA mandate reference."},"mandate_signed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mandate Signed","description":"The day the mandate was signed, YYYY-MM-DD."}},"additionalProperties":false,"type":"object","title":"CustomerBankInput","description":"One of the customer's own bank accounts, for direct debit."},"CustomerContact":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The contact's id, stable for the customer."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Full name."},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"Salutation."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Their role, free text (accounting, purchasing)."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address documents are sent to."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone."},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile","description":"Mobile phone."},"lang":{"anyOf":[{"$ref":"#/components/schemas/CorrespondenceLanguage"},{"type":"null"}],"description":"The language of the covering e-mail for this person; empty, the document's own language."},"receives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Receives","description":"The documents this person gets without anyone picking them, for example `invoice`, `reminder`, `delivery_note`, `offer`. Empty: only when picked by hand."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"False for someone who left: kept for old documents, never sent to."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note."}},"type":"object","title":"CustomerContact","description":"One contact person at the customer, with the documents they receive."},"CustomerContactInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The contact's id. Send it back unchanged; a new contact gets one on save."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Full name."},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"Salutation."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Their role, free text (accounting, purchasing)."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address documents are sent to."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone."},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile","description":"Mobile phone."},"lang":{"anyOf":[{"$ref":"#/components/schemas/CorrespondenceLanguage"},{"type":"null"}],"description":"The language of the covering e-mail for this person; left out, the document's own language."},"receives":{"items":{"type":"string"},"type":"array","title":"Receives","description":"The documents this person gets without anyone picking them, for example `invoice`, `reminder`, `delivery_note`, `offer`. Empty: only when picked by hand."},"active":{"type":"boolean","title":"Active","description":"False for someone who left: kept for old documents, never sent to.","default":true},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note."}},"additionalProperties":false,"type":"object","title":"CustomerContactInput","description":"One contact person at the customer, with the documents they receive."},"CustomerContacts":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerContactInput"},"type":"array","title":"Items","description":"Every contact person, in display order."}},"additionalProperties":false,"type":"object","required":["items"],"title":"CustomerContacts","description":"The customer's contact persons. The list replaces the stored one whole."},"CustomerCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The person's or company's name."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company, when it differs from the name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number."},"address":{"anyOf":[{"$ref":"#/components/schemas/CustomerAddressInput"},{"type":"null"}],"description":"The billing address."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or UID number, printed on invoices."},"customer_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Customer Number","description":"The customer number. Leave it out to get the next free one; a number another customer holds answers 409."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"An internal note."},"active":{"type":"boolean","title":"Active","description":"Whether the customer can be picked for new documents.","default":true},"assignment":{"anyOf":[{"$ref":"#/components/schemas/CustomerAssignmentInput"},{"type":"null"}],"description":"The tills the customer can be picked on; left out, every till."},"payment":{"anyOf":[{"$ref":"#/components/schemas/CustomerPaymentTermsInput"},{"type":"null"}],"description":"Payment terms; the same as `wawi.payment`."},"wawi":{"anyOf":[{"$ref":"#/components/schemas/CustomerWawiInput"},{"type":"null"}],"description":"Master data for orders and invoices."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per translatable field (`wawi.notes.order`, `wawi.notes.invoice`): a context for machine translation and whether each language's text was machine-made or reviewed."},"collective_invoice_parent_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Collective Invoice Parent Id","description":"The customer whose invoice this customer's delivery notes are billed on (collective invoice). Left out, the customer is invoiced on its own."},"contacts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contacts Enabled","description":"Whether the editor shows the contact list instead of the two address fields. A display setting: it changes where no document goes."},"report_templates":{"anyOf":[{"$ref":"#/components/schemas/CustomerReportTemplatesInput"},{"type":"null"}],"description":"The customer's own version of each document, a report from the AI report designer printed instead of the form. Left out, every document prints its form."},"profile_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Profile Id","description":"A customer profile whose defaults fill the master data; the fields sent here win. Left out, the workspace's default profile applies. It must exist in the workspace."}},"additionalProperties":false,"type":"object","required":["name"],"title":"CustomerCreate","description":"A new customer. Only `name` is required; everything else can follow later."},"CustomerDeliveryCalendar":{"properties":{"regular":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerDeliveryWindow"},"type":"array"},{"type":"null"}],"title":"Regular","description":"Periods in which the customer takes deliveries."},"custom_weekdays":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerWeekdayWindow"},"type":"array"},{"type":"null"}],"title":"Custom Weekdays","description":"Periods with delivery days of their own."},"vacations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerVacation"},"type":"array"},{"type":"null"}],"title":"Vacations","description":"Periods without deliveries."}},"type":"object","title":"CustomerDeliveryCalendar","description":"The customer's delivery calendar: the periods it takes deliveries in, the\nperiods with delivery days of their own, and its vacations."},"CustomerDeliverySplitting":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether orders are split."},"parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parts","description":"Into how many part deliveries."}},"type":"object","title":"CustomerDeliverySplitting","description":"Whether each order is split into several part deliveries."},"CustomerDeliverySplittingInput":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether orders are split."},"parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parts","description":"Into how many part deliveries."}},"additionalProperties":false,"type":"object","title":"CustomerDeliverySplittingInput","description":"Split each order into several part deliveries."},"CustomerDeliveryWindow":{"properties":{"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date","description":"First day, YYYY-MM-DD."},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date","description":"Last day, YYYY-MM-DD."},"repeat_yearly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Repeat Yearly","description":"Whether it repeats every year."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What the period is for."},"default_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Profile Id","description":"The customer profile whose defaults apply during the period."}},"type":"object","title":"CustomerDeliveryWindow","description":"A period in which the customer takes deliveries."},"CustomerDiscountTier":{"properties":{"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The article group the percentage applies to; empty for all articles."},"tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier","description":"The discount's number in the previous system, kept for imported customers."},"pct":{"type":"number","title":"Pct","description":"The discount in percent, 10 = 10 %."}},"type":"object","required":["pct"],"title":"CustomerDiscountTier","description":"One discount of the customer: `pct` percent on the articles of the article\ngroup `group_id` (a group of kind `discount`). For the discount kind\n`all_articles` the single entry has no `group_id`."},"CustomerDiscountTierInput":{"properties":{"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The article group (a discount group) the percentage applies to. Empty only on the single entry that applies to all articles."},"tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier","description":"The discount's number in the legacy system, kept for imports."},"pct":{"type":"number","title":"Pct","description":"The discount in percent, 10 = 10 %."}},"additionalProperties":false,"type":"object","required":["pct"],"title":"CustomerDiscountTierInput","description":"One discount the customer gets on an article group."},"CustomerDisplayConfig":{"properties":{"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scale"},"order_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Rows"},"split_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Split Ratio"},"show_promo_panel":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Promo Panel"},"show_logo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Logo"},"preferred_display_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preferred Display Id"}},"additionalProperties":false,"type":"object","title":"CustomerDisplayConfig","description":"Size and branding settings of the customer display, the second screen at the till that the guest sees. Every field is optional; a setting left out uses the screen's own default."},"CustomerDistribution":{"properties":{"lower_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lower Pct","description":"The least the customer receives; 100 or more means never cut."},"higher_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Higher Pct","description":"The most the customer receives; 100 or less means never topped up."}},"type":"object","title":"CustomerDistribution","description":"How far a delivered quantity may differ from the ordered one when a batch\nis shared out between customers, in percent of the ordered quantity. An\nempty bound sets no limit on that side."},"CustomerDistributionInput":{"properties":{"lower_pct":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Lower Pct","description":"The least the customer receives, in percent of the ordered quantity; 100 or more means never cut."},"higher_pct":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Higher Pct","description":"The most the customer receives, in percent of the ordered quantity; 100 or less means never topped up."}},"additionalProperties":false,"type":"object","title":"CustomerDistributionInput","description":"How far a delivered quantity may differ from the ordered one when a batch is\nshared out between customers. Left out, that side has no limit."},"CustomerForms":{"properties":{"delivery_note_copies":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivery Note Copies","description":"Copies of each delivery note sent to the office printer; null prints one."},"invoice_copies":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Copies","description":"Copies of each invoice sent to the office printer; null prints one."},"reports":{"anyOf":[{"$ref":"#/components/schemas/CustomerReportForms"},{"type":"null"}],"description":"The form per document."}},"type":"object","title":"CustomerForms","description":"How the customer's documents are printed."},"CustomerFormsInput":{"properties":{"delivery_note_copies":{"anyOf":[{"type":"integer","maximum":99.0,"minimum":1.0},{"type":"null"}],"title":"Delivery Note Copies","description":"Copies of each delivery note sent to the office printer; null prints one. The printer's own copy count does not apply to a delivery note."},"invoice_copies":{"anyOf":[{"type":"integer","maximum":99.0,"minimum":1.0},{"type":"null"}],"title":"Invoice Copies","description":"Copies of each invoice sent to the office printer; null prints one. The printer's own copy count does not apply to an invoice."},"reports":{"anyOf":[{"$ref":"#/components/schemas/CustomerReportFormsInput"},{"type":"null"}],"description":"The form per document; a PATCH merges it form by form."}},"additionalProperties":false,"type":"object","title":"CustomerFormsInput","description":"How the customer's documents are printed."},"CustomerGroupCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The entry's name, unique in its directory regardless of case. Leading and trailing spaces are dropped; a name of spaces only is refused."},"active":{"type":"boolean","title":"Active","description":"Whether the pickers offer the entry. `false` retires it: the records that already name it keep it.","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"CustomerGroupCreate","description":"A new customer group. A customer names its group in `wawi.group_id`."},"CustomerGroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"The entry's name, unique in its directory regardless of case. Leading and trailing spaces are dropped; a name of spaces only is refused. May be left out, never null."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the pickers offer the entry. `false` retires it: the records that already name it keep it."}},"additionalProperties":false,"type":"object","title":"CustomerGroupUpdate","description":"A change to a customer group: a rename, or `active: false` to retire it\n(it leaves the pickers; the customers that carry it keep it)."},"CustomerListEntry":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The list's or the assortment group's id."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Its name."},"checked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checked","description":"True: the customer belongs to it."}},"type":"object","title":"CustomerListEntry","description":"The customer's membership of one customer list or assortment group."},"CustomerNotes":{"properties":{"order":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"string"},{"type":"null"}],"title":"Order","description":"Remark on the delivery note, per language (`{\"de\": \u2026, \"fr\": \u2026}`)."},"order2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order2","description":"Second remark on the delivery note."},"invoice":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"string"},{"type":"null"}],"title":"Invoice","description":"Remark on the invoice, per language."},"invoice2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice2","description":"Second remark on the invoice."}},"type":"object","title":"CustomerNotes","description":"Default remarks printed on the customer's documents. The order and invoice\nremarks are per language, so a document prints the one in the customer's\nlanguage, with German as the fallback; a plain string is German."},"CustomerNotesInput":{"properties":{"order":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"string"},{"type":"null"}],"title":"Order","description":"Remark on the delivery note, per language (`{\"de\": \u2026, \"fr\": \u2026}`); a plain string is the German text."},"order2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order2","description":"Second remark on the delivery note."},"invoice":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"string"},{"type":"null"}],"title":"Invoice","description":"Remark on the invoice, per language; a plain string is the German text."},"invoice2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice2","description":"Second remark on the invoice."}},"additionalProperties":false,"type":"object","title":"CustomerNotesInput","description":"Default remarks printed on the customer's documents."},"CustomerPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerRecord"},"type":"array","title":"Data","description":"The page's customers. With `summary=true` each row holds only the number, name, active, e-mail, group name, postcode and city."},"total":{"type":"integer","title":"Total","description":"Customers matching the filters across all pages, not only this one."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` to read the next page."}},"type":"object","required":["data","total","has_more"],"title":"CustomerPage","description":"One page of `GET /v1/customers`. Read the next one by passing `next_cursor`\nas `cursor`."},"CustomerPaymentTerms":{"properties":{"terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Days","description":"Days until an invoice is due."},"skonto_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Skonto Pct","description":"Cash discount in percent when paid within `skonto_days`."},"skonto_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skonto Days","description":"Days within which the cash discount applies."},"custom_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Text","description":"Free text for the payment terms, printed on the invoice."}},"type":"object","title":"CustomerPaymentTerms","description":"The customer's payment terms: an issued invoice takes its due date and its\nearly-payment discount from them."},"CustomerPaymentTermsInput":{"properties":{"terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Days","description":"Days until an invoice is due."},"skonto_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Skonto Pct","description":"Cash discount in percent when paid within `skonto_days`."},"skonto_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skonto Days","description":"Days within which the cash discount applies."},"custom_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Text","description":"Free text for the payment terms, printed on the invoice."}},"additionalProperties":false,"type":"object","title":"CustomerPaymentTermsInput","description":"The customer's payment conditions, printed on their invoices."},"CustomerRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"The customer's id (`cust_\u2026`)."},"name":{"type":"string","title":"Name","description":"The person's or company's name."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company, when it differs from the name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number."},"address":{"anyOf":[{"$ref":"#/components/schemas/CustomerAddress"},{"type":"null"}],"description":"The billing address."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or UID number, printed on invoices."},"customer_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Number","description":"The customer number."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"An internal note."},"active":{"type":"boolean","title":"Active","description":"Whether the customer can be picked for new documents.","default":true},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Output"},{"type":"null"}],"description":"The tills the customer can be picked on; empty, every till."},"wawi":{"anyOf":[{"$ref":"#/components/schemas/CustomerWawi"},{"type":"null"}],"description":"Business settings for orders and invoices."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Output"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"The translation state per translatable field (`wawi.notes.order`, `wawi.notes.invoice`): whether each language's text was machine-made or reviewed, and the context for machine translation."},"collective_invoice_parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collective Invoice Parent Id","description":"The customer whose invoice this customer's delivery notes are billed on (collective invoice). Empty, the customer is invoiced on its own."},"contacts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contacts Enabled","description":"Whether the customer's settings show the contact list instead of the two address fields. A display setting: it changes where no document goes."},"report_templates":{"anyOf":[{"$ref":"#/components/schemas/CustomerReportTemplates"},{"type":"null"}],"description":"The customer's own version of a document, per document."},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerContact"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"The contact persons (`PUT /v1/customers/{customer_id}/contacts`)."},"standing_order":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerStandingOrderLine"},"type":"array"},{"type":"null"}],"title":"Standing Order","description":"The weekly standing order a new order starts from."},"b2b":{"anyOf":[{"$ref":"#/components/schemas/CustomerB2b"},{"type":"null"}],"description":"The customer's B2B ordering portal settings."},"has_invoice_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Invoice Email","description":"Whether an invoice for the customer has an e-mail address to go to."},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"True when the workspace manages the customer in the system it imports its customers from: a change here is refused with 409 `source_owned`, and is made there."},"group_name":{"title":"Group Name","description":"In `GET /v1/customers` only: the name of the customer group (`wawi.group_id`), a string or a text per language (`{\"de\": \u2026}`). Absent when the customer has no group."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the customer belongs to."},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The version of the record's layout."},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Goes up by one with every change."},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"A hash of the record's content: it changes when the content does."},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Always false: a deleted customer is not read (404)."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, ISO 8601 UTC."}},"type":"object","required":["_id","name"],"title":"CustomerRecord","description":"A customer as `GET /v1/customers/{customer_id}` answers it, and as each row\nof `GET /v1/customers` holds it (the list adds `group_name`): everything\nstored on the customer. Fields the customer has no value for are left out."},"CustomerReportForms":{"properties":{"order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order","description":"The delivery-note form."},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice","description":"The invoice form."},"invoice_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Summary","description":"The collective-invoice form."},"payment_slip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Slip","description":"The payment-slip form."},"offer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offer","description":"The offer form."}},"type":"object","title":"CustomerReportForms","description":"Which form each of the customer's documents prints with, by the form's id."},"CustomerReportFormsInput":{"properties":{"order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order","description":"The delivery-note form."},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice","description":"The invoice form."},"invoice_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Summary","description":"The collective-invoice form."},"payment_slip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Slip","description":"The payment-slip form."},"offer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offer","description":"The offer form."}},"additionalProperties":false,"type":"object","title":"CustomerReportFormsInput","description":"Which form each document prints with, by the form's id."},"CustomerReportTemplates":{"properties":{"order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order","description":"The delivery note's own version."},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice","description":"The invoice's own version."},"invoice_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Summary","description":"The collective-invoice summary's own version."},"payment_slip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Slip","description":"The payment slip's own version."},"offer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offer","description":"The offer's own version."}},"type":"object","title":"CustomerReportTemplates","description":"The customer's own version of each document, keyed like the forms: the id\nof a report from the AI report designer (`/v1/ai-reports`) printed instead of\nthe layout of the customer's form, which still prints whenever the report\ncannot. A document left out prints its form."},"CustomerReportTemplatesInput":{"properties":{"order":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Order","description":"The delivery note's own version."},"invoice":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Invoice","description":"The invoice's own version."},"invoice_summary":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Invoice Summary","description":"The collective-invoice summary's own version."},"payment_slip":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Payment Slip","description":"The payment slip's own version."},"offer":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Offer","description":"The offer's own version."}},"additionalProperties":false,"type":"object","title":"CustomerReportTemplatesInput","description":"The customer's own version of a document: the id of one of the\nworkspace's own reports that prints one such document, printed instead of\nthe customer's form. The workspace makes these reports in the AI report\ndesigner; an id that cannot print the document is refused. Null clears one:\nthe form prints again."},"CustomerResellerPrice":{"properties":{"article_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Id","description":"The article."},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price","description":"The reseller price."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"A comment."}},"type":"object","title":"CustomerResellerPrice","description":"A reseller price agreed with the customer for one article."},"CustomerSpecialPrice":{"properties":{"article_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Id","description":"The article."},"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date","description":"First delivery day it applies to, YYYY-MM-DD; empty, no start."},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date","description":"Last delivery day it applies to, YYYY-MM-DD; empty, no end."},"type":{"anyOf":[{"$ref":"#/components/schemas/SpecialPriceType"},{"type":"null"}],"description":"What it overrides: the price, the discount or both, optionally from `from_qty` on."},"from_qty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"From Qty","description":"The quantity from which it applies."},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price","description":"The agreed price."},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount","description":"The agreed discount in percent."},"no_discount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Discount","description":"True: no other discount applies to this article."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"A comment."}},"type":"object","title":"CustomerSpecialPrice","description":"A price or discount agreed with the customer for one article, optionally\nfor a date range and from a quantity on. It wins over every other price."},"CustomerStandingOrderLine":{"properties":{"article_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Id","description":"The article; empty while an imported line's article is not linked."},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"The article number."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The article's name."},"qty":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Qty","description":"The quantity per weekday."},"min":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Min","description":"The least an order may hold, per weekday."},"max":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Max","description":"The most an order may hold, per weekday."},"split":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Split","description":"The part deliveries per weekday, `|`-separated parts: a quantity (`8`), a percentage (`40%`) or the rest (`r`)."},"sort":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort","description":"The line's place in the standing order."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note on the line."},"can_change":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Change","description":"False: the quantity cannot be changed on an order. Empty: it can."}},"type":"object","title":"CustomerStandingOrderLine","description":"One article of the customer's standing order: the quantity per weekday a\nnew order starts from. The weekday maps use the keys mo, di, mi, do, fr, sa\nand so."},"CustomerTour":{"properties":{"always":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Always","description":"Always on the tour plan, also on days without an order."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note for the driver, printed on the tour plan."},"weekday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlot"},{"type":"null"}],"description":"The tour Monday to Friday."},"saturday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlot"},{"type":"null"}],"description":"The tour on Saturday."},"sunday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlot"},{"type":"null"}],"description":"The tour on Sunday."}},"type":"object","title":"CustomerTour","description":"The customer's delivery tours: one slot each for Monday to Friday,\nSaturday and Sunday."},"CustomerTourInput":{"properties":{"always":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Always","description":"Always on the tour plan, also on days without an order."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note for the driver, printed on the tour plan."},"weekday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlotInput"},{"type":"null"}],"description":"The tour Monday to Friday."},"saturday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlotInput"},{"type":"null"}],"description":"The tour on Saturday."},"sunday":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourSlotInput"},{"type":"null"}],"description":"The tour on Sunday."}},"additionalProperties":false,"type":"object","title":"CustomerTourInput","description":"The customer's logistics. On a PATCH send only the slot that changes: the\nother slots and the note stay."},"CustomerTourSlot":{"properties":{"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id","description":"The tour plan (`GET /v1/orders/tours`)."},"plan_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Label","description":"The tour plan's name, as shown in lists."},"prep_area":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Area","description":"Where the customer's goods are staged."},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"Departure or delivery time, HH:MM."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"The customer's stop on the tour, 1 first."}},"type":"object","title":"CustomerTourSlot","description":"The delivery tour the customer is on for one kind of day."},"CustomerTourSlotInput":{"properties":{"plan_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Plan Id","description":"The tour plan (`GET /v1/orders/tours` lists them). It must exist in the workspace."},"plan_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Label","description":"The tour plan's name, as shown in lists."},"prep_area":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Area","description":"Where the customer's goods are staged."},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"Departure or delivery time, HH:MM."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"The customer's stop on the tour, 1 first."}},"additionalProperties":false,"type":"object","title":"CustomerTourSlotInput","description":"The tour the customer is delivered on, for one kind of day."},"CustomerUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"The person's or company's name."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company, when it differs from the name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number."},"address":{"anyOf":[{"$ref":"#/components/schemas/CustomerAddressInput"},{"type":"null"}],"description":"The billing address; merges key by key."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or UID number, printed on invoices."},"customer_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Customer Number","description":"The customer number; a number another customer holds answers 409."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"An internal note."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the customer can be picked for new documents."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/CustomerAssignmentInput"},{"type":"null"}],"description":"The tills the customer can be picked on; null = every till."},"payment":{"anyOf":[{"$ref":"#/components/schemas/CustomerPaymentTermsInput"},{"type":"null"}],"description":"Payment terms; merges into `wawi.payment`."},"wawi":{"anyOf":[{"$ref":"#/components/schemas/CustomerWawiInput"},{"type":"null"}],"description":"Master data for orders and invoices; merges key by key."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per translatable field (`wawi.notes.order`, `wawi.notes.invoice`), sent with a changed note."},"collective_invoice_parent_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Collective Invoice Parent Id","description":"The customer whose invoice this customer's delivery notes are billed on; null = invoiced on its own."},"contacts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contacts Enabled","description":"Whether the editor shows the contact list. A display setting."},"report_templates":{"anyOf":[{"$ref":"#/components/schemas/CustomerReportTemplatesInput"},{"type":"null"}],"description":"The customer's own version of each document; merges key by key, and null on a document clears it, so that document prints its form again."},"unset_wawi":{"anyOf":[{"items":{"type":"string","minLength":1},"type":"array"},{"type":"null"}],"title":"Unset Wawi","description":"Dotted paths inside `wawi` to clear, for example `[\"standard_order_template\"]`; the same as sending null at that path."}},"additionalProperties":false,"type":"object","title":"CustomerUpdate","description":"A change to a customer, as a JSON merge patch (RFC 7396): a field left out\nstays as it is, null clears it, and an object merges key by key at every depth,\nin `wawi` too. Null on `name`, `customer_number`, `active` or `wawi` is refused."},"CustomerVacation":{"properties":{"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date","description":"First day, YYYY-MM-DD."},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date","description":"Last day, YYYY-MM-DD."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What the period is for."}},"type":"object","title":"CustomerVacation","description":"A period in which the customer takes no deliveries."},"CustomerWawi":{"properties":{"address_kind":{"anyOf":[{"$ref":"#/components/schemas/AddressKind"},{"type":"null"}],"description":"`company`, `company_with_delivery` (a separate delivery address) or `private` (a private person)."},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"Salutation (Mr, Ms, Familie \u2026)."},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Surname, for a private person."},"name_internal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Internal","description":"An internal name, never printed."},"addon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon","description":"Name addition."},"gln":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gln","description":"Global Location Number of the customer."},"ship_to_gln":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ship To Gln","description":"Global Location Number of the separate delivery address."},"info_tip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Tip","description":"A short note shown with the customer in lists."},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The customer group (`GET /v1/customer-groups`)."},"delivery_note_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Note Group","description":"The delivery-note group."},"sub_company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Company Id","description":"The sub-company (branch) the customer belongs to, a free label."},"correspondence_language":{"anyOf":[{"$ref":"#/components/schemas/CorrespondenceLanguage"},{"type":"null"}],"description":"The language of the customer's documents: de, fr, it or en."},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person","description":"The contact person."},"phone_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Business","description":"Business phone."},"phone_business2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Business2","description":"Second business phone."},"phone_private":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Private","description":"Private phone."},"phone_mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Mobile","description":"Mobile phone."},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax","description":"Fax."},"email_for_invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email For Invoice","description":"Where invoices are e-mailed; several addresses separated by `;`."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website","description":"Website."},"delivery_address":{"anyOf":[{"$ref":"#/components/schemas/CustomerAddress"},{"type":"null"}],"description":"The separate delivery address, used when `address_kind` is `company_with_delivery`."},"price_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Group","description":"The price category: 0 or empty for none (the article's own price), else one of the workspace's price categories."},"sunday_price_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sunday Price Group","description":"The price category a Sunday delivery is priced from: 0 or empty for none (priced as on a weekday), else one of the workspace's price categories."},"tax_system":{"anyOf":[{"$ref":"#/components/schemas/TaxSystem"},{"type":"null"}],"description":"How VAT appears on the customer's documents."},"discount_kind":{"anyOf":[{"$ref":"#/components/schemas/DiscountKind"},{"type":"null"}],"description":"Which kind of discount applies."},"quantity_discount_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity Discount Id","description":"The quantity discount (`GET /v1/quantity-discounts`)."},"besr_bank_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Besr Bank Id","description":"The workspace's own bank the customer's invoices are drawn on, instead of the standard bank."},"issuer_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuer Profile Id","description":"The fiscal profile whose company issues the customer's invoices; `null` = the workspace's first profile."},"discounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerDiscountTier"},"type":"array"},{"type":"null"}],"title":"Discounts","description":"Discounts per article group."},"invoicing_interval":{"anyOf":[{"$ref":"#/components/schemas/InvoiceInterval"},{"type":"null"}],"description":"How often the customer is invoiced."},"settlement_mode":{"anyOf":[{"$ref":"#/components/schemas/SettlementMode"},{"type":"null"}],"description":"Who issues the settlement document for the customer's deliveries: `invoice` (we invoice them; empty means this) or `customer_credit_note` (self-billing: the customer settles them with its own credit note, deliveries minus returns, and pays that)."},"debitor_status":{"anyOf":[{"$ref":"#/components/schemas/DebitorStatus"},{"type":"null"}],"description":"Whether an invoice opens a receivable."},"einvoice_format":{"anyOf":[{"$ref":"#/components/schemas/EInvoiceFormat"},{"type":"null"}],"description":"The e-invoice format."},"einvoice_routing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Einvoice Routing","description":"The e-invoice routing id (Leitweg-ID)."},"einvoice_seller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Einvoice Seller Id","description":"The number this customer gave you as its supplier (its creditor number for you); the e-invoice carries it as the seller identifier BT-29."},"ebill_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ebill Account","description":"The customer's eBill participant id."},"payment":{"anyOf":[{"$ref":"#/components/schemas/CustomerPaymentTerms"},{"type":"null"}],"description":"Payment terms."},"debtor_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Debtor Account","description":"The customer's receivables account."},"income_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Account","description":"The revenue account."},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center","description":"The cost center."},"return_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Return Limit","description":"The most the customer's returns may credit, in percent of the delivered net value; enforced when a bill is created from orders. Null, negative or 100 and above: no limit."},"direct_debit_bank":{"anyOf":[{"$ref":"#/components/schemas/DirectDebitBank"},{"type":"null"}],"description":"Which of the two bank accounts a direct debit draws on."},"bank":{"anyOf":[{"$ref":"#/components/schemas/CustomerBank"},{"type":"null"}],"description":"The first bank account."},"bank2":{"anyOf":[{"$ref":"#/components/schemas/CustomerBank"},{"type":"null"}],"description":"The second bank account."},"delivery_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Delivery Days","description":"The days the customer is delivered, `{\"mo\": true, \u2026, \"so\": false}` with the keys mo, di, mi, do, fr, sa, so. Empty, every day."},"standard_order_template":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Standard Order Template","description":"The customer whose standing order this customer uses, by id. An imported customer whose template customer is not imported yet holds that customer's number."},"default_order_source":{"anyOf":[{"$ref":"#/components/schemas/DefaultOrderSource"},{"type":"null"}],"description":"What a new order is filled from."},"auto_order":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Order","description":"Whether orders are created automatically each night."},"delivery_splitting":{"anyOf":[{"$ref":"#/components/schemas/CustomerDeliverySplitting"},{"type":"null"}],"description":"Part deliveries."},"flexible_orders":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Flexible Orders","description":"Whether ordered quantities may be changed."},"distribution":{"anyOf":[{"$ref":"#/components/schemas/CustomerDistribution"},{"type":"null"}],"description":"How far a delivered quantity may differ from the ordered one."},"transport_sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport Sector Id","description":"The transport sector."},"tour":{"anyOf":[{"$ref":"#/components/schemas/CustomerTour"},{"type":"null"}],"description":"The tours the customer is delivered on."},"notes":{"anyOf":[{"$ref":"#/components/schemas/CustomerNotes"},{"type":"null"}],"description":"Remarks printed on documents."},"forms":{"anyOf":[{"$ref":"#/components/schemas/CustomerForms"},{"type":"null"}],"description":"How documents are printed."},"is_cashassist_credit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cashassist Credit","description":"Whether the customer is a credit customer at the till."},"ca_price_source":{"anyOf":[{"$ref":"#/components/schemas/CashAssistPriceSource"},{"type":"null"}],"description":"Where the till takes the customer's price and discount from."},"ca_special_discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ca Special Discount","description":"A special discount at the till, in percent."},"one_time":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Time","description":"A walk-in customer, created for one document."},"slip_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slip Reference","description":"A free external reference, matched by the XML order import."},"special_prices":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerSpecialPrice"},"type":"array"},{"type":"null"}],"title":"Special Prices","description":"Prices and discounts agreed per article (`PUT \u2026/special-prices`)."},"reseller_prices":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerResellerPrice"},"type":"array"},{"type":"null"}],"title":"Reseller Prices","description":"Reseller prices per article (`PUT \u2026/reseller-prices`)."},"delivery_periods":{"anyOf":[{"$ref":"#/components/schemas/CustomerDeliveryCalendar"},{"type":"null"}],"description":"The delivery calendar (`PUT \u2026/delivery-periods`)."},"lists":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerListEntry"},"type":"array"},{"type":"null"}],"title":"Lists","description":"The customer lists the customer belongs to (`PUT \u2026/lists`)."},"assortment_groups":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerListEntry"},"type":"array"},{"type":"null"}],"title":"Assortment Groups","description":"The assortment groups that apply to the customer (`PUT \u2026/assortment-groups`)."}},"type":"object","title":"CustomerWawi","description":"The customer's business settings, the `wawi` block (named after the\nordering system these settings were taken over from): ordering, delivery,\nbilling, prices, discounts, documents, and the customer's embedded lists. A\nchange is merged in (`PATCH /v1/customers/{customer_id}`); each embedded\nlist has its own `PUT /v1/customers/{customer_id}/<list>` (special-prices,\nreseller-prices, delivery-periods, lists, assortment-groups)."},"CustomerWawiInput":{"properties":{"address_kind":{"anyOf":[{"$ref":"#/components/schemas/AddressKind"},{"type":"null"}],"description":"`company`, `company_with_delivery` (a separate delivery address) or `private` (a private person)."},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"Salutation (Mr, Ms, Familie \u2026)."},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Surname, for a private person."},"name_internal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Internal","description":"An internal name, never printed."},"addon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon","description":"Name addition."},"gln":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gln","description":"Global Location Number of the customer."},"ship_to_gln":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ship To Gln","description":"Global Location Number of the separate delivery address."},"info_tip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Tip","description":"A short note shown with the customer in lists."},"group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Group Id","description":"The customer group (`GET /v1/customer-groups`). It must exist in the workspace."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group","description":"Legacy: the group's name, as old imports stored it. Read only by imports."},"delivery_note_group":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Delivery Note Group","description":"The delivery-note group. It must exist in the workspace."},"sub_company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Company Id","description":"The sub-company (branch) the customer belongs to, a free label."},"correspondence_language":{"anyOf":[{"$ref":"#/components/schemas/CorrespondenceLanguage"},{"type":"null"}],"description":"The language of the customer's documents: de, fr, it or en."},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person","description":"The contact person."},"phone_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Business","description":"Business phone."},"phone_business2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Business2","description":"Second business phone."},"phone_private":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Private","description":"Private phone."},"phone_mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Mobile","description":"Mobile phone."},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax","description":"Fax."},"email_for_invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email For Invoice","description":"Where invoices are e-mailed; several addresses separated by `;`."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website","description":"Website."},"delivery_address":{"anyOf":[{"$ref":"#/components/schemas/CustomerAddressInput"},{"type":"null"}],"description":"The separate delivery address, used when `address_kind` is `company_with_delivery`."},"price_group":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Group","description":"The price category: 0 for none (the article's own price applies), else one of the workspace's categories: its category number where the categories are numbered, else the position among the active `GET /v1/price-levels`, 1 first."},"sunday_price_group":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sunday Price Group","description":"The price category a delivery on a Sunday is priced from, numbered as `price_group`; an article with no price in it is priced from `price_group`. 0 or null for none: a Sunday is priced as a weekday. An exception day that counts as a Sunday counts too."},"tax_system":{"anyOf":[{"$ref":"#/components/schemas/TaxSystem"},{"type":"null"}],"description":"How VAT is shown: `included_vat`, `excluded_vat`, `no_vat` (VAT-exempt) or `individual_for_customer`."},"discount_kind":{"anyOf":[{"$ref":"#/components/schemas/DiscountKind"},{"type":"null"}],"description":"Which kind of discount applies to the customer."},"quantity_discount_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity Discount Id","description":"The quantity discount (`GET /v1/quantity-discounts`)."},"besr_bank_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Besr Bank Id","description":"The workspace's bank the customer's invoices are drawn on, instead of the standard bank. It must exist in the workspace."},"issuer_profile_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Issuer Profile Id","description":"The fiscal profile (`GET /v1/fiscal-profiles`) whose company issues the customer's invoices; `null` = the workspace's first profile. It must exist in the workspace."},"discounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerDiscountTierInput"},"type":"array"},{"type":"null"}],"title":"Discounts","description":"Discounts per article group; a list replaces the stored one whole."},"invoicing_interval":{"anyOf":[{"$ref":"#/components/schemas/InvoiceInterval"},{"type":"null"}],"description":"How often the customer is invoiced."},"settlement_mode":{"anyOf":[{"$ref":"#/components/schemas/SettlementMode"},{"type":"null"}],"description":"Who issues the settlement document for the customer's deliveries: `invoice` (we invoice them; empty means this) or `customer_credit_note` (self-billing: the customer settles them with its own credit note, deliveries minus returns, and pays that)."},"debitor_status":{"anyOf":[{"$ref":"#/components/schemas/DebitorStatus"},{"type":"null"}],"description":"Whether an invoice opens a receivable: `debitor`, `no_debitor`, `internal`."},"einvoice_format":{"anyOf":[{"$ref":"#/components/schemas/EInvoiceFormat"},{"type":"null"}],"description":"The e-invoice format: `none`, `pdf_xrechnung`, `xrechnung`, `zugferd`."},"einvoice_routing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Einvoice Routing","description":"The e-invoice routing id (Leitweg-ID)."},"einvoice_seller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Einvoice Seller Id","description":"The number this customer gave you as its supplier (its creditor number for you); the e-invoice carries it as the seller identifier BT-29."},"ebill_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ebill Account","description":"The customer's eBill participant id, up to 40 characters."},"payment":{"anyOf":[{"$ref":"#/components/schemas/CustomerPaymentTermsInput"},{"type":"null"}],"description":"Payment terms."},"debtor_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Debtor Account","description":"The customer's receivables account."},"income_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Account","description":"The revenue account."},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center","description":"The cost center."},"return_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Return Limit","description":"The most the customer's returns may credit, in percent of the delivered net value; enforced when a bill is created from orders. Null, negative or 100 and above: no limit."},"direct_debit_bank":{"anyOf":[{"$ref":"#/components/schemas/DirectDebitBank"},{"type":"null"}],"description":"Which of the two bank accounts a direct debit draws on."},"bank":{"anyOf":[{"$ref":"#/components/schemas/CustomerBankInput"},{"type":"null"}],"description":"The first bank account."},"bank2":{"anyOf":[{"$ref":"#/components/schemas/CustomerBankInput"},{"type":"null"}],"description":"The second bank account."},"delivery_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"propertyNames":{"enum":["mo","di","mi","do","fr","sa","so"]},"type":"object"},{"type":"null"}],"title":"Delivery Days","description":"The days the customer is delivered, `{\"mo\": true, \u2026, \"so\": false}` with the keys mo, di, mi, do, fr, sa, so. Left out, every day."},"standard_order_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard Order Template","description":"The customer whose standing order this customer uses."},"default_order_source":{"anyOf":[{"$ref":"#/components/schemas/DefaultOrderSource"},{"type":"null"}],"description":"What a new order is filled from."},"auto_order":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Order","description":"Whether orders are created automatically each night."},"delivery_splitting":{"anyOf":[{"$ref":"#/components/schemas/CustomerDeliverySplittingInput"},{"type":"null"}],"description":"Part deliveries."},"flexible_orders":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Flexible Orders","description":"Whether ordered quantities may be changed."},"distribution":{"anyOf":[{"$ref":"#/components/schemas/CustomerDistributionInput"},{"type":"null"}],"description":"How far a delivered quantity may differ from the ordered one."},"transport_sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport Sector Id","description":"The transport sector."},"tour":{"anyOf":[{"$ref":"#/components/schemas/CustomerTourInput"},{"type":"null"}],"description":"The tours the customer is delivered on."},"notes":{"anyOf":[{"$ref":"#/components/schemas/CustomerNotesInput"},{"type":"null"}],"description":"Remarks printed on documents."},"forms":{"anyOf":[{"$ref":"#/components/schemas/CustomerFormsInput"},{"type":"null"}],"description":"How documents are printed."},"is_cashassist_credit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cashassist Credit","description":"Whether the customer is a credit customer at the till."},"ca_price_source":{"anyOf":[{"$ref":"#/components/schemas/CashAssistPriceSource"},{"type":"null"}],"description":"Where the till takes the customer's price and discount from."},"ca_special_discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ca Special Discount","description":"A special discount at the till, in percent."},"one_time":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Time","description":"A walk-in customer, created for one document. Set to false to make the customer a regular one, which gives it a regular customer number."},"slip_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slip Reference","description":"A free external reference, matched by the XML order import."}},"additionalProperties":false,"type":"object","title":"CustomerWawiInput","description":"The customer's master data for orders, delivery notes and invoices. On a\nPATCH it merges key by key at every depth: send only what changes, and null to\nclear a field. The embedded tabs are not part of it; each has its own\n`PUT /v1/customers/{customer_id}/<tab>` (special-prices, reseller-prices,\ndelivery-periods, lists, assortment-groups)."},"CustomerWeekdayWindow":{"properties":{"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date","description":"First day, YYYY-MM-DD."},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date","description":"Last day, YYYY-MM-DD."},"repeat_yearly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Repeat Yearly","description":"Whether it repeats every year."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What the period is for."},"default_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Profile Id","description":"The customer profile whose defaults apply during the period."},"mo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mo","description":"Delivered on Monday."},"di":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Di","description":"Delivered on Tuesday."},"mi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mi","description":"Delivered on Wednesday."},"do":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Do","description":"Delivered on Thursday."},"fr":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fr","description":"Delivered on Friday."},"sa":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sa","description":"Delivered on Saturday."},"so":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"So","description":"Delivered on Sunday."}},"type":"object","title":"CustomerWeekdayWindow","description":"A period with delivery days of its own: on each weekday flag that is true\nthe customer is delivered while the period lasts."},"DebitorStatus":{"type":"string","enum":["debitor","no_debitor","internal"],"title":"DebitorStatus","description":"Whether the customer's invoices open a receivable: `debitor` (yes), `no_debitor` (no) or `internal` (an internal invoice)."},"Declaration-Input":{"properties":{"ingredients":{"additionalProperties":{"type":"string"},"type":"object","title":"Ingredients","description":"The ingredient list, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"allergens":{"items":{"type":"string"},"type":"array","title":"Allergens","description":"Allergens it contains, as keys (`gluten`, `milk`, `eggs`, \u2026); the label emphasises them."},"can_contain_traces_of":{"items":{"type":"string"},"type":"array","title":"Can Contain Traces Of","description":"Allergens it may contain traces of, as keys."},"nutrition_per_100g":{"anyOf":[{"$ref":"#/components/schemas/NutritionPer100g-Input"},{"type":"null"}],"description":"The nutrition table per 100 g or ml."},"vitamins":{"items":{"$ref":"#/components/schemas/Micronutrient"},"type":"array","title":"Vitamins","description":"Declared vitamins, per 100 g or ml."},"minerals":{"items":{"$ref":"#/components/schemas/Micronutrient"},"type":"array","title":"Minerals","description":"Declared minerals, per 100 g or ml."},"additives":{"items":{"$ref":"#/components/schemas/Additive"},"type":"array","title":"Additives","description":"Declared additives."},"net_quantity":{"anyOf":[{"$ref":"#/components/schemas/NetQuantity"},{"type":"null"}],"description":"The net quantity the label's unit price is computed from."},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country","description":"The country of production, as the label prints it."},"sell_by_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sell By Days","description":"Days from printing to the sell-by date."},"best_before_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Before Days","description":"Days from printing to the best-before or use-by date."},"shelf_life_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Shelf Life Days","description":"Days the article keeps."},"to_move_till_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Move Till Days","description":"Days until the article must be moved off the shelf."},"special_symbols":{"items":{"type":"string"},"type":"array","title":"Special Symbols","description":"Symbols the label prints as an icon row, as keys (`bio`, `vegan`, \u2026)."},"must_be_kept_cool":{"type":"boolean","title":"Must Be Kept Cool","description":"true: the label says keep cool.","default":false},"storage":{"additionalProperties":{"type":"string"},"type":"object","title":"Storage","description":"The storage hint, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"preparation":{"additionalProperties":{"type":"string"},"type":"object","title":"Preparation","description":"Preparation or serving instructions, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"sales_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Sales Info","description":"Sales information for staff, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"consumer_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Consumer Info","description":"Consumption information for the customer, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"quality_characteristics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Characteristics","description":"Quality characteristics, as the label prints them."},"storage_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions","description":"Storage conditions, as the label prints them."},"fbo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fbo","description":"The food business operator the label names; null = the company's name."},"legal_name":{"additionalProperties":{"type":"string"},"type":"object","title":"Legal Name","description":"The legal designation of the food, per language; distinct from the name.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"alt_weight_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alt Weight G","description":"An alternative sale weight in grams for the label's unit price, so a piece good can show a price per kg."},"sale_weight_g":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sale Weight G","description":"The sale weight in grams the label prints; 0 = none, so the label prints neither a weight nor a unit price."}},"additionalProperties":false,"type":"object","title":"Declaration","description":"The food declaration of an article, which its labels print: ingredients, allergens, traces, additives, nutrition values, storage and origin. Allergens use the fixed EU list, which the label translates and highlights. `sell_by_days` and `best_before_days` set those dates from the day of printing. Optional."},"Declaration-Output":{"properties":{"ingredients":{"additionalProperties":{"type":"string"},"type":"object","title":"Ingredients","description":"The ingredient list, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"allergens":{"items":{"type":"string"},"type":"array","title":"Allergens","description":"Allergens it contains, as keys (`gluten`, `milk`, `eggs`, \u2026); the label emphasises them."},"can_contain_traces_of":{"items":{"type":"string"},"type":"array","title":"Can Contain Traces Of","description":"Allergens it may contain traces of, as keys."},"nutrition_per_100g":{"anyOf":[{"$ref":"#/components/schemas/NutritionPer100g-Output"},{"type":"null"}],"description":"The nutrition table per 100 g or ml."},"vitamins":{"items":{"$ref":"#/components/schemas/Micronutrient"},"type":"array","title":"Vitamins","description":"Declared vitamins, per 100 g or ml."},"minerals":{"items":{"$ref":"#/components/schemas/Micronutrient"},"type":"array","title":"Minerals","description":"Declared minerals, per 100 g or ml."},"additives":{"items":{"$ref":"#/components/schemas/Additive"},"type":"array","title":"Additives","description":"Declared additives."},"net_quantity":{"anyOf":[{"$ref":"#/components/schemas/NetQuantity"},{"type":"null"}],"description":"The net quantity the label's unit price is computed from."},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country","description":"The country of production, as the label prints it."},"sell_by_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sell By Days","description":"Days from printing to the sell-by date."},"best_before_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Before Days","description":"Days from printing to the best-before or use-by date."},"shelf_life_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Shelf Life Days","description":"Days the article keeps."},"to_move_till_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Move Till Days","description":"Days until the article must be moved off the shelf."},"special_symbols":{"items":{"type":"string"},"type":"array","title":"Special Symbols","description":"Symbols the label prints as an icon row, as keys (`bio`, `vegan`, \u2026)."},"must_be_kept_cool":{"type":"boolean","title":"Must Be Kept Cool","description":"true: the label says keep cool.","default":false},"storage":{"additionalProperties":{"type":"string"},"type":"object","title":"Storage","description":"The storage hint, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"preparation":{"additionalProperties":{"type":"string"},"type":"object","title":"Preparation","description":"Preparation or serving instructions, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"sales_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Sales Info","description":"Sales information for staff, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"consumer_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Consumer Info","description":"Consumption information for the customer, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"quality_characteristics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Characteristics","description":"Quality characteristics, as the label prints them."},"storage_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions","description":"Storage conditions, as the label prints them."},"fbo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fbo","description":"The food business operator the label names; null = the company's name."},"legal_name":{"additionalProperties":{"type":"string"},"type":"object","title":"Legal Name","description":"The legal designation of the food, per language; distinct from the name.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"alt_weight_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alt Weight G","description":"An alternative sale weight in grams for the label's unit price, so a piece good can show a price per kg."},"sale_weight_g":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sale Weight G","description":"The sale weight in grams the label prints; 0 = none, so the label prints neither a weight nor a unit price."}},"additionalProperties":false,"type":"object","title":"Declaration","description":"The food declaration of an article, which its labels print: ingredients, allergens, traces, additives, nutrition values, storage and origin. Allergens use the fixed EU list, which the label translates and highlights. `sell_by_days` and `best_before_days` set those dates from the day of printing. Optional."},"DefaultOrder":{"properties":{"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"The customer who orders it."},"mon":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mon","description":"Quantity ordered every Monday."},"tue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tue","description":"Quantity ordered every Tuesday."},"wed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wed","description":"Quantity ordered every Wednesday."},"thu":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thu","description":"Quantity ordered every Thursday."},"fri":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fri","description":"Quantity ordered every Friday."},"sat":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sat","description":"Quantity ordered every Saturday."},"sun":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sun","description":"Quantity ordered every Sunday."},"order_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Limit","description":"The most the customer may order; null = no limit."},"partial_delivery":{"type":"boolean","title":"Partial Delivery","description":"true allows delivering part of the quantity.","default":false},"locked":{"type":"boolean","title":"Locked","description":"true: the standing order may not be changed.","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A free note."}},"additionalProperties":false,"type":"object","title":"DefaultOrder","description":"Retired: an article's own list of customers' weekly quantities, never used to make an order. A quantity per weekday, an optional order limit and delivery flags."},"DefaultOrderSource":{"type":"string","enum":["default_order","week_ago","last_order","empty"],"title":"DefaultOrderSource","description":"What a new order for the customer starts from: the standing order (`default_order`), the order of one week ago (`week_ago`), the last order (`last_order`) or nothing (`empty`)."},"Deposit":{"properties":{"deposit_product_id":{"type":"string","title":"Deposit Product Id","description":"The deposit article (id) added as a second line when this one is sold."}},"additionalProperties":false,"type":"object","required":["deposit_product_id"],"title":"Deposit","description":"A deposit added as its own line whenever the article is sold, such as a bottle deposit (`deposit_product_id`). A refund or void takes both back together."},"DirectDebitBank":{"type":"string","enum":["no_bank","bank1_dta","bank2_dta","manual"],"title":"DirectDebitBank","description":"Which of the customer's stored bank accounts a direct debit uses: `bank1_dta` (`wawi.bank`), `bank2_dta` (`wawi.bank2`), `manual`, or `no_bank` for none."},"DiscountCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the discount as the till's button and the receipt show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"type":{"type":"string","const":"percent","title":"Type","description":"`percent` is the only kind a new discount may have: `value` is then a percentage. A discount stored before that rule may still read back as `fixed`, with `value` an amount in minor units.","default":"percent"},"value":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Value","description":"The discount as a percentage in basis points: 1000 = 10 %, 500 = 5 %, 10000 = 100 %; a whole number from 0 to 10000.","default":0,"examples":[1000]}},"additionalProperties":false,"type":"object","required":["name"],"title":"DiscountCreate","description":"A named discount the till offers at checkout: a percent off the price, `value` in basis points (1000 = 10 %, 500 = 5 %). A layout's discount tile names it, and a shop lists the discounts it offers. A sale keeps its own copy of the discount it applied."},"DiscountGroupCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"type":"string","maxLength":64,"title":"Name","description":"The group's name as the back office shows it, at most 64 characters; empty = shown as the group's number.","default":""},"ordinal":{"type":"integer","minimum":0.0,"title":"Ordinal","description":"The group's number, which a loyalty card names in its `discount_group` and an article's card discounts name per group; unique in the workspace. Left out or 0: one past the highest number in the workspace.","default":0},"active":{"type":"boolean","title":"Active","description":"Whether the group is offered; `false` keeps it for the cards that hold it.","default":true}},"additionalProperties":false,"type":"object","title":"DiscountGroupCreate","description":"A discount group: a numbered group a loyalty card belongs to. An article or a\nrevenue group sets a discount percent per group."},"DiscountGroupPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DiscountGroupRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"DiscountGroupPage"},"DiscountGroupRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"type":"string","maxLength":64,"title":"Name","description":"The group's name as the back office shows it, at most 64 characters; empty = shown as the group's number.","default":""},"ordinal":{"type":"integer","minimum":0.0,"title":"Ordinal","description":"The group's number, which a loyalty card names in its `discount_group` and an article's card discounts name per group; unique in the workspace. Left out or 0: one past the highest number in the workspace.","default":0},"active":{"type":"boolean","title":"Active","description":"Whether the group is offered; `false` keeps it for the cards that hold it.","default":true}},"type":"object","required":["_id"],"title":"DiscountGroupRecord"},"DiscountGroupUpdate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Name","description":"The group's name as the back office shows it, at most 64 characters; empty = shown as the group's number. May be left out, never null."},"ordinal":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Ordinal","description":"The group's number, which a loyalty card names in its `discount_group` and an article's card discounts name per group; unique in the workspace. May be left out, never null."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the group is offered; `false` keeps it for the cards that hold it. May be left out, never null."}},"additionalProperties":false,"type":"object","title":"DiscountGroupUpdate","description":"A change to a discount group: only the fields sent change."},"DiscountKind":{"type":"string","enum":["no_discount","all_articles","article_groups","price_reduce","quantity_discount","quantity_discount_groups"],"title":"DiscountKind","description":"Which discount the customer gets: `no_discount`; `all_articles`, one percent on everything (the first entry of `discounts`); `article_groups`, a percent per article group (in `discounts`); `price_reduce`, a price reduction set like `article_groups`; `quantity_discount`, a quantity discount scale (`GET /v1/quantity-discounts`); or `quantity_discount_groups`, a quantity discount per group."},"DiscountPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DiscountRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"DiscountPage"},"DiscountRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the discount as the till's button and the receipt show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"type":{"type":"string","const":"percent","title":"Type","description":"`percent` is the only kind a new discount may have: `value` is then a percentage. A discount stored before that rule may still read back as `fixed`, with `value` an amount in minor units.","default":"percent"},"value":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Value","description":"The discount as a percentage in basis points: 1000 = 10 %, 500 = 5 %, 10000 = 100 %; a whole number from 0 to 10000.","default":0,"examples":[1000]}},"type":"object","required":["_id","name"],"title":"DiscountRecord"},"DiscountUpdate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"Name of the discount as the till's button and the receipt show it, per language. May be left out, never null."},"type":{"anyOf":[{"type":"string","const":"percent"},{"type":"null"}],"title":"Type","description":"`percent` is the only kind a new discount may have: `value` is then a percentage. A discount stored before that rule may still read back as `fixed`, with `value` an amount in minor units. May be left out, never null."},"value":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Value","description":"The discount as a percentage in basis points: 1000 = 10 %, 500 = 5 %, 10000 = 100 %; a whole number from 0 to 10000. May be left out, never null.","examples":[1000]}},"additionalProperties":false,"type":"object","title":"DiscountUpdate","description":"Fields of a discount that may change; only the fields sent are changed."},"Display":{"properties":{"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"The till tile's colour, `#RRGGBB`; null = the layout's or category's."},"font_style":{"anyOf":[{"type":"string","enum":["normal","bold","italic","bold_italic"]},{"type":"null"}],"title":"Font Style","description":"The tile title's style; null = the default."}},"additionalProperties":false,"type":"object","title":"Display","description":"How the article's tile looks on the till: `color` fills the tile and `font_style` sets the title's weight and slant. Optional; without it the tile takes the style of its layout or category."},"EInvoiceFormat":{"type":"string","enum":["none","pdf_xrechnung","xrechnung","zugferd"],"title":"EInvoiceFormat","description":"The structured e-invoice the customer receives: `none`, `zugferd`, `xrechnung`, or `pdf_xrechnung` (XRechnung together with the PDF)."},"EmbeddedBarcode":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"The leading digits that mark a scale barcode, e.g. `21`."},"weight_digits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight Digits","description":"How many digits carry the weight."},"price_digits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Digits","description":"How many digits carry the price, in minor units."},"divisor":{"type":"integer","title":"Divisor","description":"Divides the weight digits: 1000 turns grams into kg.","default":1000}},"additionalProperties":false,"type":"object","title":"EmbeddedBarcode","description":"How the till reads a scale barcode: `prefix` marks a barcode as one, and its digits carry either the weight or the price. `divisor` scales the weight (1000 turns grams into kilograms); a price is read as minor units."},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable code. Branch on this, never on the message. Each operation lists the codes it can answer, per status."},"message":{"type":"string","title":"Message","description":"What went wrong, in words for the person reading the log. The wording may change."},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Structured data that some codes carry, such as the warnings of a refused write. Absent when the code carries none."}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"What went wrong: a stable code to branch on and a message for a person."},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody","description":"The error."}},"type":"object","required":["error"],"title":"ErrorEnvelope","description":"The body of every error answer."},"FeedDay":{"properties":{"date":{"type":"string","title":"Date","description":"Calendar day, YYYY-MM-DD."},"complete":{"type":"boolean","title":"Complete","description":"True once the day is over in the workspace's time zone. Receipts that arrive late can still change a complete day, so re-read the last few days on every poll."}},"type":"object","required":["date","complete"],"title":"FeedDay"},"FeedShop":{"properties":{"shop_id":{"type":"string","title":"Shop Id","description":"The shop's id. Map it once to your cost centre."},"name":{"type":"string","title":"Name","description":"The shop's name as staff use it, often a short code."},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"The shop's full name, when its name is a code."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA time zone the shop's hours are in."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code of the shop's revenue."}},"type":"object","required":["shop_id","name"],"title":"FeedShop"},"FieldI18nHint-Input":{"properties":{"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Context for machine translation: what the text is and who reads it."},"status":{"additionalProperties":{"type":"string","enum":["machine","reviewed"]},"type":"object","title":"Status","description":"Per language, how its text came to be: `machine` (an unedited machine translation) or `reviewed` (written or confirmed by a person)."},"src_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Src Hash","description":"The fingerprint of the source-language text, as a read answers it. The server computes it on every write.","readOnly":true},"tr":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Tr","description":"Per language, how its text came to be and the source fingerprint it was translated from, as a read answers it. The server keeps it.","readOnly":true}},"additionalProperties":false,"type":"object","title":"FieldI18nHint","description":"Translation hints for one text field of a record: a hint for translators, and per language whether the text is an unedited machine translation (`machine`) or written or checked by a person (`reviewed`). A language left out counts as `reviewed` when its text changed."},"FieldI18nHint-Output":{"properties":{"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Context for machine translation: what the text is and who reads it."},"status":{"additionalProperties":{"type":"string","enum":["machine","reviewed"]},"type":"object","title":"Status","description":"Per language, how its text came to be: `machine` (an unedited machine translation) or `reviewed` (written or confirmed by a person)."}},"type":"object","title":"FieldI18nHint","description":"Translation hints for one text field of a record: a hint for translators, and per language whether the text is an unedited machine translation (`machine`) or written or checked by a person (`reviewed`). A language left out counts as `reviewed` when its text changed."},"ForecastDay":{"properties":{"date":{"type":"string","title":"Date","description":"Calendar day, YYYY-MM-DD."},"revenue":{"type":"integer","title":"Revenue","description":"Forecast revenue in minor units, VAT included."},"low":{"type":"integer","title":"Low","description":"Lower end of the forecast range, minor units."},"high":{"type":"integer","title":"High","description":"Upper end of the forecast range, minor units."}},"type":"object","required":["date","revenue","low","high"],"title":"ForecastDay"},"ForecastFeed":{"properties":{"shop_id":{"type":"string","title":"Shop Id"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"status":{"type":"string","title":"Status","description":"`ok`, or `insufficient_history` (a weekday average stands in for the model) or `no_history` (nothing to forecast from)."},"basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis","description":"What the forecast is trained on: `clean_demand` is sellable demand, without top-ups, vouchers and payouts."},"as_of":{"type":"string","title":"As Of","description":"The business day the forecast was made on; it covers the days after it."},"generated_at":{"type":"string","title":"Generated At","description":"When this forecast was computed, ISO 8601 UTC."},"days":{"items":{"$ref":"#/components/schemas/ForecastDay"},"type":"array","title":"Days"}},"type":"object","required":["shop_id","status","as_of","generated_at","days"],"title":"ForecastFeed"},"GruberDispenser-Input":{"properties":{"id":{"type":"string","pattern":"^grd_[A-Za-z0-9_-]{1,32}$","title":"Id","description":"The dispenser's id, `grd_` and up to 32 letters, digits, `_` or `-`, unique in the shop."},"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Its name, 1 to 64 characters, unique in the shop."},"ip":{"type":"string","title":"Ip","description":"Its IPv4 address on the shop's network, without a port."},"master_pos_id":{"type":"string","minLength":1,"title":"Master Pos Id","description":"The till (`pos_\u2026`) of this shop wired to it; a till masters at most one dispenser."},"polling":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Polling","description":"Retired: the master till always polls. A write ignores it.","readOnly":true}},"additionalProperties":false,"type":"object","required":["id","name","ip","master_pos_id"],"title":"GruberDispenser","description":"A Gruber beverage-dispensing controller of the shop. A kitchen station of a till sends a beverage booking to it by `id`. `master_pos_id` is the one till wired to the controller; the shop's other tills pass their bookings through it."},"GruberDispenser-Output":{"properties":{"id":{"type":"string","pattern":"^grd_[A-Za-z0-9_-]{1,32}$","title":"Id","description":"The dispenser's id, `grd_` and up to 32 letters, digits, `_` or `-`, unique in the shop."},"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Its name, 1 to 64 characters, unique in the shop."},"ip":{"type":"string","title":"Ip","description":"Its IPv4 address on the shop's network, without a port."},"master_pos_id":{"type":"string","minLength":1,"title":"Master Pos Id","description":"The till (`pos_\u2026`) of this shop wired to it; a till masters at most one dispenser."}},"type":"object","required":["id","name","ip","master_pos_id"],"title":"GruberDispenser","description":"A Gruber beverage-dispensing controller of the shop. A kitchen station of a till sends a beverage booking to it by `id`. `master_pos_id` is the one till wired to the controller; the shop's other tills pass their bookings through it."},"I18nMeta":{"properties":{"source_locale":{"type":"string","title":"Source Locale","description":"Legacy: the language the texts were entered in.","default":"de-CH"},"context":{"additionalProperties":{"type":"string"},"type":"object","title":"Context","description":"Legacy: a hint for the translator, per field."},"reviewed":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Reviewed","description":"Legacy: per language, true when a person confirmed the translation."}},"type":"object","title":"I18nMeta","description":"Translation information on a record: `source_locale` is the language the texts were written in, `context` a hint per text field for translators, and `reviewed` per language whether a person confirmed the text (`true`) or it is a machine translation (`false`). Optional."},"InvoiceInterval":{"type":"string","enum":["monthly","monthly2","monthly3","monthly4","half_monthly","half_weekly","manual","direct_cash","direct_debitor","no_invoice_internal"],"title":"InvoiceInterval","description":"How the customer's deliveries are invoiced: in a billing period (`monthly`, `monthly2` to `monthly4`, `half_monthly`, `half_weekly`), when someone starts it (`manual`), directly (`direct_cash`, `direct_debitor`), or never, for an internal customer (`no_invoice_internal`)."},"KioskBranding":{"properties":{"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Color"},"background_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Color"},"card_text_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Text Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"show_logo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Logo"},"takeaway_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Takeaway Image Url"},"in_house_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In House Image Url"},"loyalty_card_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Card Image Url"},"loyalty_card_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Card Icon Url"}},"additionalProperties":false,"type":"object","title":"KioskBranding","description":"The brand colours and images of a self-service kiosk: four colours (`#RRGGBB`) and five image URLs, used on the screens the guest sees. Each is optional; an empty colour uses the kiosk default, an empty image none."},"KioskConfig":{"properties":{"branding":{"anyOf":[{"$ref":"#/components/schemas/KioskBranding"},{"type":"null"}]},"attract_headline":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Attract Headline"},"attract_subline":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Attract Subline"},"attract_media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attract Media Url"},"order_type_title":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Order Type Title"},"order_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/KioskOrderType"},"type":"array"},{"type":"null"}],"title":"Order Types"},"idle_timeout_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Timeout Seconds"},"idle_warning_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Warning Seconds"},"done_reset_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Done Reset Seconds"},"show_allergens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Allergens"},"show_upsell":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Upsell"},"skip_order_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Order Review"},"disallow_loyalty_cards":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disallow Loyalty Cards"},"show_order_view":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Order View"},"customer_display":{"anyOf":[{"$ref":"#/components/schemas/CustomerDisplayConfig"},{"type":"null"}]},"start":{"anyOf":[{"$ref":"#/components/schemas/KioskStartTexts"},{"type":"null"}]},"pickup_number":{"anyOf":[{"type":"string","enum":["off","on","kitchen"]},{"type":"null"}],"title":"Pickup Number"},"sold_out_items":{"anyOf":[{"type":"string","enum":["show","hide"]},{"type":"null"}],"title":"Sold Out Items"}},"additionalProperties":false,"type":"object","title":"KioskConfig","description":"The settings of a till that runs as a self-service kiosk: a guided full-screen flow around the till's layouts, each layout shown as a category. Every field is optional; a till without them uses the kiosk defaults."},"KioskOrderType":{"properties":{"id":{"type":"string","title":"Id"},"label":{"additionalProperties":{"type":"string"},"type":"object","title":"Label","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"channel":{"type":"string","enum":["takeaway","dine_in"],"title":"Channel","default":"takeaway"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"i18n_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"I18N Meta"}},"additionalProperties":false,"type":"object","required":["id"],"title":"KioskOrderType","description":"An order type the kiosk offers on its first screen, such as takeaway or eat-in; the guest's choice sets the sale's channel. Without any, the kiosk skips that step."},"KioskStartText":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["hidden","default","custom"]},{"type":"null"}],"title":"Mode"},"text":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Text"},"i18n_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"I18N Meta"}},"additionalProperties":false,"type":"object","title":"KioskStartText","description":"One start-screen text: how it is drawn and, when `custom`, what it says."},"KioskStartTexts":{"properties":{"title":{"anyOf":[{"$ref":"#/components/schemas/KioskStartText"},{"type":"null"}]},"tagline":{"anyOf":[{"$ref":"#/components/schemas/KioskStartText"},{"type":"null"}]},"headline":{"anyOf":[{"$ref":"#/components/schemas/KioskStartText"},{"type":"null"}]},"hint":{"anyOf":[{"$ref":"#/components/schemas/KioskStartText"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"KioskStartTexts"},"Labeling":{"properties":{"alt_description":{"additionalProperties":{"type":"string"},"type":"object","title":"Alt Description","description":"An alternative label text, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin","description":"The origin the label prints."},"ean":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ean","description":"The EAN the label prints; unique among the workspace's codes."},"ean_managed_by_ca":{"type":"boolean","title":"Ean Managed By Ca","description":"true: the connected till system owns the EAN.","default":false},"declaration":{"additionalProperties":{"type":"string"},"type":"object","title":"Declaration","description":"The ingredient text, per language, while no recipe computes it.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"storage":{"additionalProperties":{"type":"string"},"type":"object","title":"Storage","description":"The storage hint, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"consumer_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Consumer Info","description":"Consumption information for the customer, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"shelf_life_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Shelf Life Days","description":"Days the article keeps."},"sell_within_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sell Within Days","description":"Days from production within which it is sold."},"consume_within_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Consume Within Days","description":"Days from production within which it is eaten."},"must_be_kept_cool":{"type":"boolean","title":"Must Be Kept Cool","description":"true: the label says keep cool.","default":false},"selling_weight_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selling Weight G","description":"The sale weight in grams."}},"additionalProperties":false,"type":"object","title":"Labeling","description":"What the article's printed labels show: EAN, origin, shelf life, storage and consumer information. Optional; an article without it prints the values taken over from the previous system."},"LineChange":{"properties":{"position_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Id","description":"A line the order holds, by its `id`. Instead of `article_id`."},"article_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Article Id","description":"An article to add as a new line. Instead of `position_id`."},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity","description":"The new quantity; 0 removes the line. Required and positive with `article_id`."},"discount":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discount","description":"A discount set by hand, as a plain percent (`10` is 10 %); it replaces the conditions' one."}},"additionalProperties":false,"type":"object","title":"LineChange","description":"One change to an order's lines. With `position_id`, a line the order has: its new `quantity` (0 removes it) or a manual `discount` percent; its price stays the agreed one. With `article_id`, a new line of that article, priced from the customer's conditions on the delivery day; `quantity` is required and positive, and `discount` overrides the conditions' discount. There is no price, VAT or total: the server prices every line it adds and keeps the price of every line it keeps. Example: `[{\"position_id\": \"3\", \"quantity\": 0}, {\"article_id\": \"prd_123\", \"quantity\": 5}]` removes line 3 and adds 5 of the article."},"Loyalty":{"properties":{"points_eligible":{"type":"boolean","title":"Points Eligible","description":"true: a sale earns loyalty points.","default":true},"points_earn_mode":{"type":"string","enum":["per_unit","per_amount"],"title":"Points Earn Mode","description":"`per_unit` = points per `points_earn_step` units sold; `per_amount` = points per `points_earn_step` minor units of the line total (1 point per 5.00).","default":"per_unit"},"points_earn_step":{"type":"number","title":"Points Earn Step","description":"The step points are granted per: units, or minor units of money with `per_amount`.","default":1.0},"points_factor":{"type":"number","title":"Points Factor","description":"Points granted per step.","default":1.0},"points_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Points Cost","description":"Points deducted from the customer card per unit when bought with points; null or 0 = not a points article."},"points_cost_price_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Points Cost Price Level","description":"With `points_cost`: the price level charged in money besides the points (0 = the base price, 1 to 9 = a level, 99 = no money)."},"points_cost_in_money":{"type":"integer","title":"Points Cost In Money","description":"With `points_cost`: money credited to the card balance per unit redeemed, in minor units.","default":0},"card_discount_bps":{"type":"integer","title":"Card Discount Bps","description":"The customer-card discount in basis points: 10000 = 100 %.","default":0},"net_on_card":{"type":"boolean","title":"Net On Card","description":"true: the net price applies on the card.","default":false},"wertkarte_payable":{"type":"boolean","title":"Wertkarte Payable","description":"true: payable with a stored-value card or voucher.","default":true},"excluded_from_bonus":{"type":"boolean","title":"Excluded From Bonus","description":"true: excluded from the bonus and points programme.","default":false},"no_employee_discount":{"type":"boolean","title":"No Employee Discount","description":"true: an employee card's discount does not apply.","default":false},"staff_consumption":{"type":"boolean","title":"Staff Consumption","description":"true: may be booked as staff consumption, and an employee card's discount always applies.","default":false},"card_discount_groups":{"items":{"$ref":"#/components/schemas/CardDiscountGroup"},"type":"array","title":"Card Discount Groups","description":"Per discount group, the card discount this article gets; a card of that group applies it."}},"additionalProperties":false,"type":"object","title":"Loyalty","description":"How an article takes part in the loyalty programme: its discount for loyalty cards (`card_discount_bps`, and per discount group `card_discount_groups`), the points it earns or costs, and whether a value card may pay for it. Percents are basis points (10000 = 100 %). This is not the loyalty card itself, which belongs to a customer (`GET /v1/loyalty-cards`). Optional; without it the article gets no special card treatment."},"LoyaltyCardCreate":{"properties":{"card_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Number","description":"The number printed on the card and the wallet pass, unique in the workspace. Left out on a create, the next number of the workspace's sequence is taken."},"rfid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfid","description":"The RFID or EAN code of a plastic card."},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode","description":"The barcode of a virtual card. A card whose wallet pass is issued keeps its pass serial here; changing it answers 409 `BARCODE_HELD_BY_PASS`."},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number","description":"An unguessable token the card's QR code carries."},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"The holder's name as the till shows it."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"The holder's phone number (E.164, `+41791234567`); wallet codes go there."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The holder's e-mail address, as typed; not checked."},"type":{"type":"string","enum":["in_house","loyalty","credit"],"title":"Type","description":"`loyalty` = a customer card, `credit` = a credit card, `in_house` = an in-house card.","default":"loyalty"},"active":{"type":"boolean","title":"Active","description":"false: the card is refused at the till.","default":true},"balance":{"type":"integer","title":"Balance","description":"The opening balance, in minor units; later through bookings.","default":0},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{3}$"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code of the money the card holds (`CHF`, `EUR`); left out on a create, the issuing till's or the workspace's currency."},"points":{"type":"integer","title":"Points","description":"The opening points; later through bookings.","default":0},"access_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Code","description":"A short code that proves a verified link to the card."},"wallet_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Url","description":"The wallet pass's link."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"A free note."},"is_employee":{"type":"boolean","title":"Is Employee","description":"true: the card belongs to a cashier, named in `operator_id`.","default":false},"operator_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Id","description":"The cashier an employee card belongs to; required while `is_employee` is true (422 `EMPLOYEE_CARD_NEEDS_CASHIER`)."},"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"The most the card may hold, in minor units; null = no ceiling."},"day_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Day Limit","description":"The most the card may spend per day, in minor units; null = no ceiling."},"expiry":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Expiry","description":"Last day the card is valid as a means of payment, `YYYY-MM-DD`; null = none."},"is_points_active":{"type":"boolean","title":"Is Points Active","description":"true: the card collects points.","default":true},"free_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Percent Bps","description":"The holder's own discount in basis points, 0 to 10000 (500 = 5 %)."},"master_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Master Percent Bps","description":"The staff or management discount in basis points, 0 to 10000."},"discount_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Group","description":"The number of the discount group the card belongs to."},"balance_discount":{"type":"boolean","title":"Balance Discount","description":"true: the discount applies only while the card holds a balance.","default":false},"always_discount":{"type":"boolean","title":"Always Discount","description":"true: the discount applies to net-priced articles too.","default":false},"cash_load":{"type":"boolean","title":"Cash Load","description":"true: the card is loaded with cash only.","default":false},"balance_points":{"type":"boolean","title":"Balance Points","description":"true: the card collects points only while it holds a balance.","default":false},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"The holder's salutation."},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"The holder's first name."},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"The holder's last name."},"additive":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additive","description":"An addition to the holder's name or address."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and number."},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City."},"country":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Country","description":"The country, as the number the previous system gave it."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The holder's company."},"company_additional":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Additional","description":"A second company line."},"birthday":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Birthday","description":"The holder's birthday, `YYYY-MM-DD`."},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid","description":"The card's unique id in the previous system."},"filter_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filter Code","description":"The code of the card's mobile-payment specification."},"credit_customer_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Customer Ref","description":"The till credit customer the card belongs to, by its number."},"mobile_card_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile Card Owner","description":"The user a virtual card belongs to in the previous system."}},"additionalProperties":false,"type":"object","title":"LoyaltyCardCreate","description":"A loyalty card: the holder, the codes that identify the card, its discount\nand its limits. The balance and the points move through bookings once the card\nexists."},"LoyaltyCardUpdate":{"properties":{"card_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Number","description":"The number printed on the card and the wallet pass, unique in the workspace. Left out on a create, the next number of the workspace's sequence is taken."},"rfid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfid","description":"The RFID or EAN code of a plastic card."},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode","description":"The barcode of a virtual card. A card whose wallet pass is issued keeps its pass serial here; changing it answers 409 `BARCODE_HELD_BY_PASS`."},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number","description":"An unguessable token the card's QR code carries."},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"The holder's name as the till shows it."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"The holder's phone number (E.164, `+41791234567`); wallet codes go there."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The holder's e-mail address, as typed; not checked."},"type":{"anyOf":[{"type":"string","enum":["in_house","loyalty","credit"]},{"type":"null"}],"title":"Type","description":"`loyalty` = a customer card, `credit` = a credit card, `in_house` = an in-house card."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"false: the card is refused at the till."},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{3}$"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code of the money the card holds (`CHF`, `EUR`); left out on a create, the issuing till's or the workspace's currency."},"access_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Code","description":"A short code that proves a verified link to the card."},"wallet_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Url","description":"The wallet pass's link."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"A free note."},"is_employee":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Employee","description":"true: the card belongs to a cashier, named in `operator_id`."},"operator_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Id","description":"The cashier an employee card belongs to; required while `is_employee` is true (422 `EMPLOYEE_CARD_NEEDS_CASHIER`)."},"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit","description":"The most the card may hold, in minor units; null = no ceiling."},"day_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Day Limit","description":"The most the card may spend per day, in minor units; null = no ceiling."},"expiry":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Expiry","description":"Last day the card is valid as a means of payment, `YYYY-MM-DD`; null = none."},"is_points_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Points Active","description":"true: the card collects points."},"free_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Percent Bps","description":"The holder's own discount in basis points, 0 to 10000 (500 = 5 %)."},"master_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Master Percent Bps","description":"The staff or management discount in basis points, 0 to 10000."},"discount_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Group","description":"The number of the discount group the card belongs to."},"balance_discount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Balance Discount","description":"true: the discount applies only while the card holds a balance."},"always_discount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Always Discount","description":"true: the discount applies to net-priced articles too."},"cash_load":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cash Load","description":"true: the card is loaded with cash only."},"balance_points":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Balance Points","description":"true: the card collects points only while it holds a balance."},"salutation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salutation","description":"The holder's salutation."},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"The holder's first name."},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"The holder's last name."},"additive":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additive","description":"An addition to the holder's name or address."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and number."},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City."},"country":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Country","description":"The country, as the number the previous system gave it."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The holder's company."},"company_additional":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Additional","description":"A second company line."},"birthday":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Birthday","description":"The holder's birthday, `YYYY-MM-DD`."},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid","description":"The card's unique id in the previous system."},"filter_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filter Code","description":"The code of the card's mobile-payment specification."},"credit_customer_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Customer Ref","description":"The till credit customer the card belongs to, by its number."},"mobile_card_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile Card Owner","description":"The user a virtual card belongs to in the previous system."}},"additionalProperties":false,"type":"object","title":"LoyaltyCardUpdate","description":"A change to a loyalty card: only the fields sent change. The balance and the\npoints move only through bookings; a body that sets them is refused with 422."},"Media":{"properties":{"role":{"type":"string","title":"Role","description":"What the picture is for: `item_image` (the article), `kiosk_image` (the self-service kiosk), `document_image` (documents).","default":"item_image"},"url":{"type":"string","title":"Url","description":"Where the picture is: the path `POST /v1/media` answered, or an `https` URL. An inline `data:image/\u2026` picture is accepted up to 8 KiB of text (an icon); upload anything larger."},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime","description":"The picture's media type, e.g. `image/png`."},"hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hash","description":"The content hash `POST /v1/media` answered."},"w":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"W","description":"Width in pixels."},"h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"H","description":"Height in pixels."},"thumb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumb","description":"A smaller copy for lists; null = lists show `url` itself."},"src":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Src","description":"Who put the picture here: null = a person; an import's name (`wawi`) = that import, which may replace or remove it."}},"additionalProperties":false,"type":"object","required":["url"],"title":"Media","description":"A product media asset."},"Micronutrient":{"properties":{"name":{"type":"string","title":"Name","description":"The vitamin or mineral, as the label prints it."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The amount per 100 g or ml."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The amount's unit, e.g. `mg`, `\u00b5g`."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"The source system's number for it."},"gda_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gda Pct","description":"Percent of the reference intake, when known."}},"additionalProperties":false,"type":"object","required":["name"],"title":"Micronutrient","description":"A vitamin or mineral declared per 100 g, beyond the seven mandatory nutrition values. `gda_pct` is its share of the reference intake, when known."},"ModifierGroupCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The group's name as the till shows it above its options, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"min_select":{"type":"integer","minimum":0.0,"title":"Min Select","description":"The fewest options a sale must pick from the group; 0 = none required.","default":0},"max_select":{"type":"integer","minimum":0.0,"title":"Max Select","description":"The most options a sale may pick; at least `min_select`. 0 = no maximum in the back office (the till treats a maximum below 1 as 1).","default":1},"required":{"type":"boolean","title":"Required","description":"`true`: the till asks for the group before the article is sold.","default":false},"allow_repeat":{"type":"boolean","title":"Allow Repeat","description":"`true`: the same option may be picked more than once (two portions of ketchup), each pick charged and counted against `max_select`. Takes effect only when `max_select` is 2 or more; `false` = each option at most once.","default":false},"options":{"items":{"$ref":"#/components/schemas/ModifierOption"},"type":"array","title":"Options","description":"The options, in the order the till shows them; a change replaces the whole list."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the group's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"additionalProperties":false,"type":"object","required":["name"],"title":"ModifierGroupCreate","description":"A modifier group: options picked for an article when it is sold, such as a\nsize or extras, with the fewest and most picks allowed."},"ModifierGroupPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifierGroupRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"ModifierGroupPage"},"ModifierGroupRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The group's name as the till shows it above its options, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"min_select":{"type":"integer","minimum":0.0,"title":"Min Select","description":"The fewest options a sale must pick from the group; 0 = none required.","default":0},"max_select":{"type":"integer","minimum":0.0,"title":"Max Select","description":"The most options a sale may pick; at least `min_select`. 0 = no maximum in the back office (the till treats a maximum below 1 as 1).","default":1},"required":{"type":"boolean","title":"Required","description":"`true`: the till asks for the group before the article is sold.","default":false},"allow_repeat":{"type":"boolean","title":"Allow Repeat","description":"`true`: the same option may be picked more than once (two portions of ketchup), each pick charged and counted against `max_select`. Takes effect only when `max_select` is 2 or more; `false` = each option at most once.","default":false},"options":{"items":{"$ref":"#/components/schemas/ModifierOption"},"type":"array","title":"Options","description":"The options, in the order the till shows them; a change replaces the whole list."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Output"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the group's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"type":"object","required":["_id","name"],"title":"ModifierGroupRecord"},"ModifierGroupUpdate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"The group's name as the till shows it above its options, per language. May be left out, never null."},"min_select":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Select","description":"The fewest options a sale must pick from the group; 0 = none required. May be left out, never null."},"max_select":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Select","description":"The most options a sale may pick; at least `min_select`. 0 = no maximum in the back office (the till treats a maximum below 1 as 1). May be left out, never null."},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required","description":"`true`: the till asks for the group before the article is sold. May be left out, never null."},"allow_repeat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Repeat","description":"`true`: the same option may be picked more than once (two portions of ketchup), each pick charged and counted against `max_select`. Takes effect only when `max_select` is 2 or more; `false` = each option at most once. May be left out, never null."},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModifierOption"},"type":"array"},{"type":"null"}],"title":"Options","description":"The options, in the order the till shows them; a change replaces the whole list. May be left out, never null."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the group's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"additionalProperties":false,"type":"object","title":"ModifierGroupUpdate","description":"A change to a modifier group: only the fields sent change."},"ModifierOption":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Id","description":"The option's id, stable when options are reordered: send back the id a read answered; left out, the server assigns `opt_<n>`."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The option's name as the till and the receipt show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"price_delta":{"type":"integer","title":"Price Delta","description":"What picking the option adds to the article's price, in minor units (150 = 1.50); negative for a cheaper choice.","default":0},"default":{"type":"boolean","title":"Default","description":"`true`: the option is picked when the group opens.","default":false},"price_once":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Price Once","description":"Online shop only: a one-time charge per order line whatever the quantity, in minor units (a print plate for a logo); 0 = none. The till ignores it.","default":0},"image":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"type":"null"}],"description":"A picture of the choice, as `POST /v1/media` answers it; the kiosk shows it as a tile."}},"additionalProperties":false,"type":"object","required":["name"],"title":"ModifierOption","description":"One option of a modifier group: a name and what it adds to the price."},"Navigation":{"properties":{"nested_layout_id":{"type":"string","title":"Nested Layout Id","description":"The till template (id) a tap opens."}},"additionalProperties":false,"type":"object","required":["nested_layout_id"],"title":"Navigation","description":"The settings of a tile that opens another till layout instead of selling (`function` `navigation`): `nested_layout_id` is the layout it opens."},"NetQuantity":{"properties":{"value":{"type":"number","title":"Value","description":"The net quantity, e.g. 500."},"unit":{"type":"string","enum":["g","kg","ml","l"],"title":"Unit","description":"Its unit.","default":"g"}},"additionalProperties":false,"type":"object","required":["value"],"title":"NetQuantity","description":"The net quantity the unit price is computed from, such as 500 g or 1 l."},"NutritionPer100g-Input":{"properties":{"energy_kj":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Energy Kj","description":"Energy, kJ per 100 g or ml."},"energy_kcal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Energy Kcal","description":"Energy, kcal per 100 g or ml."},"fat_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fat G","description":"Fat, g per 100 g or ml."},"saturates_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Saturates G","description":"Of which saturates, g per 100 g or ml."},"carbs_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carbs G","description":"Carbohydrate, g per 100 g or ml."},"sugars_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sugars G","description":"Of which sugars, g per 100 g or ml."},"protein_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein G","description":"Protein, g per 100 g or ml."},"salt_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Salt G","description":"Salt, g per 100 g or ml."},"fibre_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fibre G","description":"Fibre, g per 100 g or ml (optional on the label)."},"brennwert_kj":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Brennwert Kj","description":"Computed from the linked recipe and ignored on a write; `energy_kj` is the field to write.","readOnly":true},"brennwert_kcal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Brennwert Kcal","description":"Computed from the linked recipe and ignored on a write; `energy_kcal` is the field to write.","readOnly":true}},"additionalProperties":false,"type":"object","title":"NutritionPer100g","description":"The nutrition values per 100 g or 100 ml, as a label's nutrition table prints them. All optional; energy in both kJ and kcal."},"NutritionPer100g-Output":{"properties":{"energy_kj":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Energy Kj","description":"Energy, kJ per 100 g or ml."},"energy_kcal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Energy Kcal","description":"Energy, kcal per 100 g or ml."},"fat_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fat G","description":"Fat, g per 100 g or ml."},"saturates_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Saturates G","description":"Of which saturates, g per 100 g or ml."},"carbs_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carbs G","description":"Carbohydrate, g per 100 g or ml."},"sugars_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sugars G","description":"Of which sugars, g per 100 g or ml."},"protein_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein G","description":"Protein, g per 100 g or ml."},"salt_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Salt G","description":"Salt, g per 100 g or ml."},"fibre_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fibre G","description":"Fibre, g per 100 g or ml (optional on the label)."}},"additionalProperties":false,"type":"object","title":"NutritionPer100g","description":"The nutrition values per 100 g or 100 ml, as a label's nutrition table prints them. All optional; energy in both kJ and kcal."},"OnlineAppVisibility":{"properties":{"mode":{"type":"string","enum":["all","only","except"],"title":"Mode","description":"`all` = everywhere (the lists are ignored), `only` = only on the tills of the listed regions, shops and tills, `except` = everywhere but there.","default":"all"},"regions":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Regions","description":"Region ids (`reg_\u2026`); covers every shop and till below."},"shops":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Shops","description":"Shop ids (`shp_\u2026`); covers every till of the shop."},"pos":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Pos","description":"Till ids (`pos_\u2026`). Prefer shops or regions, so a new till is covered by itself."},"shown":{"type":"boolean","title":"Shown","description":"false keeps the record out of this guest app everywhere.","default":true}},"additionalProperties":false,"type":"object","title":"OnlineAppVisibility","description":"Where a record is offered in one guest app, the QR menu or Click & Collect: `shown: false` hides it there everywhere, and the regions, shops and tills narrow it to some branches or leave some out. An app without an entry offers it."},"OnlineTimeWindow":{"properties":{"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekdays","description":"ISO weekdays, 1 = Monday to 7 = Sunday; empty = every day."},"start":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","title":"Start","description":"Start, `HH:MM` on the shop's clock.","default":"00:00"},"end":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","title":"End","description":"End, `HH:MM` on the shop's clock; before `start` means the window crosses midnight.","default":"23:59"}},"additionalProperties":false,"type":"object","title":"OnlineTimeWindow","description":"One time of day in which the online menu offers a record. `weekdays` (ISO, 1 = Monday to 7 = Sunday) empty means every day; `start` and `end` are `HH:MM` on the shop's clock, and an `end` before `start` runs past midnight."},"OnlineVisibility":{"properties":{"QRMENU":{"anyOf":[{"$ref":"#/components/schemas/OnlineAppVisibility"},{"type":"null"}],"description":"The QR menu; null = offered wherever the tills offer it."},"CLICKCOLLECT":{"anyOf":[{"$ref":"#/components/schemas/OnlineAppVisibility"},{"type":"null"}],"description":"Click & Collect; null = offered wherever the tills offer it."},"DELIVERY":{"anyOf":[{"$ref":"#/components/schemas/OnlineAppVisibility"},{"type":"null"}],"description":"The delivery platforms; null = offered wherever the tills offer it."}},"additionalProperties":false,"type":"object","title":"OnlineVisibility","description":"Where a record is offered online, per channel: the two guest apps (the QR menu and Click & Collect) and the delivery platforms. A channel left out offers it."},"OrderBulkAccepted":{"properties":{"pending":{"type":"boolean","title":"Pending"},"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"retry_after_s":{"type":"integer","title":"Retry After S"},"poll":{"type":"string","title":"Poll"}},"type":"object","required":["pending","task_id","status","retry_after_s","poll"],"title":"OrderBulkAccepted","description":"A queued bulk create: poll `poll` until `pending` is false. The finished\njob's `result` has the shape of the inline answer."},"OrderBulkCreate":{"properties":{"orders":{"items":{"$ref":"#/components/schemas/OrderCreate"},"type":"array","maxItems":500,"minItems":1,"title":"Orders","description":"Up to 500 bodies of `POST /v1/orders`."}},"additionalProperties":false,"type":"object","required":["orders"],"title":"OrderBulkCreate","description":"Many new orders in one call. Each item is exactly the body of\n`POST /v1/orders` and is created the way that call creates it."},"OrderBulkItemError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"OrderBulkItemError","description":"Why one item was not created: the error `POST /v1/orders` answers for it."},"OrderBulkItemResult":{"properties":{"index":{"type":"integer","title":"Index"},"status":{"type":"string","enum":["created","failed"],"title":"Status"},"http_status":{"type":"integer","title":"Http Status"},"order":{"anyOf":[{"$ref":"#/components/schemas/OrderRecord"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/OrderBulkItemError"},{"type":"null"}]}},"type":"object","required":["index","status","http_status"],"title":"OrderBulkItemResult","description":"The outcome of one item, at its position in the request."},"OrderBulkResult":{"properties":{"created":{"type":"integer","title":"Created"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/OrderBulkItemResult"},"type":"array","title":"Results"}},"type":"object","required":["created","failed","results"],"title":"OrderBulkResult","description":"What a bulk create did, one result per item in request order."},"OrderChannel":{"properties":{"provider":{"type":"string","title":"Provider"},"platform":{"type":"string","title":"Platform"},"external_id":{"type":"string","title":"External Id"},"display_id":{"type":"string","title":"Display Id","default":""}},"type":"object","required":["provider","platform","external_id"],"title":"OrderChannel","description":"Where an order from a delivery platform came from: the service that delivered it (`provider`), the marketplace the guest ordered on (`platform`) and the order's ids there. It is set when the order arrives and kept as it is: a change that leaves it out keeps it. The sale settled for the order copies it, so receipts and reports show the channel."},"OrderCreate":{"properties":{"customer_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Customer Id","description":"The customer (`GET /v1/customers`)."},"order_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date","title":"Order Date","description":"The delivery day, `YYYY-MM-DD`: the day the order is delivered, filed and produced for."},"order_type":{"type":"string","enum":["order","additional","return","credit","special","internet","catering"],"title":"Order Type","description":"`order` a regular order; `additional` an additional order on top of the day's regular one; `special` a special order outside the usual range; `catering` a catering order; `internet` an order from the webshop; `return` goods coming back; `credit` a credit to the customer. On `return` and `credit` the quantities are stored negative, whatever sign is sent.","default":"order"},"delivery_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Time","description":"The delivery time as printed, for example `06:30`."},"tour_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Tour Id","description":"The delivery tour (`GET /v1/orders/tours`). Required where the workspace asks every order to name one."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"A reference of yours, printed on the delivery note."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note printed on the delivery note; the customer's default note when left out."},"pos_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Pos Id","description":"The till the order was booked at. Left out for an order from the back office or another system."},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id","description":"A branch transfer booked at a till only: the shop that receives the goods."},"cashier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashier","description":"A till only: the cashier who booked it."},"cashier_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashier User Id","description":"A till only: the cashier's operator number."},"captured_at":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?)?$","format":"date-time"},{"type":"null"}],"title":"Captured At","description":"When the document was created at its source, for example the till, with its offset (`2026-10-01T18:02:11.250Z`). Orders the stock values by time; left out, the order is placed by its day and number."},"edit_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Order Id","description":"A till only: correct this order it sent instead of creating one. Refused from any other caller; change an order with `PATCH /v1/orders/{order_id}`."},"special_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Address","description":"A delivery address for this order only, as printed."},"source_offer_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Source Offer Id","description":"The offer this order was made from."},"source_offer_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Offer No","description":"That offer's number, as printed."},"return_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Reason","description":"A `return` or `credit` only: why it was raised."},"text_block_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Text Block Id","description":"A text block printed on the delivery note; the workspace's default for orders when left out."},"positions":{"items":{"$ref":"#/components/schemas/OrderPositionCreate"},"type":"array","title":"Positions","description":"The order's lines. Instead of `copy_from` and `line_changes`.","default":[]},"creation_options":{"anyOf":[{"$ref":"#/components/schemas/CreationOptions"},{"type":"null"}],"description":"What happens to a line that breaks an ordering rule."},"draft_order_id_to_delete":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Order Id To Delete","description":"A saved draft this order replaces; it is deleted."},"copy_from":{"anyOf":[{"$ref":"#/components/schemas/CopyFrom"},{"type":"null"}],"description":"Repeat an older order of the customer, its lines priced again for this day. Instead of `positions`."},"line_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineChange"},"type":"array"},{"type":"null"}],"title":"Line Changes","description":"The articles to add, or with `copy_from` the changes to the copied lines. Instead of `positions`."},"add_delivery_cost":{"type":"boolean","title":"Add Delivery Cost","description":"Add the customer's delivery charge as a line, priced from their tariff.","default":false}},"additionalProperties":false,"type":"object","required":["customer_id","order_date"],"title":"OrderCreate","description":"A new order for a customer and a delivery day, with its lines: `positions`,\nor `line_changes` (articles with a quantity, priced by the server), or a\nrepeat of an older order (`copy_from`)."},"OrderCustomer":{"properties":{"name":{"type":"string","title":"Name","default":""},"phone":{"type":"string","title":"Phone","default":""},"email":{"type":"string","title":"Email","default":""},"card_id":{"type":"string","title":"Card Id","default":""}},"type":"object","title":"OrderCustomer","description":"Who a pickup, delivery or online order is for; empty for an order at the table."},"OrderPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderRecord"},"type":"array","title":"Data","description":"The orders, by order number."},"has_more":{"type":"boolean","title":"Has More","description":"Always false: the day's orders come in one page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","has_more"],"title":"OrderPage","description":"`GET /v1/orders`: every order of one customer on one delivery day."},"OrderPositionCreate":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The line's id, unique within the order; the server gives one when left out. `pos_shipping` is the delivery line's and never an article's."},"row_type":{"type":"string","enum":["normal","page_break","group_header"],"title":"Row Type","description":"An article or text line (`normal`), or a layout row of the printed note.","default":"normal"},"article_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Article Id","description":"The article (`GET /v1/products`). Left out on a text line."},"article_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article No","description":"The article number as printed; the article's when left out."},"description":{"type":"string","title":"Description","description":"The line's name as billed; the article's when left empty.","default":""},"individual_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Individual Description","description":"An extra text for this line only, printed in place of the article's name."},"guest_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Note","description":"What a guest asked for on this item when they ordered online. Kept as it was; the back office writes `individual_description`."},"quantity":{"type":"number","title":"Quantity","description":"How many, in `qty_unit`. A line at 0 is left out of the order unless it notes a `correction_qty`.","default":0},"correction_qty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Correction Qty","description":"A correction quantity noted beside the ordered one. It never changes the money."},"quantity_per_lot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity Per Lot","description":"How many pieces make one lot; the article's when left out."},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price","description":"The net unit price (without VAT) in minor units (cents), per `price_unit`. May be negative, for a deposit returned or a line that takes money off. Left out, it is the stored line's or the customer's price."},"gross_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Price","description":"A customer billed VAT included only: the unit price with VAT, in minor units. The net `price` is derived from it."},"price_unit":{"anyOf":[{"type":"integer","enum":[1,100,1000]},{"type":"null"}],"title":"Price Unit","description":"What `price` is quoted per: 1, 100 or 1000 units of `qty_unit`. Left out, the stored line's or the article's."},"qty_unit":{"anyOf":[{"type":"string","enum":["each","kg","g","g100","hour"]},{"type":"null"}],"title":"Qty Unit","description":"What the quantity counts. Left out, the stored line's or the article's."},"priced_by":{"anyOf":[{"type":"string","enum":["till","shop"]},{"type":"null"}],"title":"Priced By","description":"Who set the price when it is not the customer's conditions: a till or the webshop. A change of quantity keeps it."},"discount":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discount","description":"The discount as a plain percent, 0 to 100: `10` is 10 % (not basis points). Left out, the stored line's or the customer's."},"vat_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code","description":"The VAT rate as a percent, such as `8.1%` or `0%`. Left out on an article line, the article's rate on the delivery day; a text line with a price names it."},"delivery_vat_mode":{"anyOf":[{"type":"string","enum":["included","excluded","none"]},{"type":"null"}],"title":"Delivery Vat Mode","description":"The delivery line only: how its charge is quoted. The save derives it from the customer again."},"delivery_charge":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivery Charge","description":"The delivery line's shares only: the charge they split, in minor units."},"splitting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Splitting","description":"How the line is delivered in parts, separated by `|`: a number is a fixed quantity, `40%` a share, `r` the rest. `8|40%|r` of 20 delivers 8, 8 and 4. Left out, the line is delivered in one piece."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"The net line total a read answers. Ignored on a write.","readOnly":true},"gross_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Total","description":"The line total with VAT a read answers. Ignored.","readOnly":true},"splitting_parts":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Splitting Parts","description":"The quantities `splitting` resolves to, as a read answers them. Ignored.","readOnly":true},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money","description":"An imported line's money in its source system, as a read answers it. Ignored.","readOnly":true},"vat_split":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Vat Split","description":"The delivery line's charge per VAT rate, as a read answers it. Ignored.","readOnly":true}},"additionalProperties":false,"type":"object","title":"OrderPositionCreate","description":"A line of a new order. `id` is optional: left out, the server gives the line\none, unique within the order, and the created order carries it. An edit\n(`PATCH /v1/orders/{order_id}`) names each line by that id."},"OrderPositionInput":{"properties":{"id":{"type":"string","title":"Id","description":"The line's id, unique within the order. An edit names each line the order already holds by it; a line under a new id is a new line. `pos_shipping` is the delivery line's and never an article's."},"row_type":{"type":"string","enum":["normal","page_break","group_header"],"title":"Row Type","description":"An article or text line (`normal`), or a layout row of the printed note.","default":"normal"},"article_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Article Id","description":"The article (`GET /v1/products`). Left out on a text line."},"article_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article No","description":"The article number as printed; the article's when left out."},"description":{"type":"string","title":"Description","description":"The line's name as billed; the article's when left empty.","default":""},"individual_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Individual Description","description":"An extra text for this line only, printed in place of the article's name."},"guest_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Note","description":"What a guest asked for on this item when they ordered online. Kept as it was; the back office writes `individual_description`."},"quantity":{"type":"number","title":"Quantity","description":"How many, in `qty_unit`. A line at 0 is left out of the order unless it notes a `correction_qty`.","default":0},"correction_qty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Correction Qty","description":"A correction quantity noted beside the ordered one. It never changes the money."},"quantity_per_lot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity Per Lot","description":"How many pieces make one lot; the article's when left out."},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price","description":"The net unit price (without VAT) in minor units (cents), per `price_unit`. May be negative, for a deposit returned or a line that takes money off. Left out, it is the stored line's or the customer's price."},"gross_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Price","description":"A customer billed VAT included only: the unit price with VAT, in minor units. The net `price` is derived from it."},"price_unit":{"anyOf":[{"type":"integer","enum":[1,100,1000]},{"type":"null"}],"title":"Price Unit","description":"What `price` is quoted per: 1, 100 or 1000 units of `qty_unit`. Left out, the stored line's or the article's."},"qty_unit":{"anyOf":[{"type":"string","enum":["each","kg","g","g100","hour"]},{"type":"null"}],"title":"Qty Unit","description":"What the quantity counts. Left out, the stored line's or the article's."},"priced_by":{"anyOf":[{"type":"string","enum":["till","shop"]},{"type":"null"}],"title":"Priced By","description":"Who set the price when it is not the customer's conditions: a till or the webshop. A change of quantity keeps it."},"discount":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discount","description":"The discount as a plain percent, 0 to 100: `10` is 10 % (not basis points). Left out, the stored line's or the customer's."},"vat_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code","description":"The VAT rate as a percent, such as `8.1%` or `0%`. Left out on an article line, the article's rate on the delivery day; a text line with a price names it."},"delivery_vat_mode":{"anyOf":[{"type":"string","enum":["included","excluded","none"]},{"type":"null"}],"title":"Delivery Vat Mode","description":"The delivery line only: how its charge is quoted. The save derives it from the customer again."},"delivery_charge":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivery Charge","description":"The delivery line's shares only: the charge they split, in minor units."},"splitting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Splitting","description":"How the line is delivered in parts, separated by `|`: a number is a fixed quantity, `40%` a share, `r` the rest. `8|40%|r` of 20 delivers 8, 8 and 4. Left out, the line is delivered in one piece."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"The net line total a read answers. Ignored on a write.","readOnly":true},"gross_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Total","description":"The line total with VAT a read answers. Ignored.","readOnly":true},"splitting_parts":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Splitting Parts","description":"The quantities `splitting` resolves to, as a read answers them. Ignored.","readOnly":true},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money","description":"An imported line's money in its source system, as a read answers it. Ignored.","readOnly":true},"vat_split":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Vat Split","description":"The delivery line's charge per VAT rate, as a read answers it. Ignored.","readOnly":true}},"additionalProperties":false,"type":"object","required":["id"],"title":"OrderPositionInput","description":"One line of an order as sent. Every money field is optional: a line that leaves out `price`, `discount` or `vat_code` takes it from the line the order already holds under the same `id` and article, or else from the customer's conditions on the delivery day; a value that is sent is kept, an explicit 0 included. A field the line does not take is refused. The read-only fields a read answers (`total`, `gross_total`, `splitting_parts`, `source_money`, `vat_split`) may be sent back and are ignored. A line at quantity 0 is left out unless it notes a `correction_qty`."},"OrderPreviewCancel":{"properties":{"order_id":{"type":"string","minLength":1,"title":"Order Id","description":"The order to cancel."},"cancel":{"type":"boolean","const":true,"title":"Cancel","description":"`true`: preview the cancel."}},"additionalProperties":false,"type":"object","required":["order_id","cancel"],"title":"OrderPreviewCancel","description":"Preview a cancel: what `DELETE /v1/orders/{order_id}` would cancel."},"OrderPreviewCopiedFrom":{"properties":{"order_id":{"type":"string","title":"Order Id"},"order_no":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Order No"},"order_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Date"},"lines":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Lines","description":"Per line id of the older order: its `price`, `discount`, `price_unit` and `quantity`."}},"type":"object","required":["order_id","lines"],"title":"OrderPreviewCopiedFrom","description":"The older order a create repeats (`copy_from`)."},"OrderPreviewOrder":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The order id."},"order_no":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Order No","description":"The order number, unique in the workspace."},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"order_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Date","description":"Delivery day, `YYYY-MM-DD`."},"order_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Type","description":"`order`, `additional`, `return`, `credit`, `special`, `internet` or `catering`."},"erp_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Erp Kind","description":"The ERP document kind, on an order the `special` bucket does not name: a stock count, a loss, a conversion or a transfer. Read-only, derived \u2014 `order_type` stays the stored bucket."},"delivery_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Time"},"tour_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tour Id"},"tour_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tour Name","description":"The tour's current name; absent when the tour is gone."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"text_block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Block Id"},"text_block_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Block Name"},"special_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Address"},"return_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Reason"},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id","description":"A branch transfer: the shop that receives the goods."},"transfer_leg":{"anyOf":[{"type":"string","enum":["in","out"]},{"type":"null"}],"title":"Transfer Leg","description":"A branch transfer: the sending (`out`) or the receiving (`in`) document."},"shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Id"},"counterpart_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpart Shop Id"},"transfer_pair_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Pair Id"},"transfer":{"anyOf":[{"$ref":"#/components/schemas/OrderTransferLink"},{"type":"null"}]},"source_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Offer Id"},"source_offer_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Offer No"},"draft_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Order Id"},"positions":{"anyOf":[{"items":{"$ref":"#/components/schemas/OrderRecordPosition"},"type":"array"},{"type":"null"}],"title":"Positions"},"total_net":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Net","description":"Minor units."},"total_vat":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Vat","description":"Minor units."},"total_gross":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Gross","description":"Minor units."},"total_net_before_discount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Net Before Discount","description":"What the lines came to before their discounts."},"is_invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Invoiced"},"is_editable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Editable","description":"False when the order is invoiced, imported or the workspace's order ledger is kept elsewhere."},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"True when an import owns the order."},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind","description":"The channel the order came through, when not the back office (for example `b2b`, `click_collect`)."},"ledger_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ledger Owned","description":"Present (true) only while another system keeps the workspace's order ledger."},"cashassist":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cashassist","description":"Till provenance of an order booked at a till."},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money","description":"The order's own `total` and `total_after_discount` as its source states them, minor units."},"warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Warnings","description":"The lines a save-time rule left out, each with `position_id`, `code` and `message`."},"dropped":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Dropped","description":"On a create that repeats an order (`copy_from`): the lines left out because their article never goes on an order (\"Visible in\" sale only or hidden), each by article number, else name, null when it has neither. Absent when nothing was left out."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Send back as `expected_version` to refuse an edit of an order someone changed since."},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO timestamp; absent on older orders."},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At","description":"When the order was created at its source (the till, an imported system), as sent; absent when it was not given."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"tax_summary":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tax Summary","description":"Per VAT rate: `rate_bps`, `net`, `vat`."},"email_sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sent At"}},"type":"object","title":"OrderPreviewOrder","description":"The order a preview shows: as the write would store it (no number or id\non a create), with its totals per VAT rate."},"OrderPreviewRefusal":{"properties":{"status":{"type":"integer","title":"Status"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["status","code","message"],"title":"OrderPreviewRefusal","description":"What the write would answer instead of storing the lines."},"OrderPreviewResult":{"properties":{"mode":{"type":"string","enum":["create","update","cancel"],"title":"Mode"},"order":{"$ref":"#/components/schemas/OrderPreviewOrder","description":"The order as the write would store it."},"current":{"anyOf":[{"$ref":"#/components/schemas/OrderPreviewOrder"},{"type":"null"}],"description":"An edit's or cancel's order as it is now; null on a create."},"warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Warnings","description":"The lines a lead-time, lot, min/max or split rule leaves out."},"line_marks":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Line Marks","description":"Per line id: `discount_manual`, `source_line_id`."},"copied_from":{"anyOf":[{"$ref":"#/components/schemas/OrderPreviewCopiedFrom"},{"type":"null"}]},"refusal":{"anyOf":[{"$ref":"#/components/schemas/OrderPreviewRefusal"},{"type":"null"}],"description":"The write's refusal for these lines, or null when it would store them."},"dropped":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","title":"Dropped","description":"The lines a repeat (`copy_from`) leaves out because their article never goes on an order (\"Visible in\" sale only or hidden): each by article number, else name, null when it has neither."}},"type":"object","required":["mode","order","current","warnings","line_marks","copied_from","refusal"],"title":"OrderPreviewResult","description":"`POST /v1/orders/preview`: what the write would store, not stored."},"OrderPreviewUpdate":{"properties":{"order_type":{"anyOf":[{"type":"string","enum":["order","additional","return","credit","special","internet","catering"]},{"type":"null"}],"title":"Order Type","description":"`order` a regular order; `additional` an additional order on top of the day's regular one; `special` a special order outside the usual range; `catering` a catering order; `internet` an order from the webshop; `return` goods coming back; `credit` a credit to the customer. On `return` and `credit` the quantities are stored negative, whatever sign is sent."},"delivery_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Time","description":"The delivery time as printed, for example `06:30`."},"tour_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Tour Id","description":"The delivery tour."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"A reference of yours, printed on the delivery note."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note printed on the delivery note."},"special_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Address","description":"A delivery address for this order only, as printed."},"return_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Reason","description":"A `return` or `credit` only: why it was raised."},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id","description":"A branch transfer only: the shop that receives the goods."},"text_block_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Text Block Id","description":"A text block printed on the delivery note."},"positions":{"anyOf":[{"items":{"$ref":"#/components/schemas/OrderPositionInput"},"type":"array"},{"type":"null"}],"title":"Positions","description":"All of the order's lines. Instead of `line_changes`."},"line_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineChange"},"type":"array"},{"type":"null"}],"title":"Line Changes","description":"Only the lines that change; every other line stays as stored. Instead of `positions`."},"order_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Order Date","description":"Move the order to another delivery day, `YYYY-MM-DD`: the same number and prices, its lines checked again for the new day."},"expected_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Version","description":"The `version` you read. When sent, the edit is refused (409 `version_conflict`) if the order changed since."},"creation_options":{"anyOf":[{"$ref":"#/components/schemas/CreationOptions"},{"type":"null"}],"description":"What happens to a line that breaks an ordering rule, when the lines or the day change."},"order_id":{"type":"string","minLength":1,"title":"Order Id","description":"The order to edit."}},"additionalProperties":false,"type":"object","required":["order_id"],"title":"OrderPreviewUpdate","description":"Preview an edit: the order's id beside the body of\n`PATCH /v1/orders/{order_id}`."},"OrderRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"The order id."},"order_no":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Order No","description":"The order number, unique in the workspace."},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"order_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Date","description":"Delivery day, `YYYY-MM-DD`."},"order_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Type","description":"`order`, `additional`, `return`, `credit`, `special`, `internet` or `catering`."},"erp_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Erp Kind","description":"The ERP document kind, on an order the `special` bucket does not name: a stock count, a loss, a conversion or a transfer. Read-only, derived \u2014 `order_type` stays the stored bucket."},"delivery_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Time"},"tour_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tour Id"},"tour_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tour Name","description":"The tour's current name; absent when the tour is gone."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"text_block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Block Id"},"text_block_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Block Name"},"special_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Address"},"return_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Reason"},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id","description":"A branch transfer: the shop that receives the goods."},"transfer_leg":{"anyOf":[{"type":"string","enum":["in","out"]},{"type":"null"}],"title":"Transfer Leg","description":"A branch transfer: the sending (`out`) or the receiving (`in`) document."},"shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Id"},"counterpart_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpart Shop Id"},"transfer_pair_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Pair Id"},"transfer":{"anyOf":[{"$ref":"#/components/schemas/OrderTransferLink"},{"type":"null"}]},"source_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Offer Id"},"source_offer_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Offer No"},"draft_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Order Id"},"positions":{"anyOf":[{"items":{"$ref":"#/components/schemas/OrderRecordPosition"},"type":"array"},{"type":"null"}],"title":"Positions"},"total_net":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Net","description":"Minor units."},"total_vat":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Vat","description":"Minor units."},"total_gross":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Gross","description":"Minor units."},"total_net_before_discount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Net Before Discount","description":"What the lines came to before their discounts."},"is_invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Invoiced"},"is_editable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Editable","description":"False when the order is invoiced, imported or the workspace's order ledger is kept elsewhere."},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"True when an import owns the order."},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind","description":"The channel the order came through, when not the back office (for example `b2b`, `click_collect`)."},"ledger_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ledger Owned","description":"Present (true) only while another system keeps the workspace's order ledger."},"cashassist":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cashassist","description":"Till provenance of an order booked at a till."},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money","description":"The order's own `total` and `total_after_discount` as its source states them, minor units."},"warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Warnings","description":"The lines a save-time rule left out, each with `position_id`, `code` and `message`."},"dropped":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Dropped","description":"On a create that repeats an order (`copy_from`): the lines left out because their article never goes on an order (\"Visible in\" sale only or hidden), each by article number, else name, null when it has neither. Absent when nothing was left out."},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Send back as `expected_version` to refuse an edit of an order someone changed since."},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO timestamp; absent on older orders."},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At","description":"When the order was created at its source (the till, an imported system), as sent; absent when it was not given."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["_id"],"title":"OrderRecord","description":"An order as `POST /v1/orders`, `PATCH /v1/orders/{order_id}`,\n`GET /v1/orders` and `POST /v1/orders/bulk` return it."},"OrderRecordPosition":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The line's id, unique within its order."},"row_type":{"anyOf":[{"type":"string","enum":["normal","page_break","group_header"]},{"type":"null"}],"title":"Row Type","description":"An article line (`normal`) or a layout row."},"article_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Id"},"article_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article No"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The article name as billed."},"individual_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Individual Description","description":"An extra text for this line only."},"guest_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Note","description":"What the guest asked for on this item when they ordered online; absent on a line that was not. Read-only: the back office writes `individual_description`, not this."},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity","description":"Negative on a return or credit order."},"correction_qty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Correction Qty","description":"A noted correction quantity; never changes the money."},"quantity_per_lot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity Per Lot"},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price","description":"Net unit price in minor units (cents), per `price_unit`."},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount","description":"Discount in percent, 0 to 100."},"vat_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code"},"price_unit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Unit","description":"What `price` is quoted per: 1, 100 or 1000 units. Always stated on an article line."},"qty_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qty Unit","description":"What the quantity counts: each, kg, g, g100 or hour."},"priced_by":{"anyOf":[{"type":"string","enum":["till","shop"]},{"type":"null"}],"title":"Priced By","description":"Who set the price when it is not the customer's conditions; a change of quantity keeps it."},"splitting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Splitting","description":"Delivery-splitting pattern, parts separated by `|` (`8` fixed, `40%` percent, `r` the rest)."},"splitting_parts":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Splitting Parts","description":"The quantities the splitting pattern resolves to."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Net line total after the discount, minor units."},"gross_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Price","description":"A VAT-inclusive line only: the unit price with VAT."},"gross_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gross Total","description":"The line total with VAT, minor units."},"source_money":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Money","description":"An imported line only: the source system's own `unit`, `total` and `total_after_discount`, minor units."},"delivery_vat_mode":{"anyOf":[{"type":"string","enum":["included","excluded","none"]},{"type":"null"}],"title":"Delivery Vat Mode","description":"The delivery line only: how its charge is quoted."},"vat_split":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Vat Split","description":"The delivery line only: its charge per VAT rate, as `{vat_code, net}`."}},"type":"object","title":"OrderRecordPosition","description":"One order line as the order routes return it."},"OrderTour":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrderTour","description":"A delivery tour an order may name in `tour_id`."},"OrderTourPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderTour"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"required":{"type":"boolean","title":"Required","description":"True when every order must name one of these tours."}},"type":"object","required":["data","has_more","required"],"title":"OrderTourPage","description":"`GET /v1/orders/tours`."},"OrderTransferLink":{"properties":{"pair_id":{"type":"string","title":"Pair Id"},"in_order_id":{"type":"string","title":"In Order Id"},"in_order_no":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"In Order No"},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id"}},"type":"object","required":["pair_id","in_order_id"],"title":"OrderTransferLink","description":"The receiving leg a branch transfer created, on the create's answer."},"OrderTypePage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderTypeRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"OrderTypePage"},"OrderTypeRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"system_type":{"anyOf":[{"type":"string","enum":["return","transfer","delivery_correction","order","credit_customer","preorder_credit_customer","customer_order","preorder_individual","preorder_collective","loss","conversion","inventory"]},{"type":"null"}],"title":"System Type","description":"One of the predefined kinds: `order` = a customer order, `return` = goods coming back, `transfer` = goods moved between branches, `delivery_correction`, `credit_customer`, `preorder_credit_customer`, `customer_order`, `preorder_individual`, `preorder_collective`, `loss`, `conversion`, `inventory`; `null` = a custom kind of your own.","examples":["order"]},"type_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Type Code","description":"Numeric code of the kind as the till and the source system know it; filled from `system_type` when omitted.","examples":[2]},"active":{"type":"boolean","title":"Active","description":"`false` hides the order kind on every till without deleting it.","default":true},"first_date":{"type":"integer","title":"First Date","description":"The first day an order may be placed for: 0 to 6 = that many days from today (0 = today), 99 = today only, 98 = the inventory days (the till treats it as any day from today on).","default":99,"examples":[1]},"date_span":{"type":"integer","title":"Date Span","description":"How many days from `first_date` on an order may be placed for (7 = that day and the six after it); 0 = no limit.","default":0,"examples":[7]},"report_count":{"type":"integer","title":"Report Count","description":"How many orders of this kind a till may send for one day: 1, 2, 3, or 99 = unlimited.","default":1,"examples":[99]},"weekdays":{"items":{"type":"integer","maximum":6.0,"minimum":0.0},"type":"array","title":"Weekdays","description":"Weekdays an order may be placed on: 0 = Monday \u2026 6 = Sunday; empty = every day.","examples":[[0,1,2,3,4]]},"credit_client_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Credit Client Id","description":"The customer the order is for: a standard-customer slot number (1 to N, resolved per shop) or a customer id (`cust_\u2026`); `null` = none preset."},"show_all_button":{"type":"boolean","title":"Show All Button","description":"`true`: the till's order sheet offers a button that lists every article.","default":false},"template_mode":{"type":"boolean","title":"Template Mode","description":"`true`: the till opens the order sheet in its template view.","default":false},"leave_quantity_empty":{"type":"boolean","title":"Leave Quantity Empty","description":"`true`: the order sheet's quantity column starts empty instead of the customer's usual quantity.","default":false},"ordinal":{"type":"integer","title":"Ordinal","description":"Sort position among the order kinds on the till; lower comes first.","default":0},"pos_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Pos Ids","description":"Tills (`pos_\u2026`) that offer this order kind; empty = no till. Legacy: kept in step with `assignment`, which wins when both are sent."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Output"},{"type":"null"}],"description":"Where this order kind is offered: `only` these regions, shops and tills, `except` them, or `all` tills. Nothing ticked (`only` with empty lists) is no till."},"show_statistics":{"type":"boolean","title":"Show Statistics","description":"`true`: the order sheet shows the comparison statistics of `statistic_date_1` and `statistic_date_2`.","default":false},"statistic_date_1":{"type":"integer","title":"Statistic Date 1","description":"First comparison day, in days before the order date; 0 = hidden.","default":0},"statistic_date_2":{"type":"integer","title":"Statistic Date 2","description":"Second comparison day, in days before the order date; 0 = hidden.","default":0},"product_source":{"type":"string","enum":["wawi","cashassist"],"title":"Product Source","description":"Where the till's order sheet takes its article rows from: `wawi` = the customer's standing order, `cashassist` = the till's own assortment, filtered by `article_list_filter`.","default":"wawi"},"article_list_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article List Filter","description":"Which of the till's articles the order sheet lists when `product_source` is `cashassist`, such as `Ret5=True`; `null` = all."},"no_export_to_fa":{"type":"boolean","title":"No Export To Fa","description":"`true`: the order kind is kept out of the merchandise management export; reporting only.","default":false},"print_on_send":{"type":"boolean","title":"Print On Send","description":"`true`: the till prints the order slip automatically when an order of this kind is sent; `false`: no slip on send (the till's Print button still prints).","default":true},"print_copies":{"type":"integer","maximum":99.0,"minimum":1.0,"title":"Print Copies","description":"How many copies of the order slip the till prints by itself after a send (1 or more); only while `print_on_send` is `true`. The Print button prints one.","default":1},"branch_supply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Branch Supply","description":"Branch delivery (forecast): `true` = an order of this kind is goods delivered into a branch, for the sold-out check, the day balance and the branch goods flow; `false` = it is not; `null` = by kind: an `order` counts, every other kind does not. Returns always count as goods going back and transfers always count (plus at the receiving branch, minus at the sending one), whatever this says."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the order kind as the till shows it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"code":{"type":"integer","title":"Code","description":"Number of the order kind as staff know it.","examples":[2]}},"type":"object","required":["_id","name","code"],"title":"OrderTypeRecord"},"OrderUpdate":{"properties":{"order_type":{"anyOf":[{"type":"string","enum":["order","additional","return","credit","special","internet","catering"]},{"type":"null"}],"title":"Order Type","description":"`order` a regular order; `additional` an additional order on top of the day's regular one; `special` a special order outside the usual range; `catering` a catering order; `internet` an order from the webshop; `return` goods coming back; `credit` a credit to the customer. On `return` and `credit` the quantities are stored negative, whatever sign is sent."},"delivery_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Time","description":"The delivery time as printed, for example `06:30`."},"tour_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Tour Id","description":"The delivery tour."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"A reference of yours, printed on the delivery note."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note printed on the delivery note."},"special_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Address","description":"A delivery address for this order only, as printed."},"return_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Reason","description":"A `return` or `credit` only: why it was raised."},"target_shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shop Id","description":"A branch transfer only: the shop that receives the goods."},"text_block_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Text Block Id","description":"A text block printed on the delivery note."},"positions":{"anyOf":[{"items":{"$ref":"#/components/schemas/OrderPositionInput"},"type":"array"},{"type":"null"}],"title":"Positions","description":"All of the order's lines. Instead of `line_changes`."},"line_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineChange"},"type":"array"},{"type":"null"}],"title":"Line Changes","description":"Only the lines that change; every other line stays as stored. Instead of `positions`."},"order_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Order Date","description":"Move the order to another delivery day, `YYYY-MM-DD`: the same number and prices, its lines checked again for the new day."},"expected_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Version","description":"The `version` you read. When sent, the edit is refused (409 `version_conflict`) if the order changed since."},"creation_options":{"anyOf":[{"$ref":"#/components/schemas/CreationOptions"},{"type":"null"}],"description":"What happens to a line that breaks an ordering rule, when the lines or the day change."}},"additionalProperties":false,"type":"object","title":"OrderUpdate","description":"A change to an order: its details, its lines or both. Only the fields sent change, and `null` clears a field, except `positions`, `order_type` and `order_date`, which an order cannot do without. `positions`, when sent, replace all the lines, so send the complete list; `line_changes` names only the lines that change. The totals are computed again."},"PackageGrant":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The service article (id) the package grants."},"sessions":{"type":"integer","title":"Sessions","description":"How many times.","default":0}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"PackageGrant","description":"One service a prepaid package grants."},"PackageInfo":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/PackageGrant"},"type":"array","title":"Grants","description":"What the package grants."},"validity_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validity Days","description":"Days the package stays valid after purchase; null = no limit."}},"additionalProperties":false,"type":"object","title":"PackageInfo","description":"A prepaid package of several sessions or visits, for gyms, salons and hotels: what it grants and for how many days. Optional."},"PaymentMethodCredentials":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"The provider's API key (e-guma); `null` = not set."},"consumer_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Key","description":"The OAuth consumer key (Gurado); `null` = not set."},"consumer_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Secret","description":"The OAuth consumer secret (Gurado); `null` = not set."}},"additionalProperties":false,"type":"object","title":"PaymentMethodCredentials","description":"The account a provider-backed payment method settles against, such as a voucher provider's API key or OAuth pair. Which fields a provider needs depends on the provider; an incomplete set is refused when the method is switched on, so a draft can be saved. It never reaches a till."},"PaymentMethodPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentMethodRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"PaymentMethodPage"},"PaymentMethodProviderSettings":{"properties":{"protel_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protel Ip","description":"Address of the Protel MPE interface on the hotel network."},"protel_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Protel Port","description":"Port of the Protel MPE interface."},"protel_mpe_hotel":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Protel Mpe Hotel","description":"The Protel site id (MPE hotel) this link posts to."},"apaleo_property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apaleo Property Id","description":"The Apaleo property this link posts to."},"transfer_all_receipts":{"type":"boolean","title":"Transfer All Receipts","description":"`true`: every receipt goes to the hotel system, not only room charges.","default":false},"auto_print_receipt":{"type":"boolean","title":"Auto Print Receipt","description":"`true`: the till prints the receipt after a room charge by itself.","default":false}},"additionalProperties":false,"type":"object","title":"PaymentMethodProviderSettings","description":"How a provider-backed payment method reaches the provider's system, and how the link behaves. Nothing here is secret, and the tills receive it: for a hotel system on the hotel's own network, the till is what talks to it."},"PaymentMethodRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the tender as the till's pay button and the receipt show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"kind":{"type":"string","enum":["cash","card","credit","voucher","room","customer","loyalty","platform"],"title":"Kind","description":"What the tender is: `cash`; `card` = a payment terminal; `credit` = a credit tender settled outside any system (TWINT, a house card); `voucher` = gift vouchers through a voucher provider; `room` = charged to a hotel room through the property system; `customer` = charged to a credit customer's account; `loyalty` = the customer card's stored value; `platform` = a delivery platform's receivable, booked by the till by itself. A new method may be `card`, `credit`, `voucher`, `room` or `platform`; the till offers the other three without a record.","examples":["card"]},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Short code of the tender, free text; `null` = none."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"The external system the tender settles through: required for `voucher` (`eguma`, `gurado`) and `room` (`protel`, `apaleo`), free text for the rest.","examples":["eguma"]},"credentials":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodCredentials"},{"type":"null"}],"description":"The account the tender settles against; never sent to a till. Sent whole: a key left out is cleared."},"provider_settings":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodProviderSettings"},{"type":"null"}],"description":"How the till reaches the provider's system. Sent whole: a key left out is cleared."},"active":{"type":"boolean","title":"Active","description":"`false` switches the tender off on every till without deleting it.","default":true},"ordinal":{"type":"integer","title":"Ordinal","description":"Sort position of the tender's button on the till; lower comes first.","default":0},"pos_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Pos Ids","description":"Tills (`pos_\u2026`) that offer this tender; only the listed ones do, empty = no till. Legacy: kept in step with `assignment`, which wins when both are sent."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Output"},{"type":"null"}],"description":"Where this tender is offered: `only` these regions, shops and tills, `except` them, or `all` tills. Nothing ticked (`only` with empty lists) is no till."},"requires_terminal":{"type":"boolean","title":"Requires Terminal","description":"`true`: the till hands the amount to a payment terminal and waits for its answer.","default":false},"fibu_account":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Fibu Account","description":"Ledger account this tender books to in the accounting export; `null` = not configured."},"fixed_amount":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fixed Amount","description":"Face value of a fixed-amount voucher key, in minor units: a tap on the till's button books exactly this amount, without asking for one, and the till's `Variabel` setting no longer applies. Only on a `credit` tender or a `voucher` without a provider. `null` = no fixed amount.","examples":[200]},"per_pos":{"additionalProperties":{"$ref":"#/components/schemas/PaymentSlotTillSettings"},"type":"object","title":"Per Pos","description":"Settings that differ per till, keyed by till id (`pos_\u2026`)."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Free key-value data for your own use."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Output"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per field (`name`): the context for machine translation and how each language's text came to be. The server keeps the stored form."}},"type":"object","required":["_id","name","kind"],"title":"PaymentMethodRecord"},"PaymentSlotTillSettings":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The button label on this till; `null` = the method's name."},"receipt_copies":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Receipt Copies","description":"Customer receipts this till prints for the tender; `null` = one."},"requires_signature":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Signature","description":"`true`: this till asks for a signature (card tenders only)."},"print_tip_line":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Tip Line","description":"`true`: this till's receipt for the tender prints a blank tip line."},"print_signature_line":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Signature Line","description":"`true`: this till's receipt for the tender prints a blank signature line."},"allow_partial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Partial","description":"`false`: this till takes the tender only for the whole amount."},"min_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Amount","description":"Smallest amount this till takes the tender for, in minor units."},"max_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Amount","description":"Largest amount this till takes the tender for, in minor units."}},"additionalProperties":false,"type":"object","title":"PaymentSlotTillSettings","description":"One till's own settings for a payment method, keyed by `pos_id`: the button name the cashier sees (and, except on a card terminal, the name the receipt prints, cut to 20 characters), the number of receipt copies, whether a signature is needed, whether a partial payment is allowed, and the amount limits. An empty field, or a till without an entry, uses the defaults: one copy, no signature, partial payment allowed, no limits."},"PickupBoardAppearance":{"properties":{"logo":{"anyOf":[{"type":"string","enum":["company","custom","none"]},{"type":"null"}],"title":"Logo"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"tagline":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Tagline"},"show_clock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Clock"},"colors":{"anyOf":[{"$ref":"#/components/schemas/PickupBoardColors"},{"type":"null"}]},"titles":{"anyOf":[{"$ref":"#/components/schemas/PickupBoardTitles"},{"type":"null"}]},"footer_left":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Footer Left"},"footer_right":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Footer Right"},"highlight_newest_sec":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":0.0},{"type":"null"}],"title":"Highlight Newest Sec"},"chime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Chime"},"chime_volume":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Chime Volume"},"split":{"anyOf":[{"type":"string","enum":["third","half","two_thirds"]},{"type":"null"}],"title":"Split"},"preparing_style":{"anyOf":[{"type":"string","enum":["list","tiles","hidden"]},{"type":"null"}],"title":"Preparing Style"},"font":{"anyOf":[{"type":"string","enum":["system","serif","rounded","condensed"]},{"type":"null"}],"title":"Font"}},"additionalProperties":false,"type":"object","title":"PickupBoardAppearance","description":"How a Pick-up Display looks. Lives on the company (workspace settings\n`pickup_board`) and on each shop (`shops.pickup_board`); /v1/kds resolves\ncompany \u2192 shop field by field (`resolve_pickup_appearance`) and fills the\ndefaults. Every field optional: null/absent = inherit, then the default."},"PickupBoardColors":{"properties":{"background":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background"},"bar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bar"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"ready_panel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready Panel"},"tile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tile"}},"additionalProperties":false,"type":"object","title":"PickupBoardColors","description":"The board's five colours. `background` = canvas and the preparing column,\n`bar` = header and footer bar (the device picks white or dark ink on it),\n`text` = all ink including the numbers, `ready_panel` = the ready column,\n`tile` = the number tile."},"PickupBoardTitles":{"properties":{"preparing":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Preparing"},"preparing_sub":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Preparing Sub"},"ready":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Ready"},"ready_sub":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Ready Sub"}},"additionalProperties":false,"type":"object","title":"PickupBoardTitles","description":"The column titles. Null title = the app's own wording (\"In Vorbereitung\" /\n\"Abholbereit\"); null subtitle = no subtitle line."},"Placement":{"properties":{"layout_id":{"type":"string","title":"Layout Id","description":"The till template (id)."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"The tile's place on a manually arranged template; null on a sorted one."}},"additionalProperties":false,"type":"object","required":["layout_id"],"title":"Placement","description":"One link between an article and a till layout: which layout, and, on a layout arranged by hand, where among its tiles (`position`). An article can sit on several layouts, each with its own position. `position` is empty on a layout sorted by name or number."},"PointsTopup":{"properties":{"buttons":{"items":{"$ref":"#/components/schemas/PointsTopupButton"},"type":"array","maxItems":8,"title":"Buttons","description":"The conversions, shown in this order; at most 8, each with its own `points`."}},"additionalProperties":false,"type":"object","title":"PointsTopup","description":"Conversion buttons of a points top-up article: what a till offers to turn a card's points into card balance."},"PointsTopupButton":{"properties":{"points":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Points","description":"The loyalty points the button converts."},"amount":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Amount","description":"The card balance those points buy, in minor units (1000 = 10.00)."}},"additionalProperties":false,"type":"object","required":["points","amount"],"title":"PointsTopupButton","description":"One conversion: so many points become so much card balance (minor units)."},"PosCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the till as staff and reports call it.","examples":["Kasse 1"]},"shop_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shop Id","description":"Shop (`shp_\u2026`) the till stands in."},"profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Id","description":"Retired: settings profiles are gone and a till's settings live on the till. Older records still hold it; a write ignores it.","readOnly":true},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the fleet and from configuration, kept for its numbering and history.","default":"active"},"mode":{"anyOf":[{"type":"string","enum":["desktop_pos","mobile_pos","self_checkout","label","picking"]},{"type":"null"}],"title":"Mode","description":"What kind of station the till is: `desktop_pos` = a counter till, `mobile_pos` = a handheld waiter till, `self_checkout` = a customer-facing kiosk. Nobody has to set it: the pairing reads it from the paired device (`mode_source: detected`) and an unpairing clears it. Writing one of the three overrules the device (`mode_source: manual`) until the till is unpaired; `null` gives it back to the device. `label` is read on a labelling station and follows `data_role: labeling`; `picking` is a legacy value that is only read.","examples":["desktop_pos"]},"mode_source":{"anyOf":[{"type":"string","enum":["detected","manual"]},{"type":"null"}],"title":"Mode Source","description":"Who set `mode`: `detected` = read from the paired device, `manual` = set by an admin against it. `null` on a labelling station and on a till no device has set yet.","readOnly":true},"web_till":{"type":"boolean","title":"Web Till","description":"`true`: the till runs in a browser rather than on a native device; only a web device may pair with it.","default":false},"discount_limit_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Discount Limit Bps","description":"The largest discount a cashier may give on this till, in basis points (1000 = 10 %); `null` = the till's built-in cap of 10 %.","examples":[1000]},"discounts_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Discounts Disabled","description":"`true`: the till offers no discounts at all; `null` = discounts are available."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language the till runs and prints in, as a locale code (`de-CH`, `en-US`); `null` = the company's default.","examples":["de-CH"]},"appearance":{"anyOf":[{"type":"string","enum":["light","dark","system"]},{"type":"null"}],"title":"Appearance","description":"The till's look: `light`, `dark` or `system`; `null` = light."},"sunmi_kiosk":{"anyOf":[{"type":"string","enum":["off","on"]},{"type":"null"}],"title":"Sunmi Kiosk","description":"Sunmi kiosk mode on a Sunmi device that has it: `on` = the till keeps itself locked in Sunmi's kiosk (Home, Recents and the status bar blocked); `off` = the till leaves the kiosk and shows no kiosk warning. On a K2, S2 or T2 only a person can put the till on the kiosk list, in Settings > Lab > Kiosk on the device. `null` = `on`.","examples":["off"]},"login_mode":{"anyOf":[{"type":"string","enum":["with_rfid","without_rfid","multi_user","multi_user_rfid"]},{"type":"null"}],"title":"Login Mode","description":"How cashiers sign in on a counter or handheld till: `without_rfid` = one active cashier at a time, by PIN (the default); `multi_user` = several active cashiers at once, each with an open order of their own; `with_rfid` and `multi_user_rfid` = the same two with an RFID card, which behave like `without_rfid` and `multi_user` until a card reader is connected. `null` = `without_rfid`.","examples":["multi_user"]},"update_min_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Update Min Version","description":"With `update_policy` `hard`, the oldest app release a till on a device (not in a browser) may still sell with: one to four whole numbers separated by dots, at most 32 characters; `null` = no minimum.","examples":["2026.10.4"]},"update_latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Update Latest Version","description":"The app release a till on a device (not in a browser) is nudged towards: below it the till shows a banner and keeps selling. One to four whole numbers separated by dots, at most 32 characters; `null` = no nudge.","examples":["2026.10.19.2"]},"update_policy":{"anyOf":[{"type":"string","enum":["soft","hard"]},{"type":"null"}],"title":"Update Policy","description":"`hard` = a till on a device whose app is older than `update_min_version` stops selling until it is updated; `soft` = the minimum stops nothing, and the till only shows the banner below `update_latest_version`. `null` = `soft`.","examples":["hard"]},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country whose conventions the till follows (the VAT label, country-specific receipt blocks); `null` = the region's country.","examples":["CH"]},"fault_alert_phones":{"items":{"type":"string"},"type":"array","title":"Fault Alert Phones","description":"Phone numbers that get a text message when this till reports a hardware fault (printer, paper, payment terminal); empty = nobody."},"active_tare_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Tare Ids","description":"Retired: tares are chosen per article. Older records keep it; the till ignores it."},"drawer_close_triggers_finalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drawer Close Triggers Finalize","description":"`true`: closing the cash drawer completes the payment step."},"drawer_open_during_closing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drawer Open During Closing","description":"`true`: the daily closing may start and run with the cash drawer open."},"in_house_button_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Button Enabled","description":"Whether the till shows the eat-in or take-away switch; `null` = shown."},"in_house_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Default","description":"`true`: the till starts a sale as eat-in rather than take-away."},"no_in_house_prices":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No In House Prices","description":"`true`: the eat-in switch changes the VAT rate only, not the price."},"in_house_selection":{"anyOf":[{"type":"string","enum":["always_takeaway","ask","always_in_house"]},{"type":"null"}],"title":"In House Selection","description":"Self-service: `ask` asks the guest where they eat before the order, `always_takeaway` and `always_in_house` never ask; `null` = ask only when the kiosk layout offers order types."},"in_house_confirm_before_payment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Confirm Before Payment","description":"`true`: the pay button asks eat-in or take-away before any tender opens, and the answer re-prices the sale."},"pager_prompt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pager Prompt Enabled","description":"`true`: a sale holding an article that needs a pager asks for the pager number before payment."},"concept_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concept Number","description":"Which of the workspace's six sales concepts this till sells in, 1 to 6; `null` or 0 = none. A concept swaps article texts and the layout page name, never prices.","examples":[1]},"returns_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returns Disabled","description":"`true`: the till hides the return action on a line."},"returns_to_card":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returns To Card","description":"`true`: on a bill whose total is below zero the till may pay the customer out to their card on a CCV terminal over OPI, beside cash. Off or absent: such a bill is paid out in cash."},"print_immediate_cancel":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Immediate Cancel","description":"`true`: deleting a line from an open sale prints a cancellation slip."},"hospitality_receipt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hospitality Receipt Enabled","description":"`true`: a settled receipt offers the entertainment-expense receipt."},"default_label_template_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Default Label Template Id","description":"The label form the till starts on; `null` = its first form."},"hide_cashback_btn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Cashback Btn","description":"`true`: the payment screen hides its back button."},"hide_open_drawer_btn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Open Drawer Btn","description":"`true`: the till hides the button that opens the drawer without a sale."},"floor_plan_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Floor Plan Default","description":"`true`: every sign-in opens the floor on the plan of the first drawn room; `false` or absent = the grid."},"ask_guest_count":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask Guest Count","description":"`true`: opening a free table first asks how many guests sit down; `false` or absent = the order starts with one guest."},"show_chf_1000_note":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Chf 1000 Note","description":"`true`: a till whose currency is CHF also offers the 1000-franc note to tap, on the pay screen and in the closing's cash count; `false` or absent = notes up to 200 francs. Ignored by a till in any other currency."},"credit_customer_rebook_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Customer Rebook Slot","description":"How a sale charged to a credit customer is booked: `null` or 0 = as a delivery note, with no turnover and no VAT on the till (the back office invoices it later); 1 to 10 = rebooked onto that credit tender slot as an ordinary taxed sale, the customer being the attribution only."},"restaurant_mode_default":{"type":"boolean","title":"Restaurant Mode Default","description":"`true`: the till starts in table mode; only for a shop that has tables.","default":false},"data_role":{"type":"string","enum":["production","test","labeling"],"title":"Data Role","description":"What this till's numbers mean: `production` = real trade, counted in every total; `test` = a real till whose figures stay out of every turnover total; `labeling` = a labelling station that prints labels and sells nothing. `labeling` cannot be set or removed while a device is paired.","default":"production"},"is_demo":{"type":"boolean","title":"Is Demo","description":"`true` on the demo till every workspace gets; its figures count as `test`.","default":false},"tax_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Number","description":"Fallback tax number for the fiscal export, read only where the shop has none."},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"Fallback VAT number, read only where the shop has none."},"device_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Type","description":"The device kind an import recorded (`SMART_CHECKOUT`, `SELF_CHECKOUT`, `MOBILE_WAITER`); the kitchen-print picker offers the tills by it."}},"additionalProperties":false,"type":"object","required":["name"],"title":"PosCreate","description":"A till (point of sale): the logical register a device is paired to."},"PosPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PosRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"PosPage"},"PosRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the till as staff and reports call it.","examples":["Kasse 1"]},"shop_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shop Id","description":"Shop (`shp_\u2026`) the till stands in."},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the fleet and from configuration, kept for its numbering and history.","default":"active"},"mode":{"anyOf":[{"type":"string","enum":["desktop_pos","mobile_pos","self_checkout","label","picking"]},{"type":"null"}],"title":"Mode","description":"What kind of station the till is: `desktop_pos` = a counter till, `mobile_pos` = a handheld waiter till, `self_checkout` = a customer-facing kiosk. Nobody has to set it: the pairing reads it from the paired device (`mode_source: detected`) and an unpairing clears it. Writing one of the three overrules the device (`mode_source: manual`) until the till is unpaired; `null` gives it back to the device. `label` is read on a labelling station and follows `data_role: labeling`; `picking` is a legacy value that is only read.","examples":["desktop_pos"]},"web_till":{"type":"boolean","title":"Web Till","description":"`true`: the till runs in a browser rather than on a native device; only a web device may pair with it.","default":false},"discount_limit_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Discount Limit Bps","description":"The largest discount a cashier may give on this till, in basis points (1000 = 10 %); `null` = the till's built-in cap of 10 %.","examples":[1000]},"discounts_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Discounts Disabled","description":"`true`: the till offers no discounts at all; `null` = discounts are available."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language the till runs and prints in, as a locale code (`de-CH`, `en-US`); `null` = the company's default.","examples":["de-CH"]},"appearance":{"anyOf":[{"type":"string","enum":["light","dark","system"]},{"type":"null"}],"title":"Appearance","description":"The till's look: `light`, `dark` or `system`; `null` = light."},"sunmi_kiosk":{"anyOf":[{"type":"string","enum":["off","on"]},{"type":"null"}],"title":"Sunmi Kiosk","description":"Sunmi kiosk mode on a Sunmi device that has it: `on` = the till keeps itself locked in Sunmi's kiosk (Home, Recents and the status bar blocked); `off` = the till leaves the kiosk and shows no kiosk warning. On a K2, S2 or T2 only a person can put the till on the kiosk list, in Settings > Lab > Kiosk on the device. `null` = `on`.","examples":["off"]},"login_mode":{"anyOf":[{"type":"string","enum":["with_rfid","without_rfid","multi_user","multi_user_rfid"]},{"type":"null"}],"title":"Login Mode","description":"How cashiers sign in on a counter or handheld till: `without_rfid` = one active cashier at a time, by PIN (the default); `multi_user` = several active cashiers at once, each with an open order of their own; `with_rfid` and `multi_user_rfid` = the same two with an RFID card, which behave like `without_rfid` and `multi_user` until a card reader is connected. `null` = `without_rfid`.","examples":["multi_user"]},"update_min_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Update Min Version","description":"With `update_policy` `hard`, the oldest app release a till on a device (not in a browser) may still sell with: one to four whole numbers separated by dots, at most 32 characters; `null` = no minimum.","examples":["2026.10.4"]},"update_latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Update Latest Version","description":"The app release a till on a device (not in a browser) is nudged towards: below it the till shows a banner and keeps selling. One to four whole numbers separated by dots, at most 32 characters; `null` = no nudge.","examples":["2026.10.19.2"]},"update_policy":{"anyOf":[{"type":"string","enum":["soft","hard"]},{"type":"null"}],"title":"Update Policy","description":"`hard` = a till on a device whose app is older than `update_min_version` stops selling until it is updated; `soft` = the minimum stops nothing, and the till only shows the banner below `update_latest_version`. `null` = `soft`.","examples":["hard"]},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country whose conventions the till follows (the VAT label, country-specific receipt blocks); `null` = the region's country.","examples":["CH"]},"fault_alert_phones":{"items":{"type":"string"},"type":"array","title":"Fault Alert Phones","description":"Phone numbers that get a text message when this till reports a hardware fault (printer, paper, payment terminal); empty = nobody."},"active_tare_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Tare Ids","description":"Retired: tares are chosen per article. Older records keep it; the till ignores it."},"drawer_close_triggers_finalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drawer Close Triggers Finalize","description":"`true`: closing the cash drawer completes the payment step."},"drawer_open_during_closing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drawer Open During Closing","description":"`true`: the daily closing may start and run with the cash drawer open."},"in_house_button_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Button Enabled","description":"Whether the till shows the eat-in or take-away switch; `null` = shown."},"in_house_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Default","description":"`true`: the till starts a sale as eat-in rather than take-away."},"no_in_house_prices":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No In House Prices","description":"`true`: the eat-in switch changes the VAT rate only, not the price."},"in_house_selection":{"anyOf":[{"type":"string","enum":["always_takeaway","ask","always_in_house"]},{"type":"null"}],"title":"In House Selection","description":"Self-service: `ask` asks the guest where they eat before the order, `always_takeaway` and `always_in_house` never ask; `null` = ask only when the kiosk layout offers order types."},"in_house_confirm_before_payment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In House Confirm Before Payment","description":"`true`: the pay button asks eat-in or take-away before any tender opens, and the answer re-prices the sale."},"pager_prompt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pager Prompt Enabled","description":"`true`: a sale holding an article that needs a pager asks for the pager number before payment."},"concept_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concept Number","description":"Which of the workspace's six sales concepts this till sells in, 1 to 6; `null` or 0 = none. A concept swaps article texts and the layout page name, never prices.","examples":[1]},"returns_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returns Disabled","description":"`true`: the till hides the return action on a line."},"returns_to_card":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returns To Card","description":"`true`: on a bill whose total is below zero the till may pay the customer out to their card on a CCV terminal over OPI, beside cash. Off or absent: such a bill is paid out in cash."},"print_immediate_cancel":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Immediate Cancel","description":"`true`: deleting a line from an open sale prints a cancellation slip."},"hospitality_receipt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hospitality Receipt Enabled","description":"`true`: a settled receipt offers the entertainment-expense receipt."},"default_label_template_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Default Label Template Id","description":"The label form the till starts on; `null` = its first form."},"hide_cashback_btn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Cashback Btn","description":"`true`: the payment screen hides its back button."},"hide_open_drawer_btn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Open Drawer Btn","description":"`true`: the till hides the button that opens the drawer without a sale."},"floor_plan_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Floor Plan Default","description":"`true`: every sign-in opens the floor on the plan of the first drawn room; `false` or absent = the grid."},"ask_guest_count":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask Guest Count","description":"`true`: opening a free table first asks how many guests sit down; `false` or absent = the order starts with one guest."},"show_chf_1000_note":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Chf 1000 Note","description":"`true`: a till whose currency is CHF also offers the 1000-franc note to tap, on the pay screen and in the closing's cash count; `false` or absent = notes up to 200 francs. Ignored by a till in any other currency."},"credit_customer_rebook_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Customer Rebook Slot","description":"How a sale charged to a credit customer is booked: `null` or 0 = as a delivery note, with no turnover and no VAT on the till (the back office invoices it later); 1 to 10 = rebooked onto that credit tender slot as an ordinary taxed sale, the customer being the attribution only."},"restaurant_mode_default":{"type":"boolean","title":"Restaurant Mode Default","description":"`true`: the till starts in table mode; only for a shop that has tables.","default":false},"data_role":{"type":"string","enum":["production","test","labeling"],"title":"Data Role","description":"What this till's numbers mean: `production` = real trade, counted in every total; `test` = a real till whose figures stay out of every turnover total; `labeling` = a labelling station that prints labels and sells nothing. `labeling` cannot be set or removed while a device is paired.","default":"production"},"is_demo":{"type":"boolean","title":"Is Demo","description":"`true` on the demo till every workspace gets; its figures count as `test`.","default":false},"tax_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Number","description":"Fallback tax number for the fiscal export, read only where the shop has none."},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"Fallback VAT number, read only where the shop has none."},"device_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Type","description":"The device kind an import recorded (`SMART_CHECKOUT`, `SELF_CHECKOUT`, `MOBILE_WAITER`); the kitchen-print picker offers the tills by it."}},"type":"object","required":["_id","name"],"title":"PosRecord"},"PositionWeighing-Output":{"properties":{"interval_minus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Minus G","description":"The band below the target, in grams."},"interval_plus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Plus G","description":"The band above the target, in grams."},"percent_minus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Minus","description":"The band below the target, percent of it."},"percent_plus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Plus","description":"The band above the target, percent of it."},"weighing_limit_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weighing Limit G","description":"The most one pour may weigh, in grams."},"packing_unit_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Packing Unit G","description":"A pack taken whole rather than weighed, in grams."},"ean":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ean","description":"The barcode the scale checks."},"factor":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Factor","description":"The scale's factor."},"smart_scale_property":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Smart Scale Property","description":"The scale's property slot for the line."},"instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction","description":"An instruction for the scale."}},"type":"object","title":"PositionWeighing","description":"Weighing tolerances of one recipe line on the scale: an absolute band in grams and a percent band. The narrower of the two applies. Optional; a line without it is weighed without a tolerance."},"PriceActionCreate":{"properties":{"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The action's name, per language (`{\"de\": \"Wochenangebot\"}`); at least one language holds text.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"kind":{"type":"string","enum":["fixed_price","promo_price","promo_price_time","quantity","discount"],"title":"Kind","description":"`fixed_price` = a lasting alternative price from `valid_from`; `promo_price` = a promotional price from a date; `promo_price_time` = a promotional price over a date and time range on chosen `days`; `quantity` = a quantity offer (see `quantity_mode`); `discount` = a percentage off every article (`discount_bps`)."},"active":{"type":"boolean","title":"Active","description":"false switches the whole action off; its articles keep their prices in it.","default":true},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the action applies, `YYYY-MM-DD`; null = open."},"valid_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid To","description":"Last day the action applies, `YYYY-MM-DD`; null = open."},"time_from":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Time From","description":"Daily start time, `HH:MM`; null = from the start of the day."},"time_to":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Time To","description":"Daily end time, `HH:MM`; null = to the end of the day."},"days":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Days","description":"ISO weekdays the action applies on, 1 = Monday to 7 = Sunday; empty = every day."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Input"},{"type":"null"}],"description":"Where the action applies; null = wherever its articles are sold."},"cash_register_ids":{"items":{"type":"string"},"type":"array","title":"Cash Register Ids","description":"Legacy till codes of an older import, kept on old records; use `assignment`."},"discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Bps","description":"For a `discount` action: the discount in basis points, 0 to 10000 (1000 = 10 %, 10000 = free)."},"quantity_mode":{"anyOf":[{"type":"string","enum":["staffel","x_for_y","cheapest_free","price_from_qty"]},{"type":"null"}],"title":"Quantity Mode","description":"For a `quantity` action, how it prices: `staffel` = the unit price of the step reached; `x_for_y` = buy `buy_quantity`, pay `pay_quantity`; `cheapest_free` = the cheapest article of one `action_group` is free; `price_from_qty` = the unit price of the matching step."},"members":{"items":{"$ref":"#/components/schemas/PriceActionMember"},"type":"array","title":"Members","description":"The articles of the action, each with its own prices."},"name_variants":{"items":{"type":"string"},"type":"array","title":"Name Variants","description":"Other spellings of the name an import folded into this action; a search finds them too."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A free note."}},"additionalProperties":false,"type":"object","required":["name","kind"],"title":"PriceActionCreate","description":"A price action: a special price, a quantity offer or a discount that applies\nto its articles within its dates, weekdays and hours."},"PriceActionMember":{"properties":{"product_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Product Id","description":"The article (`prd_\u2026`)."},"active":{"type":"boolean","title":"Active","description":"false keeps this article's prices in the action but stops applying them.","default":true},"applied_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied At","description":"When this price was written onto the article itself (`transfer_approved`). Set by the server; send back what a read answered."},"transfer_approved":{"type":"boolean","title":"Transfer Approved","description":"true lets this price be written onto the article itself once `valid_from` arrives.","default":false},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"This article's prices in the action, in the shape of the article's `price_levels`."},"tax_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Tax Ids","description":"VAT rates (tax ids) of the take-away price; empty = the article's."},"dine_in_tax_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Dine In Tax Ids","description":"VAT rates (tax ids) of the in-house price; empty = the article's."},"quantity_breaks":{"items":{"$ref":"#/components/schemas/QuantityBreak"},"type":"array","title":"Quantity Breaks","description":"For a `quantity` action: the quantity steps and the unit price from each on."},"buy_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buy Quantity","description":"For `x_for_y`: how many the guest takes (3 in \"3 for 2\")."},"pay_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Quantity","description":"For `x_for_y`: how many the guest pays for (2 in \"3 for 2\")."},"action_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Group","description":"For `cheapest_free`: the group number; articles of one group count together."},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The source system's id of this article's row, so a re-import updates it instead of adding a second one."}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"PriceActionMember","description":"One article of a price action with its own prices: the price ladders of\nboth channels, the VAT rates and the quantity steps. `active: false` keeps\nthe article's prices in the action but stops applying them."},"PriceActionUpdate":{"properties":{"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"The action's name, per language (`{\"de\": \"Wochenangebot\"}`); at least one language holds text."},"kind":{"anyOf":[{"type":"string","enum":["fixed_price","promo_price","promo_price_time","quantity","discount"]},{"type":"null"}],"title":"Kind","description":"The action's kind as a read answers it. It cannot change; copy the action instead.","readOnly":true},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"false switches the whole action off; its articles keep their prices in it."},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the action applies, `YYYY-MM-DD`; null = open."},"valid_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid To","description":"Last day the action applies, `YYYY-MM-DD`; null = open."},"time_from":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Time From","description":"Daily start time, `HH:MM`; null = from the start of the day."},"time_to":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Time To","description":"Daily end time, `HH:MM`; null = to the end of the day."},"days":{"anyOf":[{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array"},{"type":"null"}],"title":"Days","description":"ISO weekdays the action applies on, 1 = Monday to 7 = Sunday; empty = every day."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Input"},{"type":"null"}],"description":"Where the action applies; null = wherever its articles are sold."},"cash_register_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cash Register Ids","description":"Legacy till codes of an older import, kept on old records; use `assignment`."},"discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Bps","description":"For a `discount` action: the discount in basis points, 0 to 10000 (1000 = 10 %, 10000 = free)."},"quantity_mode":{"anyOf":[{"type":"string","enum":["staffel","x_for_y","cheapest_free","price_from_qty"]},{"type":"null"}],"title":"Quantity Mode","description":"For a `quantity` action, how it prices: `staffel` = the unit price of the step reached; `x_for_y` = buy `buy_quantity`, pay `pay_quantity`; `cheapest_free` = the cheapest article of one `action_group` is free; `price_from_qty` = the unit price of the matching step."},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceActionMember"},"type":"array"},{"type":"null"}],"title":"Members","description":"The articles of the action, each with its own prices. Sent, the list replaces the stored one whole."},"name_variants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Name Variants","description":"Other spellings of the name an import folded into this action; a search finds them too."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A free note."}},"additionalProperties":false,"type":"object","title":"PriceActionUpdate","description":"A change to a price action: only the fields sent change. `kind` stays as\ncreated; copy the action to change it."},"PriceLevelCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"The level's name, unique in the workspace in any letter case: the name an article's price for this level is shown under. Leading and trailing spaces are dropped; a name of spaces only is refused."},"ordinal":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ordinal","description":"The level's step in the price list, from 0. A till layout selects a level by its place in this order, so moving a level changes the price it reads. Left out or null: one past the highest step in the workspace."},"active":{"type":"boolean","title":"Active","description":"Whether the level is in use.","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"PriceLevelCreate","description":"A new price level."},"PriceLevelPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PriceLevelRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"PriceLevelPage"},"PriceLevelRecord":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name","default":""},"active":{"type":"boolean","title":"Active","default":true},"ordinal":{"type":"integer","title":"Ordinal","description":"Rank among the levels (position \u2192 price-level index). Omitted: one past the highest ordinal in the workspace."},"_id":{"type":"string","title":"Id","description":"Record id."}},"type":"object","required":["_id"],"title":"PriceLevelRecord"},"PriceLevelUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name","description":"The level's name, unique in the workspace in any letter case: the name an article's price for this level is shown under. Leading and trailing spaces are dropped; a name of spaces only is refused. May be left out, never null."},"ordinal":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ordinal","description":"The level's step in the price list, from 0. A till layout selects a level by its place in this order, so moving a level changes the price it reads. May be left out, never null."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the level is in use. May be left out, never null."}},"additionalProperties":false,"type":"object","title":"PriceLevelUpdate","description":"A change to a price level: only the fields sent change."},"PriceLevels":{"properties":{"takeaway":{"items":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"array","title":"Takeaway","description":"Up to 10 take-away prices in minor units: index 0 is the base price (`pricing.amount`), 1 to 9 the further price levels; null = a level not set."},"dine_in":{"items":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"array","title":"Dine In","description":"The same ladder for eating in; index 0 is `dine_in.amount`."}},"additionalProperties":false,"type":"object","title":"PriceLevels","description":"The article's prices per price level, in two lists of ten: one for takeaway and one for eating in. Index 0 is the base price (`pricing.amount`, `dine_in.amount`) and indices 1 to 9 the further levels; an empty level has no price. Amounts in minor units. VAT is per list, not per level."},"PriceRule-Input":{"properties":{"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The source system's id of this rule, so a re-import updates it instead of adding a second one."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The rule's name, per language (`{\"de\": \"\u2026\"}`).","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"kind":{"anyOf":[{"type":"string","enum":["fixed_price","promo_price","promo_price_time","quantity","discount"]},{"type":"null"}],"title":"Kind","description":"`fixed_price` = a lasting alternative price from `valid_from`; `promo_price` = a promotional price from a date and time; `promo_price_time` = a promotional price over a date and time range on chosen `days`; `quantity` = a quantity offer (see `quantity_mode`); `discount` = a percentage off (`discount_bps`)."},"transfer_approved":{"type":"boolean","title":"Transfer Approved","description":"true lets the rule's price be written onto the article itself once `valid_from` arrives.","default":false},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid From","description":"First day the rule applies, `YYYY-MM-DD`; null = open."},"valid_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid To","description":"Last day the rule applies, `YYYY-MM-DD`; null = open."},"time_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time From","description":"Daily start time, `HH:MM`; null = from the start of the day."},"time_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time To","description":"Daily end time, `HH:MM`; null = to the end of the day."},"days":{"items":{"type":"integer"},"type":"array","title":"Days","description":"ISO weekdays the rule applies on, 1 = Monday to 7 = Sunday; empty = every day."},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"The rule's own prices, in the shape of the article's `price_levels`."},"tax_ids":{"items":{"type":"string"},"type":"array","title":"Tax Ids","description":"VAT rates (tax ids) of the rule's take-away price; empty = the article's."},"dine_in_tax_ids":{"items":{"type":"string"},"type":"array","title":"Dine In Tax Ids","description":"VAT rates (tax ids) of the rule's in-house price; empty = the article's."},"discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Bps","description":"For `kind` `discount`: the discount in basis points, 1000 = 10 %, 10000 = free."},"quantity_breaks":{"items":{"$ref":"#/components/schemas/QuantityBreak"},"type":"array","title":"Quantity Breaks","description":"For a `quantity` rule: the quantity steps and the unit price from each on."},"quantity_mode":{"anyOf":[{"type":"string","enum":["staffel","x_for_y","cheapest_free","price_from_qty"]},{"type":"null"}],"title":"Quantity Mode","description":"How a `quantity` rule prices: `staffel` = the unit price of the step reached; `x_for_y` = buy `buy_quantity`, pay `pay_quantity`; `cheapest_free` = the cheapest item of one `action_group` is free; `price_from_qty` = the unit price of the matching step."},"buy_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buy Quantity","description":"For `x_for_y`: how many the guest takes (3 in \"3 for 2\")."},"pay_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Quantity","description":"For `x_for_y`: how many the guest pays for (2 in \"3 for 2\")."},"action_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Group","description":"For `cheapest_free`: the group number; articles of the same group count together."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Input"},{"type":"null"}],"description":"Where the rule applies, in the shape of the article's `assignment`; null = wherever the article is sold."},"cash_register_ids":{"items":{"type":"string"},"type":"array","title":"Cash Register Ids","description":"Legacy till codes of an older import, kept on old records; use `assignment`."}},"additionalProperties":false,"type":"object","title":"PriceRule","description":"A scheduled or conditional price of an article, such as a special or promotional price: its `kind`, when it applies (dates, time of day, weekdays), the price (its own price levels), an optional percent discount, a quantity scale and its scope. A quantity offer counts per receipt line: the same article on several lines is not added up."},"PriceRule-Output":{"properties":{"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The source system's id of this rule, so a re-import updates it instead of adding a second one."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The rule's name, per language (`{\"de\": \"\u2026\"}`).","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"kind":{"anyOf":[{"type":"string","enum":["fixed_price","promo_price","promo_price_time","quantity","discount"]},{"type":"null"}],"title":"Kind","description":"`fixed_price` = a lasting alternative price from `valid_from`; `promo_price` = a promotional price from a date and time; `promo_price_time` = a promotional price over a date and time range on chosen `days`; `quantity` = a quantity offer (see `quantity_mode`); `discount` = a percentage off (`discount_bps`)."},"transfer_approved":{"type":"boolean","title":"Transfer Approved","description":"true lets the rule's price be written onto the article itself once `valid_from` arrives.","default":false},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid From","description":"First day the rule applies, `YYYY-MM-DD`; null = open."},"valid_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid To","description":"Last day the rule applies, `YYYY-MM-DD`; null = open."},"time_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time From","description":"Daily start time, `HH:MM`; null = from the start of the day."},"time_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time To","description":"Daily end time, `HH:MM`; null = to the end of the day."},"days":{"items":{"type":"integer"},"type":"array","title":"Days","description":"ISO weekdays the rule applies on, 1 = Monday to 7 = Sunday; empty = every day."},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"The rule's own prices, in the shape of the article's `price_levels`."},"tax_ids":{"items":{"type":"string"},"type":"array","title":"Tax Ids","description":"VAT rates (tax ids) of the rule's take-away price; empty = the article's."},"dine_in_tax_ids":{"items":{"type":"string"},"type":"array","title":"Dine In Tax Ids","description":"VAT rates (tax ids) of the rule's in-house price; empty = the article's."},"discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Bps","description":"For `kind` `discount`: the discount in basis points, 1000 = 10 %, 10000 = free."},"quantity_breaks":{"items":{"$ref":"#/components/schemas/QuantityBreak"},"type":"array","title":"Quantity Breaks","description":"For a `quantity` rule: the quantity steps and the unit price from each on."},"quantity_mode":{"anyOf":[{"type":"string","enum":["staffel","x_for_y","cheapest_free","price_from_qty"]},{"type":"null"}],"title":"Quantity Mode","description":"How a `quantity` rule prices: `staffel` = the unit price of the step reached; `x_for_y` = buy `buy_quantity`, pay `pay_quantity`; `cheapest_free` = the cheapest item of one `action_group` is free; `price_from_qty` = the unit price of the matching step."},"buy_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buy Quantity","description":"For `x_for_y`: how many the guest takes (3 in \"3 for 2\")."},"pay_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Quantity","description":"For `x_for_y`: how many the guest pays for (2 in \"3 for 2\")."},"action_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Group","description":"For `cheapest_free`: the group number; articles of the same group count together."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Output"},{"type":"null"}],"description":"Where the rule applies, in the shape of the article's `assignment`; null = wherever the article is sold."},"cash_register_ids":{"items":{"type":"string"},"type":"array","title":"Cash Register Ids","description":"Legacy till codes of an older import, kept on old records; use `assignment`."}},"additionalProperties":false,"type":"object","title":"PriceRule","description":"A scheduled or conditional price of an article, such as a special or promotional price: its `kind`, when it applies (dates, time of day, weekdays), the price (its own price levels), an optional percent discount, a quantity scale and its scope. A quantity offer counts per receipt line: the same article on several lines is not added up."},"Pricing-Input":{"properties":{"type":{"type":"string","enum":["fixed","variable"],"title":"Type","description":"`fixed` = the till charges `amount`; `variable` = the cashier types the price at the till (an open amount, see `open_amount`).","default":"fixed"},"amount":{"type":"integer","title":"Amount","description":"The price in the currency's minor unit (cents, Rappen): 450 = 4.50, in the workspace's currency. Negative for a return or deduction article (a deposit refund).","default":0},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Retired and ignored: an amount is always in the workspace's currency. Older records may still show it.","readOnly":true},"unit":{"type":"string","enum":["each","kg","g","g100","hour"],"title":"Unit","description":"What one quantity of the article is: `each` (a piece), `kg`, `g`, `g100` (100 grams) or `hour`. A weighed good is sold per `kg` or `g100`.","default":"each"},"price_unit":{"type":"integer","enum":[1,100,1000],"title":"Price Unit","description":"How many units `amount` is the price for: 1, 100 or 1000. It divides the line total: `{\"amount\": 250, \"price_unit\": 100}` is 2.50 per 100 pieces, so a line of 40 pieces costs 1.00.","default":1},"quantity_precision":{"type":"integer","title":"Quantity Precision","description":"How many decimals a sold quantity may have: 0 for pieces, 3 for kilograms. An article of `type` `weighed_good` with `{\"amount\": 2400, \"unit\": \"kg\", \"quantity_precision\": 3}` costs 24.00 per kg and is sold to the gram.","default":0},"open_amount":{"anyOf":[{"type":"string","enum":["plus","minus"]},{"type":"null"}],"title":"Open Amount","description":"With `type` `variable`: `plus` = the cashier types the price; `minus` = the cashier types an amount booked as a deduction (a negative line, e.g. a cash withdrawal). null = a fixed price."},"tax_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tax Ids","description":"Ignored: an article's VAT rates are its top-level `tax_ids`. Some imported records still show a copy here.","readOnly":true}},"additionalProperties":false,"type":"object","title":"Pricing","description":"The article's base (take-away) price: what one ``unit`` costs. The\nin-house price is ``dine_in``, further price levels are ``price_levels``."},"Pricing-Output":{"properties":{"type":{"type":"string","enum":["fixed","variable"],"title":"Type","description":"`fixed` = the till charges `amount`; `variable` = the cashier types the price at the till (an open amount, see `open_amount`).","default":"fixed"},"amount":{"type":"integer","title":"Amount","description":"The price in the currency's minor unit (cents, Rappen): 450 = 4.50, in the workspace's currency. Negative for a return or deduction article (a deposit refund).","default":0},"unit":{"type":"string","enum":["each","kg","g","g100","hour"],"title":"Unit","description":"What one quantity of the article is: `each` (a piece), `kg`, `g`, `g100` (100 grams) or `hour`. A weighed good is sold per `kg` or `g100`.","default":"each"},"price_unit":{"type":"integer","enum":[1,100,1000],"title":"Price Unit","description":"How many units `amount` is the price for: 1, 100 or 1000. It divides the line total: `{\"amount\": 250, \"price_unit\": 100}` is 2.50 per 100 pieces, so a line of 40 pieces costs 1.00.","default":1},"quantity_precision":{"type":"integer","title":"Quantity Precision","description":"How many decimals a sold quantity may have: 0 for pieces, 3 for kilograms. An article of `type` `weighed_good` with `{\"amount\": 2400, \"unit\": \"kg\", \"quantity_precision\": 3}` costs 24.00 per kg and is sold to the gram.","default":0},"open_amount":{"anyOf":[{"type":"string","enum":["plus","minus"]},{"type":"null"}],"title":"Open Amount","description":"With `type` `variable`: `plus` = the cashier types the price; `minus` = the cashier types an amount booked as a deduction (a negative line, e.g. a cash withdrawal). null = a fixed price."}},"additionalProperties":false,"type":"object","title":"Pricing","description":"The article's base (take-away) price: what one ``unit`` costs. The\nin-house price is ``dine_in``, further price levels are ``price_levels``."},"PricingOverride":{"properties":{"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"The in-house price in minor units; null = the same as `pricing.amount`."},"tax_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Tax Ids","description":"The in-house VAT rates (tax ids); empty = the article's `tax_ids`."}},"additionalProperties":false,"type":"object","title":"PricingOverride","description":"A different price or VAT for one channel, usually eating in against takeaway: a Swiss bakery sells the same item at 2.6 % VAT to go and 8.1 % eaten in. An empty `amount` keeps the base price, and an empty `tax_ids` the base VAT."},"PrintArea":{"properties":{"w":{"type":"number","maximum":100.0,"minimum":1.0,"title":"W","description":"Width in centimetres."},"h":{"type":"number","maximum":100.0,"minimum":1.0,"title":"H","description":"Height in centimetres."}},"additionalProperties":false,"type":"object","required":["w","h"],"title":"PrintArea","description":"The edible print area of a photo article, in centimetres: the frame the guest fits the photo into, such as 17.5 \u00d7 25 cm."},"ProductCreate":{"properties":{"type":{"type":"string","enum":["good","weighed_good","service","raw","production"],"title":"Type","description":"`good` = a piece good, `weighed_good` = sold by weight, `service`, `raw` = a raw material, `production` = a semi-finished product. `raw` and `production` are back-office articles that never reach the till.","default":"good"},"name":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Name","description":"The name per language, `{\"de\": \"Zopf 500 g\", \"fr\": \"Tresse 500 g\"}`; at least one language needs a text.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"alt_name":{"additionalProperties":{"type":"string"},"type":"object","title":"Alt Name","description":"An alternative name per language, shown on the till tile, the receipt, the kitchen ticket and the customer display instead of `name` when set.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"description":{"additionalProperties":{"type":"string"},"type":"object","title":"Description","description":"A longer description per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"status":{"type":"string","enum":["active","archived"],"title":"Status","description":"`active`, or `archived`: kept with its history, left out of lists and pickers.","default":"active"},"sellable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sellable","description":"false for a back-office article that is never sold (a raw material); null = sellable."},"category_ids":{"items":{"type":"string"},"type":"array","title":"Category Ids","description":"The till categories (ids) the article is in."},"reporting_category_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Reporting Category Id","description":"The revenue group the article's sales are booked to: a category (id) of kind `reporting`."},"schablone_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schablone Id","description":"The till template (a till screen's article grid, id) the article is on; with several, the first of `placements`. Send this or `placements`."},"placements":{"items":{"$ref":"#/components/schemas/Placement"},"type":"array","title":"Placements","description":"Every till template the article is on, with its place; no template twice."},"tax_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Tax Ids","description":"The article's VAT rates (tax ids), take-away."},"pricing":{"$ref":"#/components/schemas/Pricing-Input","description":"The base (take-away) price."},"dine_in":{"anyOf":[{"$ref":"#/components/schemas/PricingOverride"},{"type":"null"}],"description":"The in-house (eat-in) price and VAT; null = take-away only."},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"Up to ten price levels per channel; null = the base price only."},"price_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceRule-Input"},"type":"array"},{"type":"null"}],"title":"Price Rules","description":"Special prices and promotions; null = none."},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"The article number, unique in the workspace."},"barcodes":{"items":{"$ref":"#/components/schemas/Barcode"},"type":"array","title":"Barcodes","description":"Codes the till scans; each unique in the workspace."},"media":{"items":{"$ref":"#/components/schemas/Media"},"type":"array","title":"Media","description":"Pictures."},"options":{"items":{"$ref":"#/components/schemas/ProductOption"},"type":"array","title":"Options","description":"Option axes for variants (size, colour)."},"variants":{"items":{"$ref":"#/components/schemas/ProductVariant"},"type":"array","title":"Variants","description":"The sellable combinations of option values."},"modifier_group_ids":{"items":{"type":"string"},"type":"array","title":"Modifier Group Ids","description":"Modifier groups (ids) offered when the article is sold."},"cash_flow_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Flow Account Id","description":"A cash-flow account (id): selling the article then books a deposit, a payout or a credit instead of a sale (a voucher). null = a normal sale."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Input"},{"type":"null"}],"description":"Where the article is sold; null = on every till. `{\"mode\": \"except\", \"shops\": [\"shp_zurich\"]}` = everywhere except that shop; `{\"mode\": \"only\", \"regions\": [\"reg_ch\"]}` = only in that region."},"online_visibility":{"anyOf":[{"$ref":"#/components/schemas/OnlineVisibility"},{"type":"null"}],"description":"Narrows where the guest apps (QR menu, Click & Collect, delivery) offer the article; null = wherever `assignment` puts it."},"online_time_windows":{"items":{"$ref":"#/components/schemas/OnlineTimeWindow"},"type":"array","title":"Online Time Windows","description":"Times of day the guest menu offers it; empty = always."},"upsell_product_ids":{"items":{"type":"string"},"type":"array","title":"Upsell Product Ids","description":"Other articles (ids) suggested with this one."},"list_ids":{"items":{"type":"string"},"type":"array","title":"List Ids","description":"The product lists (ids) the article is on."},"assortment_groups":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Assortment Groups","description":"The assortment groups (ids) the article is in. A customer whose assortment names groups may order it only when one matches; empty = no restriction."},"attributes":{"items":{"$ref":"#/components/schemas/Attribute"},"type":"array","title":"Attributes","description":"Free attributes; one a write adds or changes must be in the workspace's attribute registry."},"declaration":{"anyOf":[{"$ref":"#/components/schemas/Declaration-Input"},{"type":"null"}],"description":"The food declaration the label prints. A partial block merges into the stored one."},"label_fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Label Fields","description":"Free label texts a label template prints, by key (`SpecValue1` to `SpecValue10`). Replaced whole on a write."},"loyalty":{"anyOf":[{"$ref":"#/components/schemas/Loyalty"},{"type":"null"}],"description":"Customer-card settings; null = the defaults."},"availability_periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/AvailabilityPeriod"},"type":"array"},{"type":"null"}],"title":"Availability Periods","description":"When the article is available, for sale and for orders; null or empty = always."},"delivery_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"propertyNames":{"enum":["mo","di","mi","do","fr","sa","so"]},"type":"object"},{"type":"null"}],"title":"Delivery Days","description":"The weekdays the article is delivered on: `mo`, `di`, `mi`, `do`, `fr`, `sa`, `so` (Monday to Sunday) to true or false, `{\"mo\": true, \"sa\": false}`. null or empty = every day. Replaced whole on a write."},"visible_status":{"anyOf":[{"type":"string","enum":["always","sale_only","order_only","hidden"]},{"type":"null"}],"title":"Visible Status","description":"Where the till shows the article: `always`, `sale_only` (when selling), `order_only` (in order mode) or `hidden`; null = always."},"default_orders":{"anyOf":[{"items":{"$ref":"#/components/schemas/DefaultOrder"},"type":"array"},{"type":"null"}],"title":"Default Orders","description":"Retired: never used to make an order. Automatic orders come from each customer's own standing order; a value sent here is stored and ignored.","deprecated":true},"concept_texts":{"items":{"$ref":"#/components/schemas/ConceptText"},"type":"array","title":"Concept Texts","description":"Alternative texts for till concepts 2 to 6; empty = the same texts in every concept."},"concepts":{"anyOf":[{"$ref":"#/components/schemas/Concepts"},{"type":"null"}],"description":"Self-checkout, Click & Collect, the age check and online-shop limits."},"webshop":{"anyOf":[{"$ref":"#/components/schemas/WebshopArticle"},{"type":"null"}],"description":"What the webshop offers to configure. A partial block merges into the stored one."},"storage_calc":{"anyOf":[{"$ref":"#/components/schemas/StorageCalc"},{"type":"null"}],"description":"How selling the article moves the stock of other articles."},"labeling":{"anyOf":[{"$ref":"#/components/schemas/Labeling"},{"type":"null"}],"description":"The label's own texts and dates."},"production":{"anyOf":[{"$ref":"#/components/schemas/Production-Input"},{"type":"null"}],"description":"Production settings. A partial block merges into the stored one."},"range":{"anyOf":[{"$ref":"#/components/schemas/ProductRange"},{"type":"null"}],"description":"The article's place in the range: season months, the day it is discontinued, own production. Marks only; nothing is hidden or blocked. A partial block merges into the stored one."},"production_calc":{"anyOf":[{"$ref":"#/components/schemas/ProductionCalc"},{"type":"null"}],"description":"What producing the article also produces (a bill of materials)."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"An internal note."},"note_warn_on_order":{"type":"boolean","title":"Note Warn On Order","description":"true: `note` pops up as a warning when the article is added to an order.","default":false},"is_no_discount":{"type":"boolean","title":"Is No Discount","description":"true: a net article; no discount applies.","default":false},"spirits":{"type":"boolean","title":"Spirits","description":"true: a distilled spirit (Spirituose; beer and wine are not). For a tenant with Swiss rules it earns no points or stamps and gets no loyalty discount, coupon or prize; paying with the card's paid balance stays allowed.","default":false},"points_per_unit":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"Points Per Unit","description":"Loyalty points one unit of this article costs when points are redeemed on it at the till. 0 or absent: the article cannot be paid with points. runmyhub's own field; an import never writes it."},"not_divisible":{"type":"boolean","title":"Not Divisible","description":"true: sold in whole units only.","default":false},"united_against_waste":{"type":"boolean","title":"United Against Waste","description":"true: counted for the food-waste initiative United Against Waste; no effect on price or sale.","default":false},"is_inventory":{"type":"boolean","title":"Is Inventory","description":"true: the till lists the article in an Inventur (stock count). It does not hide the article's stock values.","default":true},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"description":"The till tile's colour and font style; null = the defaults."},"kiosk_time_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kiosk Time Slot","description":"The self-service kiosk time slot (its number) outside which the tile is greyed out; null = always available."},"needs_food_tray":{"type":"boolean","title":"Needs Food Tray","description":"true: needs a food tray; the kiosk then never greys it out by time.","default":false},"requires_pager":{"type":"boolean","title":"Requires Pager","description":"true: checkout asks for a pickup-pager number.","default":false},"shipping_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shipping Weight G","description":"Shipping weight in grams."},"shipping_point_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shipping Point Id","description":"The shipping point (id) the article ships from."},"storage_location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Location Id","description":"The storage location (id)."},"discount_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Discount Group Id","description":"The article group of kind `discount` (id)."},"production_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Production Group Id","description":"The article group of kind `production` (id)."},"marketing_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Marketing Group Id","description":"The article group of kind `marketing` (id)."},"statistic_group_1_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 1 Id","description":"The article group of kind `statistic_1` (id), a statistics axis."},"statistic_group_2_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 2 Id","description":"The article group of kind `statistic_2` (id), a statistics axis."},"statistic_group_3_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 3 Id","description":"The article group of kind `statistic_3` (id), a statistics axis."},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id","description":"The recipe (id) the article's declaration is computed from; linking one hands it the declaration. null = the article's own declaration."},"article_recipe":{"anyOf":[{"$ref":"#/components/schemas/ArticleRecipe"},{"type":"null"}],"description":"The article's own recipe for costing: what it is made of and what making it costs."},"purchase_cost":{"anyOf":[{"$ref":"#/components/schemas/PurchaseCost"},{"type":"null"}],"description":"What buying one unit costs (a raw material)."},"cost_reference":{"anyOf":[{"$ref":"#/components/schemas/CostReference"},{"type":"null"}],"description":"Another system's cost of one unit, for comparison."},"cloud_printer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cloud Printer Ids","description":"Cloud printers (ids) that print the article when it is on an order; null or empty = none."},"routing":{"anyOf":[{"$ref":"#/components/schemas/Routing"},{"type":"null"}],"description":"Kitchen routing (restaurant)."},"course":{"anyOf":[{"type":"string","enum":["starter","main","dessert","drink"]},{"type":"null"}],"title":"Course","description":"The course: `starter`, `main`, `dessert` or `drink`."},"service":{"anyOf":[{"$ref":"#/components/schemas/ServiceInfo"},{"type":"null"}],"description":"Duration and staff of a service (hairdresser, spa)."},"package":{"anyOf":[{"$ref":"#/components/schemas/PackageInfo"},{"type":"null"}],"description":"What a prepaid package grants."},"weighing":{"anyOf":[{"$ref":"#/components/schemas/Weighing"},{"type":"null"}],"description":"How a weighed good is weighed."},"deposit":{"anyOf":[{"$ref":"#/components/schemas/Deposit"},{"type":"null"}],"description":"The deposit article added with it."},"combo":{"anyOf":[{"$ref":"#/components/schemas/Combo"},{"type":"null"}],"description":"The menu's steps; an article with steps is a menu."},"function":{"anyOf":[{"type":"string","enum":["normal","navigation","loyalty_topup","loyalty_points_topup","voucher_topup","atm","payout","currency_exchange","credit_account","client_card"]},{"type":"null"}],"title":"Function","description":"A till function instead of a sale: `navigation` (opens a template), `loyalty_topup` (tops up a customer card), `loyalty_points_topup` (converts card points into card balance), `voucher_topup`, `atm` (a cash withdrawal), `payout`; null or `normal` = a sale. `currency_exchange`, `credit_account` and `client_card` are reserved."},"nav":{"anyOf":[{"$ref":"#/components/schemas/Navigation"},{"type":"null"}],"description":"With `function` `navigation`: the template a tap opens."},"topup":{"anyOf":[{"$ref":"#/components/schemas/Topup"},{"type":"null"}],"description":"With `function` `loyalty_topup`: the presets and the bonus."},"points_topup":{"anyOf":[{"$ref":"#/components/schemas/PointsTopup"},{"type":"null"}],"description":"With `function` `loyalty_points_topup`: the conversion buttons."},"atm":{"anyOf":[{"$ref":"#/components/schemas/Atm"},{"type":"null"}],"description":"With `function` `atm`: the payout limit."},"i18n":{"anyOf":[{"$ref":"#/components/schemas/I18nMeta"},{"type":"null"}],"description":"Legacy translation metadata; send `i18n_meta` instead."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per translatable field (`name`, `labeling.declaration`, \u2026)."},"recipe":{"anyOf":[{"$ref":"#/components/schemas/RecipeSubdoc"},{"type":"null"}],"description":"Read-only on a create: the recipe tree is written by an update or the recipe import.","readOnly":true},"raw_material":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialSubdoc"},{"type":"null"}],"description":"Read-only on a create: the raw-material data is written by an update or the recipe import.","readOnly":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreate","description":"An article (a product of the catalog) as a create takes it.\n\nUnknown fields are refused, at the top level and inside every block, with a\n422 that names each one. The fields an import keeps for itself\n(`cashassist_allergens`, `cashassist_translations`, `cashassist_diet`,\n`allergens_inherited_from`, `order_flags`, `reporting_category_defaulted`)\nare not writable here."},"ProductImport":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductCreate"},"type":"array","maxItems":200,"title":"Items","description":"The articles to create, each as `POST /v1/products` takes it; at most 200 per call."}},"additionalProperties":false,"type":"object","required":["items"],"title":"ProductImport","description":"Bulk product onboarding payload (POST /v1/imports/products)."},"ProductOption":{"properties":{"name":{"type":"string","title":"Name","description":"The option's name (\"Size\")."},"values":{"items":{"type":"string"},"type":"array","title":"Values","description":"Its values (\"S\", \"M\", \"L\")."}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductOption","description":"A named option axis on a product, e.g. {\"name\": \"Gr\u00f6\u00dfe\", \"values\": [...]}.\nVariants are the concrete combinations of these option values."},"ProductPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Offset mode (`?offset=`): the next window's offset, null on the last page."}},"type":"object","required":["data","total","has_more"],"title":"ProductPage"},"ProductRange":{"properties":{"season_months":{"items":{"type":"integer","maximum":12.0,"minimum":1.0},"type":"array","title":"Season Months","description":"The months the article is in season, 1 = January to 12 = December, `[9, 10, 11]` for an autumn article; empty = not seasonal. Stored sorted, each month once; replaced whole on a write."},"discontinued_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Discontinued From","description":"The first day the article is no longer in the range, `YYYY-MM-DD`; null = not discontinued. A mark only: the article still sells until it is archived or its availability ends."},"own_production":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Own Production","description":"true = the business makes it itself, false = bought in, null = not stated. The forecast reads a stated value instead of guessing from the data."}},"additionalProperties":false,"type":"object","title":"ProductRange","description":"Where the article stands in the range: the months it is in season, the day\nit leaves the range, and whether the business makes it itself.\n\nMarks, not rules: nothing here hides an article or blocks a sale; what\nrestricts selling is `availability_periods`. Statistics, production planning\nand the assistant read them."},"ProductRecord":{"properties":{"type":{"type":"string","enum":["good","weighed_good","service","raw","production"],"title":"Type","description":"`good` = a piece good, `weighed_good` = sold by weight, `service`, `raw` = a raw material, `production` = a semi-finished product. `raw` and `production` are back-office articles that never reach the till.","default":"good"},"name":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Name","description":"The name per language, `{\"de\": \"Zopf 500 g\", \"fr\": \"Tresse 500 g\"}`; at least one language needs a text.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"alt_name":{"additionalProperties":{"type":"string"},"type":"object","title":"Alt Name","description":"An alternative name per language, shown on the till tile, the receipt, the kitchen ticket and the customer display instead of `name` when set.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"description":{"additionalProperties":{"type":"string"},"type":"object","title":"Description","description":"A longer description per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"status":{"type":"string","enum":["active","archived"],"title":"Status","description":"`active`, or `archived`: kept with its history, left out of lists and pickers.","default":"active"},"sellable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sellable","description":"false for a back-office article that is never sold (a raw material); null = sellable."},"category_ids":{"items":{"type":"string"},"type":"array","title":"Category Ids","description":"The till categories (ids) the article is in."},"reporting_category_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Reporting Category Id","description":"The revenue group the article's sales are booked to: a category (id) of kind `reporting`."},"schablone_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schablone Id","description":"The till template (a till screen's article grid, id) the article is on; with several, the first of `placements`. Send this or `placements`."},"placements":{"items":{"$ref":"#/components/schemas/Placement"},"type":"array","title":"Placements","description":"Every till template the article is on, with its place; no template twice."},"tax_ids":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Tax Ids","description":"The article's VAT rates (tax ids), take-away."},"pricing":{"$ref":"#/components/schemas/Pricing-Output","description":"The base (take-away) price."},"dine_in":{"anyOf":[{"$ref":"#/components/schemas/PricingOverride"},{"type":"null"}],"description":"The in-house (eat-in) price and VAT; null = take-away only."},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"Up to ten price levels per channel; null = the base price only."},"price_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceRule-Output"},"type":"array"},{"type":"null"}],"title":"Price Rules","description":"Special prices and promotions; null = none."},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"The article number, unique in the workspace."},"barcodes":{"items":{"$ref":"#/components/schemas/Barcode"},"type":"array","title":"Barcodes","description":"Codes the till scans; each unique in the workspace."},"media":{"items":{"$ref":"#/components/schemas/Media"},"type":"array","title":"Media","description":"Pictures."},"options":{"items":{"$ref":"#/components/schemas/ProductOption"},"type":"array","title":"Options","description":"Option axes for variants (size, colour)."},"variants":{"items":{"$ref":"#/components/schemas/ProductVariant"},"type":"array","title":"Variants","description":"The sellable combinations of option values."},"modifier_group_ids":{"items":{"type":"string"},"type":"array","title":"Modifier Group Ids","description":"Modifier groups (ids) offered when the article is sold."},"cash_flow_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Flow Account Id","description":"A cash-flow account (id): selling the article then books a deposit, a payout or a credit instead of a sale (a voucher). null = a normal sale."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Output"},{"type":"null"}],"description":"Where the article is sold; null = on every till. `{\"mode\": \"except\", \"shops\": [\"shp_zurich\"]}` = everywhere except that shop; `{\"mode\": \"only\", \"regions\": [\"reg_ch\"]}` = only in that region."},"online_visibility":{"anyOf":[{"$ref":"#/components/schemas/OnlineVisibility"},{"type":"null"}],"description":"Narrows where the guest apps (QR menu, Click & Collect, delivery) offer the article; null = wherever `assignment` puts it."},"online_time_windows":{"items":{"$ref":"#/components/schemas/OnlineTimeWindow"},"type":"array","title":"Online Time Windows","description":"Times of day the guest menu offers it; empty = always."},"upsell_product_ids":{"items":{"type":"string"},"type":"array","title":"Upsell Product Ids","description":"Other articles (ids) suggested with this one."},"list_ids":{"items":{"type":"string"},"type":"array","title":"List Ids","description":"The product lists (ids) the article is on."},"assortment_groups":{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","title":"Assortment Groups","description":"The assortment groups (ids) the article is in. A customer whose assortment names groups may order it only when one matches; empty = no restriction."},"attributes":{"items":{"$ref":"#/components/schemas/Attribute"},"type":"array","title":"Attributes","description":"Free attributes; one a write adds or changes must be in the workspace's attribute registry."},"declaration":{"anyOf":[{"$ref":"#/components/schemas/Declaration-Output"},{"type":"null"}],"description":"The food declaration the label prints. A partial block merges into the stored one."},"label_fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Label Fields","description":"Free label texts a label template prints, by key (`SpecValue1` to `SpecValue10`). Replaced whole on a write."},"loyalty":{"anyOf":[{"$ref":"#/components/schemas/Loyalty"},{"type":"null"}],"description":"Customer-card settings; null = the defaults."},"availability_periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/AvailabilityPeriod"},"type":"array"},{"type":"null"}],"title":"Availability Periods","description":"When the article is available, for sale and for orders; null or empty = always."},"delivery_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"propertyNames":{"enum":["mo","di","mi","do","fr","sa","so"]},"type":"object"},{"type":"null"}],"title":"Delivery Days","description":"The weekdays the article is delivered on: `mo`, `di`, `mi`, `do`, `fr`, `sa`, `so` (Monday to Sunday) to true or false, `{\"mo\": true, \"sa\": false}`. null or empty = every day. Replaced whole on a write."},"visible_status":{"anyOf":[{"type":"string","enum":["always","sale_only","order_only","hidden"]},{"type":"null"}],"title":"Visible Status","description":"Where the till shows the article: `always`, `sale_only` (when selling), `order_only` (in order mode) or `hidden`; null = always."},"default_orders":{"anyOf":[{"items":{"$ref":"#/components/schemas/DefaultOrder"},"type":"array"},{"type":"null"}],"title":"Default Orders","description":"Retired: never used to make an order. Automatic orders come from each customer's own standing order; a value sent here is stored and ignored.","deprecated":true},"concept_texts":{"items":{"$ref":"#/components/schemas/ConceptText"},"type":"array","title":"Concept Texts","description":"Alternative texts for till concepts 2 to 6; empty = the same texts in every concept."},"concepts":{"anyOf":[{"$ref":"#/components/schemas/Concepts"},{"type":"null"}],"description":"Self-checkout, Click & Collect, the age check and online-shop limits."},"webshop":{"anyOf":[{"$ref":"#/components/schemas/WebshopArticle"},{"type":"null"}],"description":"What the webshop offers to configure. A partial block merges into the stored one."},"storage_calc":{"anyOf":[{"$ref":"#/components/schemas/StorageCalc"},{"type":"null"}],"description":"How selling the article moves the stock of other articles."},"labeling":{"anyOf":[{"$ref":"#/components/schemas/Labeling"},{"type":"null"}],"description":"The label's own texts and dates."},"production":{"anyOf":[{"$ref":"#/components/schemas/Production-Output"},{"type":"null"}],"description":"Production settings. A partial block merges into the stored one."},"range":{"anyOf":[{"$ref":"#/components/schemas/ProductRange"},{"type":"null"}],"description":"The article's place in the range: season months, the day it is discontinued, own production. Marks only; nothing is hidden or blocked. A partial block merges into the stored one."},"production_calc":{"anyOf":[{"$ref":"#/components/schemas/ProductionCalc"},{"type":"null"}],"description":"What producing the article also produces (a bill of materials)."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"An internal note."},"note_warn_on_order":{"type":"boolean","title":"Note Warn On Order","description":"true: `note` pops up as a warning when the article is added to an order.","default":false},"is_no_discount":{"type":"boolean","title":"Is No Discount","description":"true: a net article; no discount applies.","default":false},"spirits":{"type":"boolean","title":"Spirits","description":"true: a distilled spirit (Spirituose; beer and wine are not). For a tenant with Swiss rules it earns no points or stamps and gets no loyalty discount, coupon or prize; paying with the card's paid balance stays allowed.","default":false},"points_per_unit":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"Points Per Unit","description":"Loyalty points one unit of this article costs when points are redeemed on it at the till. 0 or absent: the article cannot be paid with points. runmyhub's own field; an import never writes it."},"not_divisible":{"type":"boolean","title":"Not Divisible","description":"true: sold in whole units only.","default":false},"united_against_waste":{"type":"boolean","title":"United Against Waste","description":"true: counted for the food-waste initiative United Against Waste; no effect on price or sale.","default":false},"is_inventory":{"type":"boolean","title":"Is Inventory","description":"true: the till lists the article in an Inventur (stock count). It does not hide the article's stock values.","default":true},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"description":"The till tile's colour and font style; null = the defaults."},"kiosk_time_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kiosk Time Slot","description":"The self-service kiosk time slot (its number) outside which the tile is greyed out; null = always available."},"needs_food_tray":{"type":"boolean","title":"Needs Food Tray","description":"true: needs a food tray; the kiosk then never greys it out by time.","default":false},"requires_pager":{"type":"boolean","title":"Requires Pager","description":"true: checkout asks for a pickup-pager number.","default":false},"shipping_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shipping Weight G","description":"Shipping weight in grams."},"shipping_point_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shipping Point Id","description":"The shipping point (id) the article ships from."},"storage_location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Location Id","description":"The storage location (id)."},"discount_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Discount Group Id","description":"The article group of kind `discount` (id)."},"production_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Production Group Id","description":"The article group of kind `production` (id)."},"marketing_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Marketing Group Id","description":"The article group of kind `marketing` (id)."},"statistic_group_1_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 1 Id","description":"The article group of kind `statistic_1` (id), a statistics axis."},"statistic_group_2_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 2 Id","description":"The article group of kind `statistic_2` (id), a statistics axis."},"statistic_group_3_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 3 Id","description":"The article group of kind `statistic_3` (id), a statistics axis."},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id","description":"The recipe (id) the article's declaration is computed from; linking one hands it the declaration. null = the article's own declaration."},"article_recipe":{"anyOf":[{"$ref":"#/components/schemas/ArticleRecipe"},{"type":"null"}],"description":"The article's own recipe for costing: what it is made of and what making it costs."},"purchase_cost":{"anyOf":[{"$ref":"#/components/schemas/PurchaseCost"},{"type":"null"}],"description":"What buying one unit costs (a raw material)."},"cost_reference":{"anyOf":[{"$ref":"#/components/schemas/CostReference"},{"type":"null"}],"description":"Another system's cost of one unit, for comparison."},"cloud_printer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cloud Printer Ids","description":"Cloud printers (ids) that print the article when it is on an order; null or empty = none."},"routing":{"anyOf":[{"$ref":"#/components/schemas/Routing"},{"type":"null"}],"description":"Kitchen routing (restaurant)."},"course":{"anyOf":[{"type":"string","enum":["starter","main","dessert","drink"]},{"type":"null"}],"title":"Course","description":"The course: `starter`, `main`, `dessert` or `drink`."},"service":{"anyOf":[{"$ref":"#/components/schemas/ServiceInfo"},{"type":"null"}],"description":"Duration and staff of a service (hairdresser, spa)."},"package":{"anyOf":[{"$ref":"#/components/schemas/PackageInfo"},{"type":"null"}],"description":"What a prepaid package grants."},"weighing":{"anyOf":[{"$ref":"#/components/schemas/Weighing"},{"type":"null"}],"description":"How a weighed good is weighed."},"deposit":{"anyOf":[{"$ref":"#/components/schemas/Deposit"},{"type":"null"}],"description":"The deposit article added with it."},"combo":{"anyOf":[{"$ref":"#/components/schemas/Combo"},{"type":"null"}],"description":"The menu's steps; an article with steps is a menu."},"function":{"anyOf":[{"type":"string","enum":["normal","navigation","loyalty_topup","loyalty_points_topup","voucher_topup","atm","payout","currency_exchange","credit_account","client_card"]},{"type":"null"}],"title":"Function","description":"A till function instead of a sale: `navigation` (opens a template), `loyalty_topup` (tops up a customer card), `loyalty_points_topup` (converts card points into card balance), `voucher_topup`, `atm` (a cash withdrawal), `payout`; null or `normal` = a sale. `currency_exchange`, `credit_account` and `client_card` are reserved."},"nav":{"anyOf":[{"$ref":"#/components/schemas/Navigation"},{"type":"null"}],"description":"With `function` `navigation`: the template a tap opens."},"topup":{"anyOf":[{"$ref":"#/components/schemas/Topup"},{"type":"null"}],"description":"With `function` `loyalty_topup`: the presets and the bonus."},"points_topup":{"anyOf":[{"$ref":"#/components/schemas/PointsTopup"},{"type":"null"}],"description":"With `function` `loyalty_points_topup`: the conversion buttons."},"atm":{"anyOf":[{"$ref":"#/components/schemas/Atm"},{"type":"null"}],"description":"With `function` `atm`: the payout limit."},"i18n":{"anyOf":[{"$ref":"#/components/schemas/I18nMeta"},{"type":"null"}],"description":"Legacy translation metadata; send `i18n_meta` instead."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Output"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per translatable field (`name`, `labeling.declaration`, \u2026)."},"_id":{"type":"string","title":"Id","description":"Record id."},"allergens_inherited_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergens Inherited From","description":"Read-only, set by the till-system import: the article whose allergens this one shows instead of its own."},"cashassist_allergens":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Cashassist Allergens","description":"Read-only, set by the till-system import: the allergen keys it last wrote into `declaration`, which it may take back when the source drops them."},"cashassist_diet":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Cashassist Diet","description":"Read-only, set by the till-system import: the diet marks it last derived; a mark set by hand survives its next run."},"cashassist_translations":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Cashassist Translations","description":"Read-only, set by the till-system import: the translations it last wrote, per field and language; an edit made here survives its next run."},"order_flags":{"items":{"type":"string"},"type":"array","title":"Order Flags","description":"Read-only, set by the till-system import: the order lists and bakery-return lists the article is on (`Liste1` to `Liste10`, `Ret1` to `Ret5`)."},"reporting_category_defaulted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reporting Category Defaulted","description":"Read-only: true when an import booked the article to the default revenue group because the source named none."}},"type":"object","required":["name","_id"],"title":"ProductRecord"},"ProductUpdate":{"properties":{"type":{"anyOf":[{"type":"string","enum":["good","weighed_good","service","raw","production"]},{"type":"null"}],"title":"Type","description":"`good` = a piece good, `weighed_good` = sold by weight, `service`, `raw` = a raw material, `production` = a semi-finished product. `raw` and `production` are back-office articles that never reach the till."},"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"The name per language. Languages merge into the stored ones; a language sent as `\"\"` is removed, and at least one must keep a text."},"alt_name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Alt Name","description":"An alternative name per language, shown on the till tile, the receipt, the kitchen ticket and the customer display instead of `name` when set."},"description":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Description","description":"A longer description per language."},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status","description":"`active`, or `archived`: kept with its history, left out of lists and pickers."},"sellable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sellable","description":"false for a back-office article that is never sold (a raw material); null = sellable."},"category_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Ids","description":"The till categories (ids) the article is in."},"reporting_category_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Reporting Category Id","description":"The revenue group the article's sales are booked to: a category (id) of kind `reporting`."},"schablone_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schablone Id","description":"The till template (a till screen's article grid, id) the article is on; with several, the first of `placements`. Send this or `placements`."},"placements":{"anyOf":[{"items":{"$ref":"#/components/schemas/Placement"},"type":"array"},{"type":"null"}],"title":"Placements","description":"Every till template the article is on, with its place; no template twice."},"tax_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Tax Ids","description":"The article's VAT rates (tax ids), take-away."},"pricing":{"anyOf":[{"$ref":"#/components/schemas/Pricing-Input"},{"type":"null"}],"description":"The base (take-away) price."},"dine_in":{"anyOf":[{"$ref":"#/components/schemas/PricingOverride"},{"type":"null"}],"description":"The in-house (eat-in) price and VAT; null = take-away only."},"price_levels":{"anyOf":[{"$ref":"#/components/schemas/PriceLevels"},{"type":"null"}],"description":"Up to ten price levels per channel; null = the base price only."},"price_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceRule-Input"},"type":"array"},{"type":"null"}],"title":"Price Rules","description":"Special prices and promotions; null = none."},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"The article number, unique in the workspace."},"barcodes":{"anyOf":[{"items":{"$ref":"#/components/schemas/Barcode"},"type":"array"},{"type":"null"}],"title":"Barcodes","description":"Codes the till scans; each unique in the workspace."},"media":{"anyOf":[{"items":{"$ref":"#/components/schemas/Media"},"type":"array"},{"type":"null"}],"title":"Media","description":"Pictures."},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductOption"},"type":"array"},{"type":"null"}],"title":"Options","description":"Option axes for variants (size, colour)."},"variants":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductVariant"},"type":"array"},{"type":"null"}],"title":"Variants","description":"The sellable combinations of option values."},"modifier_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Modifier Group Ids","description":"Modifier groups (ids) offered when the article is sold."},"cash_flow_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Flow Account Id","description":"A cash-flow account (id): selling the article then books a deposit, a payout or a credit instead of a sale (a voucher). null = a normal sale."},"assignment":{"anyOf":[{"$ref":"#/components/schemas/Assignment-Input"},{"type":"null"}],"description":"Where the article is sold; null = on every till. `{\"mode\": \"except\", \"shops\": [\"shp_zurich\"]}` = everywhere except that shop; `{\"mode\": \"only\", \"regions\": [\"reg_ch\"]}` = only in that region."},"online_visibility":{"anyOf":[{"$ref":"#/components/schemas/OnlineVisibility"},{"type":"null"}],"description":"Narrows where the guest apps (QR menu, Click & Collect, delivery) offer the article; null = wherever `assignment` puts it."},"online_time_windows":{"anyOf":[{"items":{"$ref":"#/components/schemas/OnlineTimeWindow"},"type":"array"},{"type":"null"}],"title":"Online Time Windows","description":"Times of day the guest menu offers it; empty = always."},"upsell_product_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Upsell Product Ids","description":"Other articles (ids) suggested with this one."},"list_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"List Ids","description":"The product lists (ids) the article is on."},"assortment_groups":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Assortment Groups","description":"The assortment groups (ids) the article is in. A customer whose assortment names groups may order it only when one matches; empty = no restriction."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/Attribute"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Free attributes; one a write adds or changes must be in the workspace's attribute registry."},"declaration":{"anyOf":[{"$ref":"#/components/schemas/Declaration-Input"},{"type":"null"}],"description":"The food declaration the label prints. A partial block merges into the stored one."},"label_fields":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Label Fields","description":"Free label texts a label template prints, by key (`SpecValue1` to `SpecValue10`). Replaced whole on a write."},"loyalty":{"anyOf":[{"$ref":"#/components/schemas/Loyalty"},{"type":"null"}],"description":"Customer-card settings; null = the defaults."},"availability_periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/AvailabilityPeriod"},"type":"array"},{"type":"null"}],"title":"Availability Periods","description":"When the article is available, for sale and for orders; null or empty = always."},"delivery_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"propertyNames":{"enum":["mo","di","mi","do","fr","sa","so"]},"type":"object"},{"type":"null"}],"title":"Delivery Days","description":"The weekdays the article is delivered on: `mo`, `di`, `mi`, `do`, `fr`, `sa`, `so` (Monday to Sunday) to true or false, `{\"mo\": true, \"sa\": false}`. null or empty = every day. Replaced whole on a write."},"visible_status":{"anyOf":[{"type":"string","enum":["always","sale_only","order_only","hidden"]},{"type":"null"}],"title":"Visible Status","description":"Where the till shows the article: `always`, `sale_only` (when selling), `order_only` (in order mode) or `hidden`; null = always."},"default_orders":{"anyOf":[{"items":{"$ref":"#/components/schemas/DefaultOrder"},"type":"array"},{"type":"null"}],"title":"Default Orders","description":"Retired: never used to make an order. Automatic orders come from each customer's own standing order; a value sent here is stored and ignored.","deprecated":true},"concepts":{"anyOf":[{"$ref":"#/components/schemas/Concepts"},{"type":"null"}],"description":"Self-checkout, Click & Collect, the age check and online-shop limits."},"webshop":{"anyOf":[{"$ref":"#/components/schemas/WebshopArticle"},{"type":"null"}],"description":"What the webshop offers to configure. A partial block merges into the stored one."},"storage_calc":{"anyOf":[{"$ref":"#/components/schemas/StorageCalc"},{"type":"null"}],"description":"How selling the article moves the stock of other articles."},"labeling":{"anyOf":[{"$ref":"#/components/schemas/Labeling"},{"type":"null"}],"description":"The label's own texts and dates."},"production":{"anyOf":[{"$ref":"#/components/schemas/Production-Input"},{"type":"null"}],"description":"Production settings. A partial block merges into the stored one."},"range":{"anyOf":[{"$ref":"#/components/schemas/ProductRange"},{"type":"null"}],"description":"The article's place in the range: season months, the day it is discontinued, own production. Marks only; nothing is hidden or blocked. A partial block merges into the stored one."},"production_calc":{"anyOf":[{"$ref":"#/components/schemas/ProductionCalc"},{"type":"null"}],"description":"What producing the article also produces (a bill of materials)."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"An internal note."},"note_warn_on_order":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Note Warn On Order","description":"true: `note` pops up as a warning when the article is added to an order."},"is_no_discount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is No Discount","description":"true: a net article; no discount applies."},"spirits":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spirits","description":"true: a distilled spirit (Spirituose; beer and wine are not). For a tenant with Swiss rules it earns no points or stamps and gets no loyalty discount, coupon or prize; paying with the card's paid balance stays allowed."},"points_per_unit":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"Points Per Unit","description":"Loyalty points one unit of this article costs when points are redeemed on it at the till. 0 or absent: the article cannot be paid with points. runmyhub's own field; an import never writes it."},"not_divisible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Not Divisible","description":"true: sold in whole units only."},"united_against_waste":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"United Against Waste","description":"true: counted for the food-waste initiative United Against Waste; no effect on price or sale."},"is_inventory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Inventory","description":"true: the till lists the article in an Inventur (stock count). It does not hide the article's stock values."},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"description":"The till tile's colour and font style; null = the defaults."},"kiosk_time_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kiosk Time Slot","description":"The self-service kiosk time slot (its number) outside which the tile is greyed out; null = always available."},"needs_food_tray":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Food Tray","description":"true: needs a food tray; the kiosk then never greys it out by time."},"requires_pager":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Pager","description":"true: checkout asks for a pickup-pager number."},"shipping_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shipping Weight G","description":"Shipping weight in grams."},"shipping_point_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Shipping Point Id","description":"The shipping point (id) the article ships from."},"storage_location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Location Id","description":"The storage location (id)."},"discount_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Discount Group Id","description":"The article group of kind `discount` (id)."},"production_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Production Group Id","description":"The article group of kind `production` (id)."},"marketing_group_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Marketing Group Id","description":"The article group of kind `marketing` (id)."},"statistic_group_1_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 1 Id","description":"The article group of kind `statistic_1` (id), a statistics axis."},"statistic_group_2_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 2 Id","description":"The article group of kind `statistic_2` (id), a statistics axis."},"statistic_group_3_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Statistic Group 3 Id","description":"The article group of kind `statistic_3` (id), a statistics axis."},"recipe":{"anyOf":[{"$ref":"#/components/schemas/RecipeSubdoc"},{"type":"null"}],"description":"The recipe tree (legacy sub-document). A change recomputes the declaration of every article that uses this one."},"raw_material":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialSubdoc"},{"type":"null"}],"description":"The raw-material data (legacy sub-document). A change recomputes the declaration of every article that uses this one."},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id","description":"The recipe (id) the article's declaration is computed from; linking one hands it the declaration. null = the article's own declaration."},"article_recipe":{"anyOf":[{"$ref":"#/components/schemas/ArticleRecipe"},{"type":"null"}],"description":"The article's own recipe for costing: what it is made of and what making it costs."},"purchase_cost":{"anyOf":[{"$ref":"#/components/schemas/PurchaseCost"},{"type":"null"}],"description":"What buying one unit costs (a raw material)."},"cost_reference":{"anyOf":[{"$ref":"#/components/schemas/CostReference"},{"type":"null"}],"description":"Another system's cost of one unit, for comparison."},"cloud_printer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cloud Printer Ids","description":"Cloud printers (ids) that print the article when it is on an order; null or empty = none."},"routing":{"anyOf":[{"$ref":"#/components/schemas/Routing"},{"type":"null"}],"description":"Kitchen routing (restaurant)."},"course":{"anyOf":[{"type":"string","enum":["starter","main","dessert","drink"]},{"type":"null"}],"title":"Course","description":"The course: `starter`, `main`, `dessert` or `drink`."},"service":{"anyOf":[{"$ref":"#/components/schemas/ServiceInfo"},{"type":"null"}],"description":"Duration and staff of a service (hairdresser, spa)."},"package":{"anyOf":[{"$ref":"#/components/schemas/PackageInfo"},{"type":"null"}],"description":"What a prepaid package grants."},"weighing":{"anyOf":[{"$ref":"#/components/schemas/Weighing"},{"type":"null"}],"description":"How a weighed good is weighed."},"deposit":{"anyOf":[{"$ref":"#/components/schemas/Deposit"},{"type":"null"}],"description":"The deposit article added with it."},"combo":{"anyOf":[{"$ref":"#/components/schemas/Combo"},{"type":"null"}],"description":"The menu's steps; an article with steps is a menu."},"function":{"anyOf":[{"type":"string","enum":["normal","navigation","loyalty_topup","loyalty_points_topup","voucher_topup","atm","payout","currency_exchange","credit_account","client_card"]},{"type":"null"}],"title":"Function","description":"A till function instead of a sale: `navigation` (opens a template), `loyalty_topup` (tops up a customer card), `loyalty_points_topup` (converts card points into card balance), `voucher_topup`, `atm` (a cash withdrawal), `payout`; null or `normal` = a sale. `currency_exchange`, `credit_account` and `client_card` are reserved."},"nav":{"anyOf":[{"$ref":"#/components/schemas/Navigation"},{"type":"null"}],"description":"With `function` `navigation`: the template a tap opens."},"topup":{"anyOf":[{"$ref":"#/components/schemas/Topup"},{"type":"null"}],"description":"With `function` `loyalty_topup`: the presets and the bonus."},"points_topup":{"anyOf":[{"$ref":"#/components/schemas/PointsTopup"},{"type":"null"}],"description":"With `function` `loyalty_points_topup`: the conversion buttons."},"atm":{"anyOf":[{"$ref":"#/components/schemas/Atm"},{"type":"null"}],"description":"With `function` `atm`: the payout limit."},"i18n":{"anyOf":[{"$ref":"#/components/schemas/I18nMeta"},{"type":"null"}],"description":"Legacy translation metadata; send `i18n_meta` instead."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints per translatable field (`name`, `labeling.declaration`, \u2026)."}},"additionalProperties":false,"type":"object","title":"ProductUpdate","description":"A partial update of an article: only the fields sent change.\n\nA block (an object such as `pricing`) merges key by key into the stored one,\nand a key sent as null clears it: `{\"pricing\": {\"amount\": 260}}` changes the\nprice and keeps the unit. Lists and maps keyed by data (`label_fields`,\n`delivery_days`, `production.site_by_shop`, a translated text) are replaced\nwhole. `name`, `status`, `type` and `pricing` may be left out, never null.\nUnknown fields are refused, as on a create."},"ProductVariant":{"properties":{"id":{"type":"string","title":"Id","description":"The variant's id, unique on the article."},"option_values":{"additionalProperties":{"type":"string"},"type":"object","title":"Option Values","description":"Each option's chosen value: `{\"Size\": \"M\", \"Colour\": \"red\"}`."},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"The variant's own article number."},"barcodes":{"items":{"$ref":"#/components/schemas/Barcode"},"type":"array","title":"Barcodes","description":"The variant's own codes."}},"additionalProperties":false,"type":"object","required":["id"],"title":"ProductVariant","description":"One sellable combination of option values, such as size M in red: `option_values` maps each option's name to its value."},"Production-Input":{"properties":{"show_on_production_lists":{"type":"boolean","title":"Show On Production Lists","description":"false keeps the article off the production lists.","default":true},"recipe_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Recipe Id","description":"The recipe (id) the article is produced from; distinct from the top-level `recipe_id`, which feeds the label's declaration. null = none."},"recipe_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Link","description":"Retired and ignored: the production recipe is `recipe_id`. Older records may still show it.","readOnly":true},"is_dough":{"type":"boolean","title":"Is Dough","description":"true: the article is a dough.","default":false},"days_to_produce":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Produce","description":"Days of lead time production needs before delivery."},"quantity_per_lot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity Per Lot","description":"Order quantities must be a multiple of this (a packaging lot); null, 0 or 1 = no rule."},"dough_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dough Product Id","description":"The dough article (id) this article is made of."},"dough_weight_before_baking_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dough Weight Before Baking G","description":"Dough weight per piece before baking, in grams."},"dough_batch_kg":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dough Batch Kg","description":"Kilograms of dough per batch."},"dough_splitting":{"type":"boolean","title":"Dough Splitting","description":"true: the dough is split.","default":false},"is_fraction_article":{"type":"boolean","title":"Is Fraction Article","description":"true: the article is a fraction (part) of another.","default":false},"fraction_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fraction Product Id","description":"The fractional article (id) this article uses."},"used_fraction_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used Fraction Parts","description":"How many fraction parts one piece uses."},"fraction_parts_per_unit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Parts Per Unit","description":"How many fraction parts one unit yields."},"round_up_fraction_amount":{"type":"boolean","title":"Round Up Fraction Amount","description":"true: fraction amounts round up to whole units.","default":false},"qty_per_baking_tray":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Qty Per Baking Tray","description":"Pieces per baking tray."},"trays_per_production":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trays Per Production","description":"Baking trays per production run."},"weight_of_liter_of_dough_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Of Liter Of Dough G","description":"For a dough: the weight of one litre, in grams."},"round_liters_to":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Round Liters To","description":"For a dough: the step litres are rounded to."},"forecast_scope":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Forecast Scope","description":"Whether the forecast plans it as fresh production: `include`, `exclude`, or null to let the forecast decide."},"site":{"anyOf":[{"type":"string","enum":["central","branch","both"]},{"type":"null"}],"title":"Site","description":"Where it is made: the `central` bakery, the `branch` (baked off from a pre-product), or `both`; null = central."},"site_by_shop":{"anyOf":[{"additionalProperties":{"type":"string","enum":["central","branch","both"]},"type":"object"},{"type":"null"}],"title":"Site By Shop","description":"Exceptions to `site` per branch: shop id to site. Replaced whole on a write."},"order_class":{"anyOf":[{"type":"string","enum":["day","multi_day","frozen","stocked","fresh_frozen","not_ordered"]},{"type":"null"}],"title":"Order Class","description":"How the article is ordered: `day` = sold the same day, `multi_day` = kept 2 to 7 days, `frozen` = a frozen stock, `stocked` = a stocked good, `fresh_frozen` = delivered fresh then baked off from frozen, `not_ordered` = made to order. null = runmyhub's proposal applies."},"fresh_until":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}],"title":"Fresh Until","description":"For `fresh_frozen`: until when the fresh delivery is sold, `HH:MM` local time; after it the branch bakes off from frozen."},"order_deadline":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}],"title":"Order Deadline","description":"Order cut-off, `HH:MM` local time: an order placed later needs one more day of lead time (`days_to_produce`)."},"sell_within_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sell Within Days","description":"Planning: days after production it may still be sold; 0 = the production day."},"consume_within_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Consume Within Days","description":"Planning: days after production it may still be eaten; 0 = the production day."},"storage_type":{"anyOf":[{"type":"string","enum":["ambient","fridge","cold_room","freezer"]},{"type":"null"}],"title":"Storage Type","description":"Where it is stored: the temperature zone."}},"additionalProperties":false,"type":"object","title":"Production","description":"The article's production settings: days to produce, dough and fraction links, quantities per baking tray, order class and deadlines. Optional; an imported article starts with the values of its previous system."},"Production-Output":{"properties":{"show_on_production_lists":{"type":"boolean","title":"Show On Production Lists","description":"false keeps the article off the production lists.","default":true},"recipe_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Recipe Id","description":"The recipe (id) the article is produced from; distinct from the top-level `recipe_id`, which feeds the label's declaration. null = none."},"is_dough":{"type":"boolean","title":"Is Dough","description":"true: the article is a dough.","default":false},"days_to_produce":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Produce","description":"Days of lead time production needs before delivery."},"quantity_per_lot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity Per Lot","description":"Order quantities must be a multiple of this (a packaging lot); null, 0 or 1 = no rule."},"dough_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dough Product Id","description":"The dough article (id) this article is made of."},"dough_weight_before_baking_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dough Weight Before Baking G","description":"Dough weight per piece before baking, in grams."},"dough_batch_kg":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dough Batch Kg","description":"Kilograms of dough per batch."},"dough_splitting":{"type":"boolean","title":"Dough Splitting","description":"true: the dough is split.","default":false},"is_fraction_article":{"type":"boolean","title":"Is Fraction Article","description":"true: the article is a fraction (part) of another.","default":false},"fraction_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fraction Product Id","description":"The fractional article (id) this article uses."},"used_fraction_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used Fraction Parts","description":"How many fraction parts one piece uses."},"fraction_parts_per_unit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Parts Per Unit","description":"How many fraction parts one unit yields."},"round_up_fraction_amount":{"type":"boolean","title":"Round Up Fraction Amount","description":"true: fraction amounts round up to whole units.","default":false},"qty_per_baking_tray":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Qty Per Baking Tray","description":"Pieces per baking tray."},"trays_per_production":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trays Per Production","description":"Baking trays per production run."},"weight_of_liter_of_dough_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Of Liter Of Dough G","description":"For a dough: the weight of one litre, in grams."},"round_liters_to":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Round Liters To","description":"For a dough: the step litres are rounded to."},"forecast_scope":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Forecast Scope","description":"Whether the forecast plans it as fresh production: `include`, `exclude`, or null to let the forecast decide."},"site":{"anyOf":[{"type":"string","enum":["central","branch","both"]},{"type":"null"}],"title":"Site","description":"Where it is made: the `central` bakery, the `branch` (baked off from a pre-product), or `both`; null = central."},"site_by_shop":{"anyOf":[{"additionalProperties":{"type":"string","enum":["central","branch","both"]},"type":"object"},{"type":"null"}],"title":"Site By Shop","description":"Exceptions to `site` per branch: shop id to site. Replaced whole on a write."},"order_class":{"anyOf":[{"type":"string","enum":["day","multi_day","frozen","stocked","fresh_frozen","not_ordered"]},{"type":"null"}],"title":"Order Class","description":"How the article is ordered: `day` = sold the same day, `multi_day` = kept 2 to 7 days, `frozen` = a frozen stock, `stocked` = a stocked good, `fresh_frozen` = delivered fresh then baked off from frozen, `not_ordered` = made to order. null = runmyhub's proposal applies."},"fresh_until":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}],"title":"Fresh Until","description":"For `fresh_frozen`: until when the fresh delivery is sold, `HH:MM` local time; after it the branch bakes off from frozen."},"order_deadline":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}],"title":"Order Deadline","description":"Order cut-off, `HH:MM` local time: an order placed later needs one more day of lead time (`days_to_produce`)."},"sell_within_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sell Within Days","description":"Planning: days after production it may still be sold; 0 = the production day."},"consume_within_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Consume Within Days","description":"Planning: days after production it may still be eaten; 0 = the production day."},"storage_type":{"anyOf":[{"type":"string","enum":["ambient","fridge","cold_room","freezer"]},{"type":"null"}],"title":"Storage Type","description":"Where it is stored: the temperature zone."}},"additionalProperties":false,"type":"object","title":"Production","description":"The article's production settings: days to produce, dough and fraction links, quantities per baking tray, order class and deadlines. Optional; an imported article starts with the values of its previous system."},"ProductionCalc":{"properties":{"replace_with_calculation":{"type":"boolean","title":"Replace With Calculation","description":"true: production lists show the positions instead of the article itself.","default":false},"round_to_whole_pieces":{"type":"boolean","title":"Round To Whole Pieces","description":"true: computed quantities round to whole pieces.","default":false},"round_to_units":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Round To Units","description":"With `round_to_whole_pieces`: the step to round to."},"positions":{"items":{"$ref":"#/components/schemas/ProductionCalcPosition"},"type":"array","title":"Positions","description":"What producing one unit also produces."}},"additionalProperties":false,"type":"object","title":"ProductionCalc","description":"The article's production calculation: what producing it adds of other articles (`positions`), and how the result is rounded. Optional."},"ProductionCalcPosition":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The article (id) producing this one also produces; never the article itself or one whose calculation leads back to it."},"multiplier":{"type":"number","title":"Multiplier","description":"How many of it per unit of this article.","default":1.0}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"ProductionCalcPosition","description":"One BOM position: producing the parent adds multiplier x amount of product_id."},"PromotionConditions-Input":{"properties":{"min_qty":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Qty","description":"The matching lines must total at least this many units; `null` = no minimum.","examples":[3]},"min_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Amount","description":"The matching lines must total at least this gross amount, in minor units (5000 = 50.00); for `spend_threshold` and `amount_discount` the whole cart. `null` = no minimum.","examples":[5000]},"card_required":{"type":"boolean","title":"Card Required","description":"`true`: the promotion applies only when a loyalty card is presented.","default":false},"tiers":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","maxItems":3},{"type":"null"}],"title":"Tiers","description":"Status level ids (`loyalty_settings.tier_programme.levels[].id`): the promotion applies only to a presented card holding one of them. `null` or empty = every customer. Written by the tier programme's settings.","examples":[["silber","gold"]]},"coupon_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupon Code","description":"Retired: a code typed at checkout. A read may still answer it; a write ignores it.","readOnly":true}},"additionalProperties":false,"type":"object","title":"PromotionConditions","description":"Gating predicates evaluated before a promotion may apply. All optional;\nan unset field imposes no constraint.\n\n- `min_qty`     \u2014 the matching lines must total at least this quantity.\n- `min_amount`  \u2014 the matching lines' gross must be at least this (minor units).\n                  For cart-level types (spend_threshold/amount_discount) this\n                  is the whole-cart threshold.\n- `card_required` \u2014 a loyalty card must be presented for the promo to apply.\n- `tiers`       \u2014 reserved for cards holding one of these status levels; written by the tier programme's\n                  settings, which name the promotions each level gets."},"PromotionConditions-Output":{"properties":{"min_qty":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Qty","description":"The matching lines must total at least this many units; `null` = no minimum.","examples":[3]},"min_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Amount","description":"The matching lines must total at least this gross amount, in minor units (5000 = 50.00); for `spend_threshold` and `amount_discount` the whole cart. `null` = no minimum.","examples":[5000]},"card_required":{"type":"boolean","title":"Card Required","description":"`true`: the promotion applies only when a loyalty card is presented.","default":false},"tiers":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array","maxItems":3},{"type":"null"}],"title":"Tiers","description":"Status level ids (`loyalty_settings.tier_programme.levels[].id`): the promotion applies only to a presented card holding one of them. `null` or empty = every customer. Written by the tier programme's settings.","examples":[["silber","gold"]]}},"type":"object","title":"PromotionConditions","description":"Gating predicates evaluated before a promotion may apply. All optional;\nan unset field imposes no constraint.\n\n- `min_qty`     \u2014 the matching lines must total at least this quantity.\n- `min_amount`  \u2014 the matching lines' gross must be at least this (minor units).\n                  For cart-level types (spend_threshold/amount_discount) this\n                  is the whole-cart threshold.\n- `card_required` \u2014 a loyalty card must be presented for the promo to apply.\n- `tiers`       \u2014 reserved for cards holding one of these status levels; written by the tier programme's\n                  settings, which name the promotions each level gets."},"PromotionCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the promotion as the receipt and the reports show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"type":{"type":"string","enum":["percent_discount","amount_discount","buy_x_get_y","spend_threshold","happy_hour"],"title":"Type","description":"What the promotion does: `percent_discount` = a percentage off each matching line, `amount_discount` = a flat amount off the cart once the conditions hold, `buy_x_get_y` = the cheapest matching units discounted, `spend_threshold` = a reward once the cart reaches `conditions.min_amount`, `happy_hour` = a percentage off matching lines inside the daily window.","examples":["happy_hour"]},"active":{"type":"boolean","title":"Active","description":"`false` switches the promotion off without deleting it.","default":true},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the promotion runs, a calendar date `YYYY-MM-DD`, inclusive; `null` = no start.","examples":["2026-11-01"]},"valid_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid Until","description":"Last day the promotion runs, `YYYY-MM-DD`, inclusive (it still runs on that day), not before `valid_from`; `null` = no end.","examples":["2026-12-24"]},"days":{"items":{"type":"integer","maximum":6.0,"minimum":0.0},"type":"array","title":"Days","description":"Weekdays the promotion runs: 0 = Monday \u2026 6 = Sunday; empty = every day.","examples":[[0,1,2,3,4]]},"hour_from":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Hour From","description":"Start of the daily window as `HH:MM` on the till's clock, inclusive; `null` = from 00:00.","examples":["17:00"]},"hour_to":{"anyOf":[{"type":"string","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"},{"type":"null"}],"title":"Hour To","description":"End of the daily window as `HH:MM` or `24:00`, exclusive (`19:00` = until 18:59); `null` = until midnight.","examples":["19:00"]},"applies_to":{"$ref":"#/components/schemas/AppliesTo","description":"Which cart lines the promotion may touch."},"conditions":{"$ref":"#/components/schemas/PromotionConditions-Input","description":"What must hold before the promotion applies."},"effect":{"$ref":"#/components/schemas/PromotionEffect-Input","description":"The reward; each `type` reads the fields it needs."},"show_in_customer_app":{"type":"boolean","title":"Show In Customer App","description":"`true`: the promotion is listed on the customer's card page (\"Aktionen\") while it runs or starts within 14 days. Default `false`: a promotion nobody ticked stays invisible to customers.","default":false},"customer_text":{"additionalProperties":{"type":"string"},"type":"object","title":"Customer Text","description":"The sentence the customer's card page shows for the promotion, per language; a language left out falls back to the promotion `name`. Read only when `show_in_customer_app` is `true`.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the promotion's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"additionalProperties":false,"type":"object","required":["type"],"title":"PromotionCreate","description":"A promotion the till applies by itself when a sale qualifies. It is valid between `valid_from` and `valid_until`, on the weekdays in `days` (0 = Monday to 6 = Sunday; empty is every day) and between `hour_from` and `hour_to`. When several qualify for the same scope (`applies_to`), the till applies the one that is best for the customer; promotions do not stack."},"PromotionEffect-Input":{"properties":{"percent_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Percent Bps","description":"Percent off in basis points (1000 = 10 %, 2000 = 20 %); read by `percent_discount`, `happy_hour` and `spend_threshold`.","examples":[2000]},"amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount","description":"A flat amount off the cart, in minor units (500 = 5.00); read by `amount_discount` and `spend_threshold`.","examples":[500]},"buy_qty":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Buy Qty","description":"`buy_x_get_y`: for every `buy_qty` matching units \u2026","examples":[3]},"get_qty":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Get Qty","description":"\u2026 `get_qty` of the cheapest matching units are discounted \u2026","examples":[1]},"get_discount_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Get Discount Bps","description":"\u2026 by this much, in basis points: 10000 = free, 5000 = half price.","examples":[10000]},"points_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Points Factor","description":"Retired: a points multiplier. A read may still answer it; a write ignores it.","readOnly":true}},"additionalProperties":false,"type":"object","title":"PromotionEffect","description":"The reward a promotion grants. A given type reads the subset it needs; the\nrest stay unset. Kept as one open struct (not a discriminated union) so the\nadmin form and the engine share one shape and a new type is purely additive.\n\n- `percent_bps`  \u2014 percent off (basis points; 1000 = 10 %). Used by\n                   percent_discount / happy_hour / spend_threshold.\n- `amount`       \u2014 flat cart discount (minor units). Used by amount_discount /\n                   spend_threshold.\n- `buy_qty` / `get_qty` / `get_discount_bps` \u2014 buy_x_get_y: for every\n                   `buy_qty` matching units, `get_qty` of the CHEAPEST matching\n                   units are discounted by `get_discount_bps` (10000 = free)."},"PromotionEffect-Output":{"properties":{"percent_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Percent Bps","description":"Percent off in basis points (1000 = 10 %, 2000 = 20 %); read by `percent_discount`, `happy_hour` and `spend_threshold`.","examples":[2000]},"amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount","description":"A flat amount off the cart, in minor units (500 = 5.00); read by `amount_discount` and `spend_threshold`.","examples":[500]},"buy_qty":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Buy Qty","description":"`buy_x_get_y`: for every `buy_qty` matching units \u2026","examples":[3]},"get_qty":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Get Qty","description":"\u2026 `get_qty` of the cheapest matching units are discounted \u2026","examples":[1]},"get_discount_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Get Discount Bps","description":"\u2026 by this much, in basis points: 10000 = free, 5000 = half price.","examples":[10000]}},"type":"object","title":"PromotionEffect","description":"The reward a promotion grants. A given type reads the subset it needs; the\nrest stay unset. Kept as one open struct (not a discriminated union) so the\nadmin form and the engine share one shape and a new type is purely additive.\n\n- `percent_bps`  \u2014 percent off (basis points; 1000 = 10 %). Used by\n                   percent_discount / happy_hour / spend_threshold.\n- `amount`       \u2014 flat cart discount (minor units). Used by amount_discount /\n                   spend_threshold.\n- `buy_qty` / `get_qty` / `get_discount_bps` \u2014 buy_x_get_y: for every\n                   `buy_qty` matching units, `get_qty` of the CHEAPEST matching\n                   units are discounted by `get_discount_bps` (10000 = free)."},"PromotionPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PromotionRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"PromotionPage"},"PromotionRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the promotion as the receipt and the reports show it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"type":{"type":"string","enum":["percent_discount","amount_discount","buy_x_get_y","spend_threshold","happy_hour"],"title":"Type","description":"What the promotion does: `percent_discount` = a percentage off each matching line, `amount_discount` = a flat amount off the cart once the conditions hold, `buy_x_get_y` = the cheapest matching units discounted, `spend_threshold` = a reward once the cart reaches `conditions.min_amount`, `happy_hour` = a percentage off matching lines inside the daily window.","examples":["happy_hour"]},"active":{"type":"boolean","title":"Active","description":"`false` switches the promotion off without deleting it.","default":true},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the promotion runs, a calendar date `YYYY-MM-DD`, inclusive; `null` = no start.","examples":["2026-11-01"]},"valid_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid Until","description":"Last day the promotion runs, `YYYY-MM-DD`, inclusive (it still runs on that day), not before `valid_from`; `null` = no end.","examples":["2026-12-24"]},"days":{"items":{"type":"integer","maximum":6.0,"minimum":0.0},"type":"array","title":"Days","description":"Weekdays the promotion runs: 0 = Monday \u2026 6 = Sunday; empty = every day.","examples":[[0,1,2,3,4]]},"hour_from":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Hour From","description":"Start of the daily window as `HH:MM` on the till's clock, inclusive; `null` = from 00:00.","examples":["17:00"]},"hour_to":{"anyOf":[{"type":"string","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"},{"type":"null"}],"title":"Hour To","description":"End of the daily window as `HH:MM` or `24:00`, exclusive (`19:00` = until 18:59); `null` = until midnight.","examples":["19:00"]},"applies_to":{"$ref":"#/components/schemas/AppliesTo","description":"Which cart lines the promotion may touch."},"conditions":{"$ref":"#/components/schemas/PromotionConditions-Output","description":"What must hold before the promotion applies."},"effect":{"$ref":"#/components/schemas/PromotionEffect-Output","description":"The reward; each `type` reads the fields it needs."},"show_in_customer_app":{"type":"boolean","title":"Show In Customer App","description":"`true`: the promotion is listed on the customer's card page (\"Aktionen\") while it runs or starts within 14 days. Default `false`: a promotion nobody ticked stays invisible to customers.","default":false},"customer_text":{"additionalProperties":{"type":"string"},"type":"object","title":"Customer Text","description":"The sentence the customer's card page shows for the promotion, per language; a language left out falls back to the promotion `name`. Read only when `show_in_customer_app` is `true`.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Output"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the promotion's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"type":"object","required":["_id","type"],"title":"PromotionRecord"},"PromotionUpdate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"Name of the promotion as the receipt and the reports show it, per language. May be left out, never null."},"type":{"anyOf":[{"type":"string","enum":["percent_discount","amount_discount","buy_x_get_y","spend_threshold","happy_hour"]},{"type":"null"}],"title":"Type","description":"What the promotion does: `percent_discount` = a percentage off each matching line, `amount_discount` = a flat amount off the cart once the conditions hold, `buy_x_get_y` = the cheapest matching units discounted, `spend_threshold` = a reward once the cart reaches `conditions.min_amount`, `happy_hour` = a percentage off matching lines inside the daily window. May be left out, never null.","examples":["happy_hour"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"`false` switches the promotion off without deleting it. May be left out, never null."},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day the promotion runs, a calendar date `YYYY-MM-DD`, inclusive; `null` = no start.","examples":["2026-11-01"]},"valid_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid Until","description":"Last day the promotion runs, `YYYY-MM-DD`, inclusive (it still runs on that day), not before `valid_from`; `null` = no end.","examples":["2026-12-24"]},"days":{"anyOf":[{"items":{"type":"integer","maximum":6.0,"minimum":0.0},"type":"array"},{"type":"null"}],"title":"Days","description":"Weekdays the promotion runs: 0 = Monday \u2026 6 = Sunday; empty = every day. May be left out, never null.","examples":[[0,1,2,3,4]]},"hour_from":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Hour From","description":"Start of the daily window as `HH:MM` on the till's clock, inclusive; `null` = from 00:00.","examples":["17:00"]},"hour_to":{"anyOf":[{"type":"string","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"},{"type":"null"}],"title":"Hour To","description":"End of the daily window as `HH:MM` or `24:00`, exclusive (`19:00` = until 18:59); `null` = until midnight.","examples":["19:00"]},"applies_to":{"anyOf":[{"$ref":"#/components/schemas/AppliesTo"},{"type":"null"}],"description":"Which cart lines the promotion may touch. May be left out, never null."},"conditions":{"anyOf":[{"$ref":"#/components/schemas/PromotionConditions-Input"},{"type":"null"}],"description":"What must hold before the promotion applies. May be left out, never null."},"effect":{"anyOf":[{"$ref":"#/components/schemas/PromotionEffect-Input"},{"type":"null"}],"description":"The reward; each `type` reads the fields it needs. May be left out, never null."},"show_in_customer_app":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show In Customer App","description":"`true`: the promotion is listed on the customer's card page (\"Aktionen\") while it runs or starts within 14 days. Default `false`: a promotion nobody ticked stays invisible to customers. May be left out, never null."},"customer_text":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Customer Text","description":"The sentence the customer's card page shows for the promotion, per language; a language left out falls back to the promotion `name`. Read only when `show_in_customer_app` is `true`. May be left out, never null."},"i18n_meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FieldI18nHint-Input"},"type":"object"},{"type":"null"}],"title":"I18N Meta","description":"Translation hints for the promotion's `name`, keyed by field: the context for a machine translation and which languages a person wrote."}},"additionalProperties":false,"type":"object","title":"PromotionUpdate","description":"A change to a promotion: only the fields sent change; a block sent replaces the stored block whole."},"PurchaseCost":{"properties":{"amount":{"type":"number","title":"Amount","description":"What one `unit` costs to buy, in minor units; fractions allowed (a cost basis, not money charged).","default":0.0},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The unit the cost is for."},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","description":"The day the price was observed, `YYYY-MM-DD`."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Where the price came from: `supplier_bill`, `manual`, an import."}},"additionalProperties":false,"type":"object","title":"PurchaseCost","description":"What one `unit` of a bought-in article costs, in minor units with decimals: a cost can be less than one cent, such as a label at 0.3. Only on an article without a recipe; the cost of the others comes from their recipes."},"QuantityBreak":{"properties":{"min_quantity":{"type":"integer","title":"Min Quantity","description":"From this many units on, this step applies."},"amount":{"type":"integer","title":"Amount","description":"The unit price from that quantity on, in minor units."}},"additionalProperties":false,"type":"object","required":["min_quantity","amount"],"title":"QuantityBreak","description":"One step of a quantity scale: from `min_quantity` units on, the unit price is `amount`, in minor units."},"QuantityDiscountCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The quantity discount's name; not blank."},"tiers":{"items":{"$ref":"#/components/schemas/QuantityDiscountTier"},"type":"array","title":"Tiers","description":"The amount thresholds, each with its percentage. The invoice gets the percentage of the highest threshold its net amount reaches; empty = no discount."}},"additionalProperties":false,"type":"object","required":["name"],"title":"QuantityDiscountCreate","description":"A quantity discount: a scale of invoice amounts, each with a percentage off."},"QuantityDiscountTier":{"properties":{"from_amount":{"type":"integer","minimum":0.0,"title":"From Amount","description":"The threshold: from this invoice net amount on, in minor units (cents)."},"discount_all_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Discount All Pct","description":"The percentage off the whole invoice amount from this threshold on, 0 to 100.","default":0.0}},"additionalProperties":false,"type":"object","required":["from_amount"],"title":"QuantityDiscountTier","description":"One threshold of a quantity discount: from this invoice amount on, the whole\namount gets the percentage off."},"QuantityDiscountUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"The quantity discount's name; not blank."},"tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuantityDiscountTier"},"type":"array"},{"type":"null"}],"title":"Tiers","description":"The amount thresholds, each with its percentage. The invoice gets the percentage of the highest threshold its net amount reaches; empty = no discount. Sent, the list replaces the stored one whole."}},"additionalProperties":false,"type":"object","title":"QuantityDiscountUpdate","description":"A change to a quantity discount: only the fields sent change."},"RawMaterialAllergenRow":{"properties":{"allergen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergen Id","description":"The allergen (id)."},"contains":{"type":"boolean","title":"Contains","description":"true: the raw material contains it.","default":false},"traces":{"type":"boolean","title":"Traces","description":"true: it may contain traces of it.","default":false}},"additionalProperties":true,"type":"object","title":"RawMaterialAllergenRow","description":"One allergen statement of a raw material.\n\nOPEN on purpose (``extra=\"allow\"``), unlike the article's other blocks: the\nRezeptAssist import writes keys this model does not list and the recipes\nmodule owns the full shape, so refusing an unknown key would refuse the\narticle's own stored sub-document when a client sends it back."},"RawMaterialComposition":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id","description":"The ingredient (id)."},"menge_pct":{"type":"number","minimum":0.0,"title":"Menge Pct","description":"Its share, percent.","default":0},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord","description":"Its order in the list."}},"additionalProperties":true,"type":"object","title":"RawMaterialComposition","description":"One ingredient of a raw material.\n\nOPEN on purpose (``extra=\"allow\"``), unlike the article's other blocks: the\nRezeptAssist import writes keys this model does not list and the recipes\nmodule owns the full shape, so refusing an unknown key would refuse the\narticle's own stored sub-document when a client sends it back."},"RawMaterialCost":{"properties":{"per_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Per G","description":"Cost per gram."},"per_item":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Per Item","description":"Cost per piece."}},"additionalProperties":true,"type":"object","title":"RawMaterialCost","description":"What a raw material costs.\n\nOPEN on purpose (``extra=\"allow\"``), unlike the article's other blocks: the\nRezeptAssist import writes keys this model does not list and the recipes\nmodule owns the full shape, so refusing an unknown key would refuse the\narticle's own stored sub-document when a client sends it back."},"RawMaterialNutrientRow":{"properties":{"nutrient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nutrient Id","description":"The nutrient (id)."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Its amount per 100 g."}},"additionalProperties":true,"type":"object","title":"RawMaterialNutrientRow","description":"One nutrient value of a raw material.\n\nOPEN on purpose (``extra=\"allow\"``), unlike the article's other blocks: the\nRezeptAssist import writes keys this model does not list and the recipes\nmodule owns the full shape, so refusing an unknown key would refuse the\narticle's own stored sub-document when a client sends it back."},"RawMaterialPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RawMaterialRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"RawMaterialPage","description":"Raw materials: all of them, or one page when `limit` was passed."},"RawMaterialPriceInput":{"properties":{"mode":{"type":"string","enum":["kg","commercial_unit","package"],"title":"Mode","description":"How the price is known: per `kg`, per `commercial_unit` (a pack of items of a known weight), or per `package` (a pack of pieces used by the piece)."},"kg_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Kg Price","description":"`kg`: the price, per kg or for `kg_netto_weight`."},"kg_netto_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Kg Netto Weight","description":"`kg`: the net weight the price is for (a 25 kg sack)."},"use_kg_netto_weight":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Kg Netto Weight","description":"`kg`: true when `kg_price` is for `kg_netto_weight`."},"cu_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cu Price","description":"`commercial_unit`: the price of one pack."},"cu_items":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cu Items","description":"`commercial_unit`: items per pack."},"cu_item_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cu Item Weight","description":"`commercial_unit`: the weight of one item."},"cu_item_netto_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cu Item Netto Weight","description":"`commercial_unit`: the net weight of one item."},"use_cu_item_netto_weight":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Cu Item Netto Weight","description":"`commercial_unit`: true when the net weight counts."},"weight_mu":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Weight Mu","description":"The weight unit `cu_item_weight` is in, as a code."},"package_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Package Price","description":"`package`: the price of one package."},"package_items":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Package Items","description":"`package`: pieces per package."}},"additionalProperties":true,"type":"object","required":["mode"],"title":"RawMaterialPriceInput","description":"How the price of a raw material is entered (`mode`): per kilogram (`kg`), per commercial unit (`commercial_unit`) or per package (`package`), each with its own price and weight fields."},"RawMaterialRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The name, per language (`de`, `en`, `fr`, `it`).","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"article_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Number","description":"The article number."},"title_as_ingredient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title As Ingredient","description":"How the raw material reads in a declaration's ingredient list."},"binding_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Binding Text","description":"The legally binding name, where it differs."},"use_bracket_declaration":{"type":"boolean","title":"Use Bracket Declaration","description":"List its own ingredients in brackets.","default":false},"dont_declare":{"type":"boolean","title":"Dont Declare","description":"true: it does not appear in the ingredient list.","default":false},"supplier_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Supplier Id","description":"The supplier (`supp_\u2026`) it is bought from."},"cost":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialCost"},{"type":"null"}],"description":"What it costs, per gram and per piece; computed from `price_input`."},"dry_matter_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Dry Matter Pct","description":"Dry matter, percent 0 to 100."},"production_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Country","description":"Where it is produced."},"storage_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions","description":"The bakery's own storage instruction."},"is_water":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Water","description":"true: it counts as water (\"dough per litre of water\")."},"inventar_menge_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Inventar Menge G","description":"The stock count, in grams."},"inventory_list_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inventory List Ids","description":"The stock-count lists (ids) it is counted in."},"composition":{"items":{"$ref":"#/components/schemas/RawMaterialComposition"},"type":"array","title":"Composition","description":"The ingredients it is made of."},"composition_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Composition Text","description":"Its ingredient list as the supplier writes it."},"nutrition_per_100g":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Nutrition Per 100G","description":"Its nutrition values per 100 g as the supplier states them."},"price_input":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialPriceInput"},{"type":"null"}],"description":"How its price is known; `cost` is computed from it."},"dont_import_ingredients":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Ingredients","description":"true: a supplier import leaves the ingredients alone."},"dont_import_nutrition":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Nutrition","description":"true: a supplier import leaves the nutrition values alone."},"dont_import_allergens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Allergens","description":"true: a supplier import leaves the allergens alone."},"nutrients":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawMaterialNutrientRow"},"type":"array"},{"type":"null"}],"title":"Nutrients","description":"Its nutrition values."},"allergens":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawMaterialAllergenRow"},"type":"array"},{"type":"null"}],"title":"Allergens","description":"Its allergens."},"additives":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Additives","description":"Its additives."},"ccp":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Ccp","description":"Its critical control points (HACCP)."},"smart_scale":{"anyOf":[{"$ref":"#/components/schemas/SmartScaleMaster"},{"type":"null"}],"description":"The scale settings the lines using it inherit."},"is_item":{"type":"boolean","title":"Is Item","description":"Counted in pieces rather than weighed.","default":false}},"type":"object","required":["_id"],"title":"RawMaterialRecord","description":"A raw material: an ingredient recipes are made from, with its master data (article number, name, cost, supplier), its own ingredients, allergens and nutrition values. `updated_at` is when it last changed. A record can carry further keys; read the ones you need."},"RawMaterialSubdoc":{"properties":{"cost":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialCost"},{"type":"null"}],"description":"What it costs."},"dry_matter_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Dry Matter Pct","description":"Dry matter, percent 0 to 100."},"production_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Country","description":"Where it is produced."},"storage_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions","description":"The bakery's own storage instruction."},"is_water":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Water","description":"true: counts as water (\"dough per litre of water\")."},"inventar_menge_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Inventar Menge G","description":"The stock count, in grams."},"stock_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Product Id","description":"The article (id) the raw material is bought and counted as."},"stock_unit_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Stock Unit G","description":"What one unit of that article weighs, in grams."},"inventory_list_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inventory List Ids","description":"Stock-count lists (ids) the raw material is counted in."},"composition":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawMaterialComposition"},"type":"array"},{"type":"null"}],"title":"Composition","description":"Its ingredients."},"price_input":{"anyOf":[{"$ref":"#/components/schemas/RawMaterialPriceInput"},{"type":"null"}],"description":"How its price is known; `cost` is computed from it."},"dont_import_ingredients":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Ingredients","description":"true: a vendor import leaves the ingredients alone."},"dont_import_nutrition":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Nutrition","description":"true: a vendor import leaves the nutrition values alone."},"dont_import_allergens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dont Import Allergens","description":"true: a vendor import leaves the allergens alone."},"nutrients":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawMaterialNutrientRow"},"type":"array"},{"type":"null"}],"title":"Nutrients","description":"Nutrient values."},"allergens":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawMaterialAllergenRow"},"type":"array"},{"type":"null"}],"title":"Allergens","description":"Allergen statements."}},"additionalProperties":true,"type":"object","title":"RawMaterialSubdoc","description":"The raw-material settings of an article. Numbers are checked; other keys are kept as sent."},"RecipeBaking":{"properties":{"kneader1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader1"},"kneader1_time1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader1 Time1"},"kneader1_time2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader1 Time2"},"kneader2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader2"},"kneader2_time1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader2 Time1"},"kneader2_time2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kneader2 Time2"},"rest_minutes":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Rest Minutes"},"oven_programme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oven Programme"},"bake_time_min":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Bake Time Min"},"bake_time_max":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Bake Time Max"},"bake_time_unit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bake Time Unit Id"},"bake_time_unit":{"anyOf":[{"type":"string","enum":["min","h"]},{"type":"null"}],"title":"Bake Time Unit"},"bake_temperature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bake Temperature"},"lower_heat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lower Heat"},"upper_heat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upper Heat"},"steam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Steam"},"dough_target_temp_c":{"anyOf":[{"type":"number","maximum":60.0,"minimum":0.0},{"type":"null"}],"title":"Dough Target Temp C","description":"The dough temperature the recipe aims for after kneading, in \u00b0C."},"friction_temp_c":{"anyOf":[{"type":"number","maximum":40.0,"minimum":0.0},{"type":"null"}],"title":"Friction Temp C","description":"The heat the kneader adds to the dough, in \u00b0C; empty counts as 0."}},"additionalProperties":true,"type":"object","title":"RecipeBaking","description":"How the recipe is kneaded and baked: the kneading machines and their times in first and second gear, the oven programme, temperature, heat and steam, all as free text, the bake time in minutes (`bake_time_min`, `bake_time_max`) and the dough rest after kneading in minutes (`rest_minutes`)."},"RecipeEntityPosition-Output":{"properties":{"ref_kind":{"type":"string","enum":["raw_material","recipe"],"title":"Ref Kind","description":"What the ingredient is: a `raw_material`, or a `recipe` used as a semi-finished product.","default":"raw_material"},"ref_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Id","description":"The id of that raw material (`rm_\u2026`) or recipe (`rec_\u2026`)."},"items":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Items","description":"The number of pieces, for an ingredient counted in pieces."},"menge":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Menge","description":"The quantity of the ingredient, in grams.","default":0},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord","description":"The line's place in the recipe."},"post_modification":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Post Modification","description":"The phase after which the line is added (0 = the dough)."},"post_modification_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Modification Name","description":"The name of that phase."},"weighing":{"anyOf":[{"$ref":"#/components/schemas/PositionWeighing-Output"},{"type":"null"}],"description":"The line's weighing tolerances on the scale."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"What the baker is told at this line."},"step_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Image Url","description":"A picture shown at this line."},"ccp_symbol":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Ccp Symbol","description":"The HACCP mark printed at this line."},"ref_intern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Intern","description":"The previous system's key of the component, kept as sent."}},"type":"object","title":"RecipeEntityPosition","description":"One ingredient line of a recipe: a quantity in grams (`menge`) of a raw material or of another recipe (`ref_kind`, `ref_id`), or a number of pieces (`items`) for an ingredient counted in pieces."},"RecipeLoss":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Label","description":"What the loss is."},"value":{"type":"number","minimum":0.0,"title":"Value","description":"The loss, in the unit of `unit`."},"unit":{"type":"string","enum":["g","pct"],"title":"Unit","description":"`g` grams, `pct` percent of the recipe weight.","default":"g"}},"additionalProperties":false,"type":"object","required":["value"],"title":"RecipeLoss","description":"One loss before baking on the recipe's yield (proofing, weighing, leftover dough).\n\nA list, not one number, because a baker loses dough at several steps and wants to\nsay which. Every engine still reads the ONE sum (`non_ts_losses`), which the server\ncomputes from this list on each save."},"RecipePage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RecipeRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"RecipePage","description":"Recipes: all of them, or one page when `limit` was passed."},"RecipePosition":{"properties":{"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id","description":"The component (raw material or semi-finished article id)."},"items":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Items","description":"A piece count, for a raw material priced per package."},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord","description":"The position's order in the recipe."},"post_modification":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Post Modification","description":"A processing step applied after mixing, as a number."},"menge":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Menge","description":"The amount in grams; null or 0 for a separator row.","default":0}},"additionalProperties":true,"type":"object","title":"RecipePosition","description":"One line of a recipe. Its quantity must be a number; other keys are kept as sent."},"RecipeProductionStage":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"What the step is (\"knead\", \"bake\")."},"duration":{"type":"number","minimum":0.0,"title":"Duration","description":"Its duration in minutes.","default":0},"tariff_multiplier":{"type":"number","minimum":0.0,"title":"Tariff Multiplier","description":"The multiplier on the tariff's wage.","default":0},"tariff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tariff Id","description":"The tariff (id) the step is paid at."},"minuten_lohn":{"type":"number","minimum":0.0,"title":"Minuten Lohn","description":"The wage per minute, used when no tariff is named.","default":0},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord","description":"The step's order."}},"additionalProperties":true,"type":"object","title":"RecipeProductionStage","description":"One labour step (duration \u00d7 tariff multiplier \u00d7 per-minute wage).\n\nOPEN on purpose (``extra=\"allow\"``), unlike the article's other blocks: the\nRezeptAssist import writes keys this model does not list and the recipes\nmodule owns the full shape, so refusing an unknown key would refuse the\narticle's own stored sub-document when a client sends it back."},"RecipeRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"The name, per language (`de`, `en`, `fr`, `it`).","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"The recipe number."},"active":{"type":"boolean","title":"Active","description":"false: the recipe is no longer used; it stays in the book.","default":true},"group_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Group Id","description":"The recipe group (id)."},"title_as_ingredient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title As Ingredient","description":"How the recipe reads as an ingredient of another recipe's declaration."},"is_semi_finished":{"type":"boolean","title":"Is Semi Finished","description":"A semi-finished product, such as a dough, used in other recipes.","default":false},"rms_total_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Rms Total Weight","description":"The total weight of the ingredients, in grams."},"product_output_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Product Output Weight","description":"The weight of the finished product, in grams."},"round_to_integer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Round To Integer","description":"The balancing loss, in grams: the dough left over when the batch is rounded to whole pieces."},"non_ts_losses":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Non Ts Losses","description":"The dough lost before baking (proofing, weighing, trimming), in grams. Computed from `losses` when the recipe lists them."},"items_in_product":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Items In Product","description":"The pieces the recipe yields."},"recipe_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recipe Type Id","description":"The recipe type: 1 a recipe, 2 to 4 a semi-finished product (by weight, by piece weight, by selling weight)."},"losses":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecipeLoss"},"type":"array"},{"type":"null"}],"title":"Losses","description":"The losses before baking, one row each, in grams (`g`) or as a percent of the recipe weight (`pct`). Their sum is stored as `non_ts_losses`."},"piece_input":{"anyOf":[{"type":"string","enum":["count","weight"]},{"type":"null"}],"title":"Piece Input","description":"Which figure the baker enters: `count` the pieces per batch, `weight` the dough weight per piece; the other one is computed."},"item_output_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Item Output Weight","description":"The dough weight of one piece before baking, in grams."},"bake_loss_input":{"anyOf":[{"type":"string","enum":["sale_weight","g","pct"]},{"type":"null"}],"title":"Bake Loss Input","description":"Which figure the baker enters after baking: `sale_weight` the sale weight per piece, `g` the baking loss per piece in grams, `pct` the baking loss in percent of the dough per piece."},"weight_mu":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Weight Mu","description":"The unit the amounts are shown in: 0 g, 1 kg, 2 oz, 3 lb, 4 100 g."},"household_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Household Percent","description":"The household surcharge, percent."},"write_off_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Write Off Percent","description":"The write-off, percent."},"margin_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percent","description":"The margin, percent."},"tax_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Percent","description":"The VAT rate the suggested price includes, percent."},"sale_price_incl_tax":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Sale Price Incl Tax","description":"The sale price expected for one piece, VAT included."},"use_bracket_declaration":{"type":"boolean","title":"Use Bracket Declaration","description":"List the ingredients of a semi-finished product in brackets.","default":false},"declaration_mode":{"anyOf":[{"type":"string","enum":["auto","manual"]},{"type":"null"}],"title":"Declaration Mode","description":"auto: the ingredient list is computed; manual: the text below is printed."},"declaration_manual":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Declaration Manual","description":"The ingredient list typed by hand, per language."},"quid_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quid Hex","description":"The quantity declaration's colour."},"quid_marks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Quid Marks","description":"The ingredients whose share is declared."},"positions":{"items":{"$ref":"#/components/schemas/RecipeEntityPosition-Output"},"type":"array","title":"Positions","description":"The ingredients, each with its quantity."},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecipeStep-Output"},"type":"array"},{"type":"null"}],"title":"Steps","description":"The production steps: instructions placed between the ingredients by `ord`."},"production_stages":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecipeProductionStage"},"type":"array"},{"type":"null"}],"title":"Production Stages","description":"The labour steps, with their duration and wage."},"baking":{"anyOf":[{"$ref":"#/components/schemas/RecipeBaking"},{"type":"null"}],"description":"How the recipe is kneaded and baked."},"production_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Description","description":"How the recipe is produced, as the baking list prints it."},"quality_characteristics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Characteristics","description":"The quality characteristics, plain text."},"quality_characteristics_rtf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Characteristics Rtf","description":"The quality characteristics as the previous system's formatted text."},"storage_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions","description":"The bakery's storage instruction, plain text."},"storage_conditions_rtf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Conditions Rtf","description":"The storage instruction as the previous system's formatted text."},"sale_info":{"anyOf":[{"$ref":"#/components/schemas/RecipeSaleInfo"},{"type":"null"}],"description":"The label values linked articles take from the recipe; sent whole."},"can_contain_allergens":{"anyOf":[{"items":{"$ref":"#/components/schemas/CanContainAllergen-Output"},"type":"array"},{"type":"null"}],"title":"Can Contain Allergens","description":"The allergens the recipe may carry as traces."},"factor_calculation_type":{"anyOf":[{"type":"string","enum":["x","weight","items"]},{"type":"null"}],"title":"Factor Calculation Type","description":"What the production factors are based on: a factor, the weight, the pieces."},"factors":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Factors","description":"The production factors."},"default_vessel_parts":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Default Vessel Parts","description":"The grams per vessel a batch is split into."},"default_vessel_slots":{"anyOf":[{"items":{"$ref":"#/components/schemas/VesselSlot"},"type":"array"},{"type":"null"}],"title":"Default Vessel Slots","description":"The vessels a batch is split into, each with its grams."},"vessel_tolerance":{"anyOf":[{"$ref":"#/components/schemas/VesselTolerance"},{"type":"null"}],"description":"The weighing tolerance of every vessel."},"charge_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Charge G","description":"The batch size the shop produces, in grams."},"smart_scale":{"anyOf":[{"$ref":"#/components/schemas/SmartScaleMaster"},{"type":"null"}],"description":"The scale settings when the recipe is weighed as a line of another recipe."}},"type":"object","required":["_id"],"title":"RecipeRecord","description":"A recipe: its ingredients with their quantities (`positions`), its production steps (`steps`) and labour steps (`production_stages`), its yield and its costing and declaration settings. `updated_at` is when it last changed. A record can carry further keys; read the ones you need."},"RecipeSaleInfo":{"properties":{"storage":{"additionalProperties":{"type":"string"},"type":"object","title":"Storage","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"consumer_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Consumer Info","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"sales_info":{"additionalProperties":{"type":"string"},"type":"object","title":"Sales Info","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"shelf_life_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Shelf Life Days"},"consume_within_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Consume Within Days"},"sell_by_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sell By Days"},"to_move_till_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"To Move Till Days"},"must_be_kept_cool":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Must Be Kept Cool"},"sale_weight_g":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sale Weight G"},"owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Owned"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"additionalProperties":false,"type":"object","title":"RecipeSaleInfo","description":"The label values a recipe gives every article made from it: storage and consumer information, shelf life, sell-by and consume-within days, whether it must be kept cool, and the sale weight in grams."},"RecipeStep-Output":{"properties":{"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord","description":"The step's place in the sequence, shared with the `positions`."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"The instruction."},"step_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Image Url","description":"A picture of the step."},"smart_scale_property":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Smart Scale Property","description":"The scale's property slot for the step."}},"type":"object","title":"RecipeStep","description":"One production step of a recipe: an instruction, optionally with a picture. `ord` places it between the ingredient lines."},"RecipeSubdoc":{"properties":{"rms_total_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Rms Total Weight","description":"Total weight of the raw materials, in grams."},"product_output_weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Product Output Weight","description":"Weight of the finished product, in grams."},"round_to_integer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Round To Integer","description":"The step quantities are rounded to."},"non_ts_losses":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Non Ts Losses","description":"Losses other than dry matter, in grams."},"items_in_product":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Items In Product","description":"Pieces the recipe yields."},"recipe_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recipe Type Id","description":"The recipe type, as the recipe system numbers it."},"household_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Household Percent","description":"Overhead surcharge, percent."},"write_off_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Write Off Percent","description":"Write-off, percent."},"margin_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percent","description":"Legacy name of the tax rate; read `tax_percent`."},"tax_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Percent","description":"The tax rate the costing applies, percent."},"sale_price_incl_tax":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Sale Price Incl Tax","description":"The expected sale price of one item including tax, the yardstick the costs are measured against."},"positions":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecipePosition"},"type":"array"},{"type":"null"}],"title":"Positions","description":"The recipe's components."},"production_stages":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecipeProductionStage"},"type":"array"},{"type":"null"}],"title":"Production Stages","description":"The labour steps."},"quid_marks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Quid Marks","description":"Components (ids) whose share the declaration states as a percentage."},"factor_calculation_type":{"anyOf":[{"type":"string","enum":["x","weight","items"]},{"type":"null"}],"title":"Factor Calculation Type","description":"What `factors` are: `x` = multipliers, `weight` = target weights in grams, `items` = target piece counts."},"factors":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Factors","description":"Up to six production-scaling presets."}},"additionalProperties":true,"type":"object","title":"RecipeSubdoc","description":"The recipe settings of an article. Numbers are checked; other keys are kept as sent."},"RegionCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"name":{"type":"string","minLength":1,"title":"Name","description":"The region's name."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as ISO 3166-1 alpha-2 (`CH`); a name is read too. Left out on a create: the company's country."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 currency of the region's tills (`CHF`), three letters. Left out: the country's currency."},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the tills and from configuration, kept for its history.","default":"active"}},"additionalProperties":false,"type":"object","required":["name"],"title":"RegionCreate","description":"A region: a group of shops, usually one country, with their country and\ncurrency."},"RegionPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RegionRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"RegionPage"},"RegionRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"name":{"type":"string","minLength":1,"title":"Name","description":"The region's name."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as ISO 3166-1 alpha-2 (`CH`); a name is read too. Left out on a create: the company's country."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 currency of the region's tills (`CHF`), three letters. Left out: the country's currency."},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the tills and from configuration, kept for its history.","default":"active"}},"type":"object","required":["_id","name"],"title":"RegionRecord"},"RevenueFeed":{"properties":{"date_from":{"type":"string","title":"Date From","description":"First day of the window, inclusive."},"date_to":{"type":"string","title":"Date To","description":"Last day of the window, inclusive."},"granularity":{"type":"string","enum":["hour","day"],"title":"Granularity"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"The workspace's currency; each shop states its own."},"generated_at":{"type":"string","title":"Generated At","description":"When this answer was computed, ISO 8601 UTC."},"shops":{"items":{"$ref":"#/components/schemas/FeedShop"},"type":"array","title":"Shops"},"days":{"items":{"$ref":"#/components/schemas/FeedDay"},"type":"array","title":"Days","description":"Every day of the window, in order."},"rows":{"items":{"$ref":"#/components/schemas/RevenueRow"},"type":"array","title":"Rows","description":"Only the cells with sales. A cell that is absent had none."}},"type":"object","required":["date_from","date_to","granularity","generated_at","shops","days","rows"],"title":"RevenueFeed"},"RevenueRow":{"properties":{"shop_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Id","description":"The shop the till belongs to; null for a till assigned to no shop."},"date":{"type":"string","title":"Date","description":"Calendar day, YYYY-MM-DD."},"hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hour","description":"Hour of the shop's wall clock, 0-23. Null in a `day` feed, and in an `hour` feed for receipts whose time carries no readable hour."},"revenue":{"type":"integer","title":"Revenue","description":"Till revenue in minor units (Rappen, cents), VAT included: sales less refunds, without stored-value top-ups, sales on a customer account and comps. The figure the runmyhub dashboard shows."},"receipts":{"type":"integer","title":"Receipts","description":"Customers: sale receipts that took money at the till."}},"type":"object","required":["shop_id","date","hour","revenue","receipts"],"title":"RevenueRow"},"Routing":{"properties":{"prep_station_ids":{"items":{"type":"string"},"type":"array","title":"Prep Station Ids","description":"Kitchen stations (ids) the article's ticket goes to."},"kitchen_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kitchen Name","description":"The name printed on the kitchen ticket; null = the article's."},"kitchen_only":{"type":"boolean","title":"Kitchen Only","description":"true: printed on the kitchen ticket, not on the receipt.","default":false},"kitchen_dine_in_only":{"type":"boolean","title":"Kitchen Dine In Only","description":"true: reaches the kitchen only when the guest eats in; take-away prints nothing for this line.","default":false},"kitchen_skip_on_announce":{"type":"boolean","title":"Kitchen Skip On Announce","description":"true: not pulled onto another station when an order is announced; it still prints on its own station.","default":false}},"additionalProperties":false,"type":"object","title":"Routing","description":"Where a restaurant article's kitchen tickets go (`prep_station_ids`) and under which name. Optional."},"ServiceInfo":{"properties":{"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes","description":"How long the service takes."},"processing_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processing Minutes","description":"Waiting time inside it (a colour taking effect), in minutes."},"eligible_staff_ids":{"items":{"type":"string"},"type":"array","title":"Eligible Staff Ids","description":"Staff (ids) who may perform it; empty = anyone."}},"additionalProperties":false,"type":"object","title":"ServiceInfo","description":"For a service such as a haircut or a spa treatment: how long it takes and which staff may perform it. Optional."},"SettlementMode":{"type":"string","enum":["invoice","customer_credit_note"],"title":"SettlementMode","description":"Who issues the document a customer's deliveries are settled with.\n\n- ``invoice`` \u2014 the supplier invoices the customer; an unset field means the same.\n- ``customer_credit_note`` \u2014 self-billing: the customer issues its own credit\n  note for the deliveries minus the returns and pays that amount. That credit\n  note is the invoice for those deliveries."},"ShopCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"region_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Region Id","description":"The region (`reg_\u2026`) the shop belongs to; it gives the shop its country and currency when the shop sets none."},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"The branch's full name when `name` is a short code staff use (`TS`)."},"data_role":{"type":"string","enum":["production","test","labeling"],"title":"Data Role","description":"What this branch's numbers mean: `production` = real trade, counted in every total; `test` = a running branch whose figures stay out of every turnover total; `labeling` = a labelling site that prints labels and sells nothing. `test` and `labeling` also exclude every till of the branch.","default":"production"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"The address on one line, for older readers; prefer `street`, `postal_code` and `city`."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and number."},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Town or city."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as ISO 3166-1 alpha-2 (`CH`); a name is read too. Left out on a create: the region's country, then the company's."},"canton":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canton","description":"Canton, state or region code (`ZH`); public and school holidays follow it."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number as the receipts print it."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address of the shop."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA time zone (`Europe/Zurich`) the shop's tills keep; `null` = the company's."},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat","description":"Latitude of the shop, -90 to 90."},"lng":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lng","description":"Longitude of the shop, -180 to 180."},"geo_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geo Source","description":"Where `lat` and `lng` came from: `map_url` = the shop's own map pin, `geocoded_city` = the town's centre; empty for coordinates entered by hand."},"google_place_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Place Id","description":"The shop's Google Place ID, for its business listing."},"opening_hours":{"anyOf":[{"items":{"$ref":"#/components/schemas/WeekdayHours"},"type":"array"},{"type":"null"}],"title":"Opening Hours","description":"Regular opening hours, one entry per weekday; a change replaces the whole list."},"special_hours":{"anyOf":[{"items":{"$ref":"#/components/schemas/SpecialDay"},"type":"array"},{"type":"null"}],"title":"Special Hours","description":"Opening hours or closures on given days (a holiday); a change replaces the whole list."},"click_collect_enabled":{"type":"boolean","title":"Click Collect Enabled","description":"Click and collect is on at this shop's tills: they show the click and collect button, and the shop is a pickup branch. The guest app's click and collect till is set in the shop's online-ordering config.","default":false},"click_collect_editable":{"type":"boolean","title":"Click Collect Editable","description":"The shop's tills may change a click and collect order after it was taken: its products (add, remove, quantity, line note) and its data (customer, phone, pickup time, comment), in every open status, ready for pickup included. Off: an order can only be created, cancelled, moved on and collected, and the weight of a weighed line still corrected. On by default.","default":true},"active_currency_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Currency Ids","description":"The foreign currencies the shop's tills accept (currency definition ids): at most one per ISO code, never the shop's own currency; `null` = none."},"gruber_dispensers":{"anyOf":[{"items":{"$ref":"#/components/schemas/GruberDispenser-Input"},"type":"array","maxItems":10},{"type":"null"}],"title":"Gruber Dispensers","description":"The shop's beverage dispensing controllers, each wired to a till of this shop; added once the shop has its tills. A change replaces the whole list."},"active_discount_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Discount Ids","description":"The discounts (`disc_\u2026`) the shop's tills offer; `null` = every discount of the workspace."},"time_tracking_enabled":{"type":"boolean","title":"Time Tracking Enabled","description":"Whether staff clock in and out on this shop's tills.","default":true},"require_clock_in":{"type":"boolean","title":"Require Clock In","description":"`true`: a cashier signs in on a till only after clocking in.","default":false},"require_clock_out":{"type":"boolean","title":"Require Clock Out","description":"`true`: a cashier signs out only after clocking out.","default":false},"require_login_to_sell":{"type":"boolean","title":"Require Login To Sell","description":"`true`: a till sells only while a cashier is signed in.","default":false},"age_verification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Age Verification Enabled","description":"Whether the shop's attended tills ask the customer's age before adding an article with a minimum age: `false` = never ask; `null` = ask. The self-checkout staff check and online orders are not affected."},"voice_language":{"anyOf":[{"type":"string","enum":["de-CH","en-US","fr-CH","it-CH"]},{"type":"null"}],"title":"Voice Language","description":"The language staff dictate orders in on this shop's tills (voice ordering): `null` = each till's own language, else the company's default."},"clock_radius_m":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":25.0},{"type":"null"}],"title":"Clock Radius M","description":"Clocking in from the phone app: the radius in metres (25 to 5000) around `lat` and `lng` the phone must be within; `null` = no check."},"topup_customer_product_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topup Customer Product Ids","description":"Up to 5 articles the tills offer to top up a customer card."},"topup_employee_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Topup Employee Product Id","description":"The article the tills top up an employee card with."},"change_to_card_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Change To Card Product Id","description":"The top-up article a cash payment's change is loaded onto a card with; `null` = the tills do not offer it."},"points_topup_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Points Topup Product Id","description":"The article (function `loyalty_points_topup`) whose buttons the shop's tills offer to convert a card's points into balance. `null`: the shop offers no conversion."},"floors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopFloor"},"type":"array","maxItems":20},{"type":"null"}],"title":"Floors","description":"The shop's floors, which its rooms are grouped by. A change replaces the whole list and may not drop a floor that still has rooms."},"table_attention_minutes":{"anyOf":[{"type":"integer","maximum":240.0,"minimum":0.0},{"type":"null"}],"title":"Table Attention Minutes","description":"Tables: the minutes without a booking after which the till marks an occupied table, 0 to 240 (0 = never); `null` = 20."},"fibu":{"anyOf":[{"$ref":"#/components/schemas/ShopFibuAccounts"},{"type":"null"}],"description":"The shop's ledger accounts for the closing exports to accounting."},"standard_customers":{"anyOf":[{"items":{"$ref":"#/components/schemas/StandardCustomerAssignment"},"type":"array"},{"type":"null"}],"title":"Standard Customers","description":"The customer each standard-customer position bills on this shop's tills; a change replaces the whole list."},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"The company name this shop's receipts print."},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"The VAT number this shop's receipts print."},"tax_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Number","description":"The shop's tax number, for the fiscal export."},"receipt_addition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Addition","description":"The line under the company name on the receipt."},"receipt_optional1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Optional1","description":"A free line under the address on the receipt."},"receipt_optional2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Optional2","description":"A second free line under the address."},"receipt_advertising_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Advertising Text","description":"The promotional line at the foot of the receipt."},"receipt_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Header","description":"Not printed; kept from earlier versions. The branch's lines on the receipt are `legal_name`, `receipt_addition` and `receipt_optional1`/`receipt_optional2`."},"receipt_footer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Footer","description":"Not printed; kept from earlier versions. The branch's line at the foot of the receipt is `receipt_advertising_text`."},"receipt_logo_media_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Logo Media Hash","description":"The logo this shop's receipts print: the hash the logo upload answered, sent with `receipt_logo_media_url`."},"receipt_logo_media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Logo Media Url","description":"The address of that logo, as the upload answered it."},"kiosk":{"anyOf":[{"$ref":"#/components/schemas/KioskConfig"},{"type":"null"}],"description":"The shop's own answers to the company's self-checkout settings; `null` = the company's. A change replaces the whole block."},"pickup_board":{"anyOf":[{"$ref":"#/components/schemas/PickupBoardAppearance"},{"type":"null"}],"description":"The shop's own Pick-up Display look, over the company's; `null` = the company's. A change replaces the whole block."},"name":{"type":"string","minLength":1,"title":"Name","description":"The shop's name as staff, receipts and reports show it."},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the tills and from configuration, kept for its history.","default":"active"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ShopCreate","description":"A shop: one branch of the business, with its address, opening hours and the\nregion it belongs to."},"ShopFibuAccounts":{"properties":{"clearing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clearing","description":"The clearing account, the counter-account of most closing rows."},"revenue_normal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Normal","description":"Revenue at the standard VAT rate, for categories without an account of their own."},"revenue_reduced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Reduced","description":"Revenue at the reduced VAT rate, for categories without an account of their own."},"revenue_zero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Zero","description":"Revenue at 0 % VAT, for categories without an account of their own."},"revenue_special":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Special","description":"Revenue at the special VAT rate, for categories without an account of their own."},"revenue_exempt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Exempt","description":"VAT-exempt revenue (a supply to a delivery platform), never the 0 % account."},"cash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash","description":"The cash account."},"cash_over":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Over","description":"Cash over at the count."},"cash_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Short","description":"Cash short at the count."},"cash_transfer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Transfer","description":"Cash taken out of the till during the day."},"loyalty_spent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Spent","description":"Payments from a customer card's balance."},"loyalty_load":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Load","description":"Money loaded onto customer cards."},"loyalty_discount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Discount","description":"Discounts given on customer cards."},"tips":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tips","description":"Tips."},"foreign_cash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Foreign Cash","description":"Foreign cash, in the home currency."},"division":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Division","description":"The company number in the accounting system."},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center","description":"The cost centre the shop's rows carry."},"vat_turnover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Turnover","description":"The VAT account of the turnover rows."},"vat_code_normal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code Normal","description":"The VAT code of the standard rate."},"vat_code_reduced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code Reduced","description":"The VAT code of the reduced rate."},"vat_code_zero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code Zero","description":"The VAT code of the 0 % rate."},"vat_code_special":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code Special","description":"The VAT code of the special rate."},"vat_code_exempt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Code Exempt","description":"The VAT code of exempt turnover."},"payment_methods":{"additionalProperties":{"type":"string"},"type":"object","title":"Payment Methods","description":"This shop's own account per payment method id, where the shop books a tender differently from the payment method's account."}},"additionalProperties":false,"type":"object","title":"ShopFibuAccounts","description":"The shop's ledger accounts for exporting its daily closings to accounting (DATEV, Abacus). All optional, but an export refuses a row whose amount has no account and names the missing setting; it never books to a default. `clearing` is the clearing account, the counter account of nearly every row. The revenue accounts per VAT rate apply to the categories without their own (`revenue_accounts` on a category)."},"ShopFloor":{"properties":{"id":{"type":"string","pattern":"^fl_[A-Za-z0-9_-]{1,32}$","title":"Id","description":"The floor's id, `fl_` and up to 32 letters, digits, `_` or `-`, unique in the shop; rooms name it in `floor_id`."},"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"sort":{"type":"integer","title":"Sort","description":"The floor's place in the list, lowest first.","default":0}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"ShopFloor","description":"One floor of a shop: a name and a place in the order, for grouping its rooms. A room names its floor in `floor_id`."},"ShopPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ShopRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"ShopPage"},"ShopRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"region_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Region Id","description":"The region (`reg_\u2026`) the shop belongs to; it gives the shop its country and currency when the shop sets none."},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"The branch's full name when `name` is a short code staff use (`TS`)."},"data_role":{"type":"string","enum":["production","test","labeling"],"title":"Data Role","description":"What this branch's numbers mean: `production` = real trade, counted in every total; `test` = a running branch whose figures stay out of every turnover total; `labeling` = a labelling site that prints labels and sells nothing. `test` and `labeling` also exclude every till of the branch.","default":"production"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"The address on one line, for older readers; prefer `street`, `postal_code` and `city`."},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and number."},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Town or city."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country as ISO 3166-1 alpha-2 (`CH`); a name is read too. Left out on a create: the region's country, then the company's."},"canton":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canton","description":"Canton, state or region code (`ZH`); public and school holidays follow it."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number as the receipts print it."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address of the shop."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA time zone (`Europe/Zurich`) the shop's tills keep; `null` = the company's."},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat","description":"Latitude of the shop, -90 to 90."},"lng":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lng","description":"Longitude of the shop, -180 to 180."},"geo_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geo Source","description":"Where `lat` and `lng` came from: `map_url` = the shop's own map pin, `geocoded_city` = the town's centre; empty for coordinates entered by hand."},"google_place_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Place Id","description":"The shop's Google Place ID, for its business listing."},"opening_hours":{"anyOf":[{"items":{"$ref":"#/components/schemas/WeekdayHours"},"type":"array"},{"type":"null"}],"title":"Opening Hours","description":"Regular opening hours, one entry per weekday; a change replaces the whole list."},"special_hours":{"anyOf":[{"items":{"$ref":"#/components/schemas/SpecialDay"},"type":"array"},{"type":"null"}],"title":"Special Hours","description":"Opening hours or closures on given days (a holiday); a change replaces the whole list."},"click_collect_enabled":{"type":"boolean","title":"Click Collect Enabled","description":"Click and collect is on at this shop's tills: they show the click and collect button, and the shop is a pickup branch. The guest app's click and collect till is set in the shop's online-ordering config.","default":false},"click_collect_editable":{"type":"boolean","title":"Click Collect Editable","description":"The shop's tills may change a click and collect order after it was taken: its products (add, remove, quantity, line note) and its data (customer, phone, pickup time, comment), in every open status, ready for pickup included. Off: an order can only be created, cancelled, moved on and collected, and the weight of a weighed line still corrected. On by default.","default":true},"active_currency_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Currency Ids","description":"The foreign currencies the shop's tills accept (currency definition ids): at most one per ISO code, never the shop's own currency; `null` = none."},"gruber_dispensers":{"anyOf":[{"items":{"$ref":"#/components/schemas/GruberDispenser-Output"},"type":"array","maxItems":10},{"type":"null"}],"title":"Gruber Dispensers","description":"The shop's beverage dispensing controllers, each wired to a till of this shop; added once the shop has its tills. A change replaces the whole list."},"active_discount_ids":{"anyOf":[{"items":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},"type":"array"},{"type":"null"}],"title":"Active Discount Ids","description":"The discounts (`disc_\u2026`) the shop's tills offer; `null` = every discount of the workspace."},"time_tracking_enabled":{"type":"boolean","title":"Time Tracking Enabled","description":"Whether staff clock in and out on this shop's tills.","default":true},"require_clock_in":{"type":"boolean","title":"Require Clock In","description":"`true`: a cashier signs in on a till only after clocking in.","default":false},"require_clock_out":{"type":"boolean","title":"Require Clock Out","description":"`true`: a cashier signs out only after clocking out.","default":false},"require_login_to_sell":{"type":"boolean","title":"Require Login To Sell","description":"`true`: a till sells only while a cashier is signed in.","default":false},"age_verification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Age Verification Enabled","description":"Whether the shop's attended tills ask the customer's age before adding an article with a minimum age: `false` = never ask; `null` = ask. The self-checkout staff check and online orders are not affected."},"voice_language":{"anyOf":[{"type":"string","enum":["de-CH","en-US","fr-CH","it-CH"]},{"type":"null"}],"title":"Voice Language","description":"The language staff dictate orders in on this shop's tills (voice ordering): `null` = each till's own language, else the company's default."},"clock_radius_m":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":25.0},{"type":"null"}],"title":"Clock Radius M","description":"Clocking in from the phone app: the radius in metres (25 to 5000) around `lat` and `lng` the phone must be within; `null` = no check."},"topup_customer_product_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topup Customer Product Ids","description":"Up to 5 articles the tills offer to top up a customer card."},"topup_employee_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Topup Employee Product Id","description":"The article the tills top up an employee card with."},"change_to_card_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Change To Card Product Id","description":"The top-up article a cash payment's change is loaded onto a card with; `null` = the tills do not offer it."},"points_topup_product_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Points Topup Product Id","description":"The article (function `loyalty_points_topup`) whose buttons the shop's tills offer to convert a card's points into balance. `null`: the shop offers no conversion."},"floors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopFloor"},"type":"array","maxItems":20},{"type":"null"}],"title":"Floors","description":"The shop's floors, which its rooms are grouped by. A change replaces the whole list and may not drop a floor that still has rooms."},"table_attention_minutes":{"anyOf":[{"type":"integer","maximum":240.0,"minimum":0.0},{"type":"null"}],"title":"Table Attention Minutes","description":"Tables: the minutes without a booking after which the till marks an occupied table, 0 to 240 (0 = never); `null` = 20."},"fibu":{"anyOf":[{"$ref":"#/components/schemas/ShopFibuAccounts"},{"type":"null"}],"description":"The shop's ledger accounts for the closing exports to accounting."},"standard_customers":{"anyOf":[{"items":{"$ref":"#/components/schemas/StandardCustomerAssignment"},"type":"array"},{"type":"null"}],"title":"Standard Customers","description":"The customer each standard-customer position bills on this shop's tills; a change replaces the whole list."},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"The company name this shop's receipts print."},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"The VAT number this shop's receipts print."},"tax_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Number","description":"The shop's tax number, for the fiscal export."},"receipt_addition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Addition","description":"The line under the company name on the receipt."},"receipt_optional1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Optional1","description":"A free line under the address on the receipt."},"receipt_optional2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Optional2","description":"A second free line under the address."},"receipt_advertising_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Advertising Text","description":"The promotional line at the foot of the receipt."},"receipt_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Header","description":"Not printed; kept from earlier versions. The branch's lines on the receipt are `legal_name`, `receipt_addition` and `receipt_optional1`/`receipt_optional2`."},"receipt_footer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Footer","description":"Not printed; kept from earlier versions. The branch's line at the foot of the receipt is `receipt_advertising_text`."},"receipt_logo_media_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Logo Media Hash","description":"The logo this shop's receipts print: the hash the logo upload answered, sent with `receipt_logo_media_url`."},"receipt_logo_media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Logo Media Url","description":"The address of that logo, as the upload answered it."},"kiosk":{"anyOf":[{"$ref":"#/components/schemas/KioskConfig"},{"type":"null"}],"description":"The shop's own answers to the company's self-checkout settings; `null` = the company's. A change replaces the whole block."},"pickup_board":{"anyOf":[{"$ref":"#/components/schemas/PickupBoardAppearance"},{"type":"null"}],"description":"The shop's own Pick-up Display look, over the company's; `null` = the company's. A change replaces the whole block."},"name":{"type":"string","minLength":1,"title":"Name","description":"The shop's name as staff, receipts and reports show it."},"status":{"type":"string","enum":["active","inactive"],"title":"Status","description":"`active` = in use; `inactive` = retired, hidden from the tills and from configuration, kept for its history.","default":"active"}},"type":"object","required":["_id","name"],"title":"ShopRecord"},"SmartScaleMaster":{"properties":{"interval_minus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Minus G"},"interval_plus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Plus G"},"percent_minus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Minus"},"percent_plus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Plus"},"weighing_limit_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weighing Limit G"},"packing_unit_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Packing Unit G"},"confirm_above_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Confirm Above G"},"lot_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lot Required"}},"additionalProperties":true,"type":"object","title":"SmartScaleMaster","description":"Scale settings of a raw material or of a recipe used as an ingredient: the weighing tolerances, the largest weight the scale takes, and the pack size taken whole rather than weighed. The lines that use it inherit them."},"SpecialDay":{"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date","title":"Date","description":"The day, `YYYY-MM-DD`."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"What the day is, such as the name of a holiday."},"closed":{"type":"boolean","title":"Closed","description":"`true`: closed all day; wins over the windows.","default":false},"windows":{"items":{"$ref":"#/components/schemas/TimeWindow"},"type":"array","title":"Windows","description":"The open periods of the day; empty with `closed` false = no hours given."}},"additionalProperties":false,"type":"object","required":["date"],"title":"SpecialDay","description":"Opening hours that differ on one date: closed on a holiday, or shorter hours on Christmas Eve."},"SpecialPriceType":{"type":"string","enum":["price","discount","price_and_discount","price_if_qty","discount_if_qty","price_and_discount_if_qty"],"title":"SpecialPriceType","description":"What a special price of the customer overrides: the `price`, the `discount` or both (`price_and_discount`), each optionally only from a quantity on (`price_if_qty`, `discount_if_qty`, `price_and_discount_if_qty`, from `from_qty`)."},"StandardCustomerAssignment":{"properties":{"slot":{"type":"integer","title":"Slot","description":"The standard-customer position, by its number in the company's list."},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"The customer this shop's tills bill for the position; `null` = left empty here."}},"additionalProperties":false,"type":"object","required":["slot"],"title":"StandardCustomerAssignment","description":"The customer the tills of this shop bill for one standard-customer position: `slot` names the position, from the workspace's list of standard customers, and `customer_id` the customer (empty: none in this shop). Order types name the position in `credit_client_id`. Per shop, not per till: every till of a shop bills the same customer."},"StockMovementCreate":{"properties":{"client_uuid":{"type":"string","minLength":1,"title":"Client Uuid","description":"Your own key of this movement: a movement already booked under it is not booked again, so a retry is safe."},"shop_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Shop Id","description":"The shop (`shp_\u2026`) whose stock moves."},"product_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Product Id","description":"The article (`prd_\u2026`) whose stock moves."},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id","description":"The article's variant; null = the article itself."},"type":{"type":"string","enum":["receive","adjust","count","sale","return","waste","transfer"],"title":"Type","description":"What moved the stock: `receive` (a delivery), `adjust` (a correction), `count` (a stocktake), `sale`, `return`, `waste` or `transfer`.","default":"adjust"},"qty_delta":{"type":"number","title":"Qty Delta","description":"The change, signed: negative takes stock out.","default":0},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why, in a word or two."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A free note."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"When it happened, ISO 8601 (`2026-10-26T08:00:00+01:00`); null = now."},"counted_qty":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Counted Qty","description":"For `type: count`: the quantity counted; the movement books the difference to the stock on hand. Not with `qty_delta`."}},"additionalProperties":false,"type":"object","required":["client_uuid","shop_id","product_id"],"title":"StockMovementCreate","description":"One stock movement. `qty_delta` is signed (negative takes stock out), and `client_uuid` makes a retry safe: a movement already booked under it is not booked again. For a stocktake, send `counted_qty`, the quantity counted: the movement books the difference to the stock on hand at that moment. `type: count` with the difference in `qty_delta` books it as a plain change."},"StorageCalc":{"properties":{"type":{"anyOf":[{"type":"string","enum":["subtract","convert","component"]},{"type":"null"}],"title":"Type","description":"`subtract` = selling it draws down the linked articles' stock; `convert` = its stock is counted on one base article; `component` = it is a component of others. null = the article moves its own stock."},"connections":{"items":{"$ref":"#/components/schemas/StorageConnection"},"type":"array","title":"Connections","description":"The linked articles and their factors."}},"additionalProperties":false,"type":"object","title":"StorageCalc","description":"How selling the article changes stock. `type` is the mode: `subtract` takes the linked articles out of stock, each times its `factor`, as a recipe would; `convert` counts the movement against one base article, times its factor; `component` makes the article a component of others. `connections` are the links. An empty `type` leaves the links unused, and the article moves its own stock. Optional."},"StorageConnection":{"properties":{"sub_product_id":{"type":"string","title":"Sub Product Id","description":"The linked article (id) whose stock moves."},"factor":{"type":"number","title":"Factor","description":"Scales the linked article's stock movement: 0.25 = a quarter.","default":1.0},"order":{"type":"integer","title":"Order","description":"Position in the `subtract` chain.","default":0},"type":{"anyOf":[{"type":"string","enum":["subtract","convert","component"]},{"type":"null"}],"title":"Type","description":"The mode this link belongs to; only the links of the article's active `storage_calc.type` count. null = belongs to whichever mode is active."}},"additionalProperties":false,"type":"object","required":["sub_product_id"],"title":"StorageConnection","description":"One link to another article for the stock calculation: `factor` scales its stock change (0.25 is a quarter portion), `order` sets the sequence for `subtract`, and `type` the mode the link belongs to. Only links of the article's active mode count; an empty `type` belongs to whichever mode is active."},"SupplierAddress":{"properties":{"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street and number."},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip","description":"Postal code."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City."},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 code, two capitals (`CH`, `DE`).","examples":["CH"]}},"additionalProperties":false,"type":"object","title":"SupplierAddress","description":"A supplier's postal address."},"SupplierCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The supplier's display name, a person or a company; not blank."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company name, when it differs from `name`."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address, as typed; not checked."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number, as typed."},"address":{"anyOf":[{"$ref":"#/components/schemas/SupplierAddress"},{"type":"null"}],"description":"The postal address."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or company number (UID)."},"supplier_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Number","description":"The supplier's number in your own or a previous system (not the id)."},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"The creditor account in your accounting."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"A free note."},"active":{"type":"boolean","title":"Active","description":"false keeps the supplier on record but out of the pickers.","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"SupplierCreate","description":"A supplier: who the workspace buys from."},"SupplierPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SupplierRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"SupplierPage"},"SupplierRecord":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The supplier's display name, a person or a company; not blank."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company name, when it differs from `name`."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address, as typed; not checked."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number, as typed."},"address":{"anyOf":[{"$ref":"#/components/schemas/SupplierAddress"},{"type":"null"}],"description":"The postal address."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or company number (UID)."},"supplier_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Number","description":"The supplier's number in your own or a previous system (not the id)."},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"The creditor account in your accounting."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"A free note."},"active":{"type":"boolean","title":"Active","description":"false keeps the supplier on record but out of the pickers.","default":true},"_id":{"type":"string","title":"Id","description":"Record id."}},"type":"object","required":["name","_id"],"title":"SupplierRecord"},"SupplierUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"The supplier's display name, a person or a company; not blank."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The company name, when it differs from `name`."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail address, as typed; not checked."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number, as typed."},"address":{"anyOf":[{"$ref":"#/components/schemas/SupplierAddress"},{"type":"null"}],"description":"The postal address. Sent, it merges key by key into the stored one; null clears it."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"VAT or company number (UID)."},"supplier_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Number","description":"The supplier's number in your own or a previous system (not the id)."},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"The creditor account in your accounting."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"A free note."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"false keeps the supplier on record but out of the pickers."}},"additionalProperties":false,"type":"object","title":"SupplierUpdate","description":"A change to a supplier: only the fields sent change."},"TablePage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TableRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"TablePage"},"TableRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"shop_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Shop Id","description":"The shop (`shp_\u2026`) the table belongs to."},"label":{"type":"string","title":"Label","description":"What the waiter sees, such as `1` or `Terrasse 3`."},"seats":{"type":"integer","minimum":0.0,"title":"Seats","description":"How many seats the table has.","default":4},"room_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$","title":"Room Id","description":"The room (`room_\u2026`) the table stands in; a table is always in a room."},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone","description":"A free grouping word from before rooms existed; `room_id` replaces it."},"shape":{"anyOf":[{"type":"string","enum":["round","square","rect"]},{"type":"null"}],"title":"Shape","description":"How the designer draws the table: `round`, `square` or `rect`."},"x":{"anyOf":[{"type":"number","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"X","description":"Distance from the room's left edge, cm; with `y`, `w`, `h` or not at all."},"y":{"anyOf":[{"type":"number","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Y","description":"Distance from the room's top edge, cm; with `x`, `w`, `h` or not at all."},"w":{"anyOf":[{"type":"number","maximum":10000.0,"minimum":20.0},{"type":"null"}],"title":"W","description":"The table's width, cm, from 20; with `x`, `y`, `h` or not at all."},"h":{"anyOf":[{"type":"number","maximum":10000.0,"minimum":20.0},{"type":"null"}],"title":"H","description":"The table's depth, cm, from 20; with `x`, `y`, `w` or not at all."},"rotation_deg":{"anyOf":[{"type":"number","multipleOf":1.0,"maximum":359.0,"minimum":0.0},{"type":"null"}],"title":"Rotation Deg","description":"Rotation in whole degrees, 0 to 359."},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Color","description":"The table's tint, `#rrggbb`; `null` = the default."},"min_party":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Min Party","description":"The smallest party the table is given to, 1 to 200; `null` = 1."},"max_party":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Max Party","description":"The largest party the table is given to, 1 to 200; `null` = its seats."},"combinable":{"type":"boolean","title":"Combinable","description":"`true`: the table may be pushed together with others for a larger party.","default":false},"online_bookable":{"type":"boolean","title":"Online Bookable","description":"`false`: guests cannot book the table online.","default":true}},"type":"object","required":["_id","shop_id","label","room_id"],"title":"TableRecord"},"TareOption":{"properties":{"label":{"additionalProperties":{"type":"string"},"type":"object","title":"Label","description":"The container's name.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"weight_g":{"type":"integer","title":"Weight G","description":"The container's weight in grams.","default":0}},"additionalProperties":false,"type":"object","title":"TareOption","description":"One tare weight for a weighed article, in grams: the container weight taken off the scale reading."},"TaxCreate":{"properties":{"name":{"additionalProperties":{"type":"string"},"type":"object","title":"Name","description":"Name of the rate as receipts and reports print it, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"rate_bps":{"type":"integer","title":"Rate Bps","description":"The rate in force today, in basis points (810 = 8.1 %, 260 = 2.6 %). With an empty `rates` schedule it applies at all times; with a schedule it is the fallback for a day no entry covers.","examples":[810]},"inclusive":{"type":"boolean","title":"Inclusive","description":"`true`: catalog prices already contain this VAT (gross prices, the usual retail case). `false`: the till adds the VAT on top of the price.","default":true},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 code of the country whose VAT this is (`CH`, `DE`, `AT`); `null` = applies in every country.","examples":["CH"]},"region_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Region Id","description":"Region (`reg_\u2026`) this rate belongs to; `null` = the whole workspace."},"revenue_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Code","description":"Code of this rate in your accounting system, free text; `null` when there is none."},"code":{"anyOf":[{"type":"string","enum":["normal","reduced","special","zero","exempt"]},{"type":"null"}],"title":"Code","description":"The kind of rate: `normal` (standard rate), `reduced`, `special` (the Swiss accommodation rate), `zero` (taxed at 0 %) or `exempt` (VAT-exempt turnover, always 0 % and reported apart from the 0 %-rated figures). `null` on a rate created without a kind.","examples":["normal"]},"rates":{"items":{"$ref":"#/components/schemas/TaxRateEntry"},"type":"array","title":"Rates","description":"Rate schedule with effective dates. Empty = `rate_bps` applies at all times. A future `valid_from` schedules a rate change ahead of its start."}},"additionalProperties":false,"type":"object","required":["name","rate_bps"],"title":"TaxCreate","description":"A VAT rate the workspace bills at: its kind, its percentage and whether the\ncatalog prices already contain it.","examples":[{"code":"normal","country":"CH","inclusive":true,"name":{"de":"MwSt normal","en":"VAT standard"},"rate_bps":810,"rates":[{"rate_bps":770},{"rate_bps":810,"valid_from":"2024-01-01"}]}]},"TaxRateEntry":{"properties":{"rate_bps":{"type":"integer","title":"Rate Bps","description":"The rate in basis points: 810 = 8.1 %, 260 = 2.6 %, 0 = no VAT.","examples":[810]},"valid_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","format":"date"},{"type":"null"}],"title":"Valid From","description":"First day this rate applies, a calendar date `YYYY-MM-DD`; `null` = from the beginning. On any given day the entry with the latest `valid_from` on or before that day is in force.","examples":["2024-01-01"]}},"additionalProperties":false,"type":"object","required":["rate_bps"],"title":"TaxRateEntry","description":"One step of a VAT rate's schedule: the rate from `valid_from` on (an ISO date; empty means from the beginning). The rate at a moment is the entry with the latest `valid_from` not after it."},"TaxSystem":{"type":"string","enum":["included_vat","excluded_vat","no_vat","individual_for_customer"],"title":"TaxSystem","description":"How VAT appears on the customer's documents: `included_vat` (prices include VAT), `excluded_vat` (net prices, VAT added on top), `no_vat` (no VAT, for example for export: every line at 0 %) or `individual_for_customer` (an individual arrangement, handled like `excluded_vat`)."},"TaxUpdate":{"properties":{"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},{"type":"null"}],"title":"Name","description":"Name of the rate as receipts and reports print it, per language."},"rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Bps","description":"The rate in force today, in basis points (810 = 8.1 %, 260 = 2.6 %). With an empty `rates` schedule it applies at all times; with a schedule it is the fallback for a day no entry covers.","examples":[810]},"inclusive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Inclusive","description":"`true`: catalog prices already contain this VAT (gross prices, the usual retail case). `false`: the till adds the VAT on top of the price."},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 code of the country whose VAT this is (`CH`, `DE`, `AT`); `null` = applies in every country.","examples":["CH"]},"region_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^\\S+$"},{"type":"null"}],"title":"Region Id","description":"Region (`reg_\u2026`) this rate belongs to; `null` = the whole workspace."},"revenue_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Code","description":"Code of this rate in your accounting system, free text; `null` when there is none."},"code":{"anyOf":[{"type":"string","enum":["normal","reduced","special","zero","exempt"]},{"type":"null"}],"title":"Code","description":"The kind of rate: `normal` (standard rate), `reduced`, `special` (the Swiss accommodation rate), `zero` (taxed at 0 %) or `exempt` (VAT-exempt turnover, always 0 % and reported apart from the 0 %-rated figures). `null` on a rate created without a kind.","examples":["normal"]},"rates":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxRateEntry"},"type":"array"},{"type":"null"}],"title":"Rates","description":"Rate schedule with effective dates. Empty = `rate_bps` applies at all times. A future `valid_from` schedules a rate change ahead of its start."}},"additionalProperties":false,"type":"object","title":"TaxUpdate","description":"Fields of a VAT rate that may change; only the fields sent are changed."},"TimeWindow":{"properties":{"open":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","title":"Open","description":"Opens, `HH:MM` on the shop's clock."},"close":{"type":"string","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$","title":"Close","description":"Closes, `HH:MM` on the shop's clock; `24:00` = at midnight."}},"additionalProperties":false,"type":"object","required":["open","close"],"title":"TimeWindow","description":"An open period within a day, \"HH:MM\"\u2013\"HH:MM\". Multiple windows on one day\nmodel a split shift / lunch break (09:00\u201312:00 + 14:00\u201318:00). Maps 1:1 to a\nGoogle Business Profile `period`."},"Topup":{"properties":{"bonus_percent":{"type":"number","title":"Bonus Percent","description":"Bonus credited on a top-up, percent; `bonus_tiers` supersede it.","default":0.0},"surcharge_from":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Surcharge From","description":"The paid amount the bonus applies from, in minor units."},"preset_amounts":{"items":{"type":"integer"},"type":"array","title":"Preset Amounts","description":"Quick-pick top-up amounts in minor units, offered as buttons; empty = typed in."},"bonus_tiers":{"items":{"$ref":"#/components/schemas/TopupBonusTier"},"type":"array","title":"Bonus Tiers","description":"Bonus by paid amount; the highest tier whose `from_amount` the payment reaches applies."}},"additionalProperties":false,"type":"object","title":"Topup","description":"The settings of a value-card top-up article (`function` `loyalty_topup`): `preset_amounts` are the amounts the till offers with one tap, and `bonus_tiers` the bonus credited on top. A shop chooses its top-up articles."},"TopupBonusTier":{"properties":{"from_amount":{"type":"integer","title":"From Amount","description":"The paid amount this tier applies from, in minor units.","default":0},"bonus_percent":{"type":"number","title":"Bonus Percent","description":"Bonus credited, percent of the amount.","default":0.0},"bonus_amount":{"type":"integer","title":"Bonus Amount","description":"A flat bonus credited, in minor units; added to `bonus_percent` when both are set.","default":0}},"additionalProperties":false,"type":"object","title":"TopupBonusTier","description":"One bonus step of a top-up: from `from_amount` (minor units) on, the card gets `bonus_percent` percent of the paid amount, `bonus_amount` (minor units), or both, on top. The highest step the paid amount reaches applies."},"TransactionPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TransactionRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Offset mode (`?offset=`): the next window's offset, null on the last page."}},"type":"object","required":["data","total","has_more"],"title":"TransactionPage"},"TransactionRecord":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid","description":"Id the till gave the receipt. A reversal names its original by this value in `references`; the push is idempotent on it.","examples":["5f2c8b1e-6d2a-4b7e-9c1f-3a8d2e7b4c10"]},"pos_id":{"type":"string","title":"Pos Id","description":"The till (`pos_\u2026`) that booked the receipt."},"seq":{"type":"integer","title":"Seq","description":"Receipt number, counted per till: unique on one till, not across the workspace.","examples":[1042]},"closure_client_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closure Client Uuid","description":"The daily closing the till had already sealed this receipt into when it pushed it late; `null` on an ordinary sale."},"type":{"type":"string","enum":["sale","void","refund"],"title":"Type","description":"`sale` = a sale; `refund` = reverses a sale, money goes back; `void` = cancels a sale. Both reversals name the original in `references`.","default":"sale"},"references":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"References","description":"On a `refund` or `void`: the `client_uuid` of the receipt it reverses, not its `_id`; `null` on a sale."},"references_day":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"References Day","description":"Business day `YYYY-MM-DD` of the reversed receipt, sent by the back office so an old original is found at once; `null` otherwise.","examples":["2026-10-20"]},"origin":{"type":"string","enum":["pos","admin","system"],"title":"Origin","description":"Where a reversal was started: `pos` = on the till (the default), `admin` = in the back office, `system` = by the server, for a cancelled prepaid order.","default":"pos"},"reversal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reversal Reason","description":"Why the receipt was cancelled; required on a back-office cancellation, `null` otherwise."},"total":{"type":"integer","title":"Total","description":"What the receipt billed after all discounts, in minor units (cents or Rappen: 1250 = 12.50). Negative when money left the till for returned goods. A reversal stores the positive amount; `type` gives its direction.","default":0,"examples":[1250]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code the receipt was settled in (`CHF`, `EUR`); `null` on a receipt from an older till.","examples":["EUR"]},"discount_total":{"type":"integer","title":"Discount Total","description":"Total discount given on the receipt, gross, in minor units.","default":0,"examples":[70]},"receipt_discount":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Receipt Discount","description":"The whole-receipt discount, when there is one: `{\"definition_id\": \"disc_\u2026\"}` for a configured discount, `{}` for an ad-hoc one. Its amount is already in the line amounts."},"discounts":{"items":{"$ref":"#/components/schemas/TxDiscount"},"type":"array","title":"Discounts","description":"Discounts given, totalled by reason, line and receipt discounts together."},"cashier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashier","description":"Name of the cashier who sold, as reports and closings group it."},"served_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Served By","description":"Name printed on the receipt under \"you were served by\", frozen at settle; `null` on older receipts (then `cashier`)."},"operator_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Id","description":"Numeric staff id of the cashier; stable where the name may change."},"closed_by_manager_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Closed By Manager Id","description":"Numeric staff id of the manager who settled this waiter's table bill for them; `null` when the cashier settled it."},"lines":{"items":{"$ref":"#/components/schemas/TxLine"},"type":"array","title":"Lines","description":"What was sold, one line per article; a menu is a head line plus its components."},"reference_lines":{"items":{"$ref":"#/components/schemas/TxLine"},"type":"array","title":"Reference Lines","description":"Lines shown for information only, such as what a prepaid order contains; not billed and not in `total`."},"voided_lines":{"items":{"$ref":"#/components/schemas/TxVoidedLine"},"type":"array","title":"Voided Lines","description":"Lines removed before the receipt was settled; not billed."},"payments":{"items":{"$ref":"#/components/schemas/TxPayment"},"type":"array","title":"Payments","description":"How the receipt was paid; the amounts add up to `total`."},"fulfillment_type":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"],"title":"Fulfillment Type","description":"`takeaway` (the default), `dine_in` = on the premises, at the in-house VAT rate, `pickup` = a Click & Collect order, `delivery` = a home delivery.","default":"takeaway"},"open_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Seconds","description":"Seconds from the first line to settle; `null` when the order was not started on this till."},"channel":{"anyOf":[{"$ref":"#/components/schemas/OrderChannel"},{"type":"null"}],"description":"Where a delivery-platform order came from; `null` on every other sale."},"customer":{"anyOf":[{"$ref":"#/components/schemas/OrderCustomer"},{"type":"null"}],"description":"Who the order is for (a pickup customer, a seated guest); `null` on a plain sale."},"delivery_address":{"anyOf":[{"$ref":"#/components/schemas/TxDeliveryAddress"},{"type":"null"}],"description":"Where a home delivery went; set on a `delivery` sale only."},"on_account":{"type":"boolean","title":"On Account","description":"`true`: the whole bill was charged to a credit customer's account and nothing was collected; the receipt counts no turnover and no VAT, the back office invoices it.","default":false},"maison":{"type":"boolean","title":"Maison","description":"`true`: an on-the-house receipt: printed with its lines, nothing collected, no turnover.","default":false},"no_show":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Show","description":"`true`: a paid Click & Collect order the guest never collected, booked as its collect sale; `null` otherwise."},"gurado_topup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gurado Topup","description":"`true`: the receipt loads money onto gift vouchers (see `topup_provider`) and counts no turnover; `null` otherwise."},"points_conversion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Points Conversion","description":"`true`: the receipt converts loyalty points into card balance and is never reversed; `null` otherwise."},"topup_provider":{"anyOf":[{"type":"string","enum":["gurado","eguma"]},{"type":"null"}],"title":"Topup Provider","description":"Voucher system a top-up receipt loaded: `gurado` or `eguma`; `null` = not a top-up."},"rksv_beleg":{"anyOf":[{"$ref":"#/components/schemas/TxRksvBeleg"},{"type":"null"}],"description":"On an Austrian zero receipt: which special receipt it is (start, month, year, collective); `null` otherwise."},"order_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Ref","description":"Number of the order this receipt belongs to, as shown to the customer (Click & Collect, a deferred order); `null` on a plain sale.","examples":["1008"]},"click_collect":{"anyOf":[{"$ref":"#/components/schemas/TxClickCollect"},{"type":"null"}],"description":"The preorder a prepayment receipt was taken for; `null` otherwise."},"pager_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pager Number","description":"Pager number handed to the customer; `null` = none."},"pickup_number":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Pickup Number","description":"Pickup number drawn on a self-service kiosk; `null` = none.","examples":["042"]},"table":{"anyOf":[{"$ref":"#/components/schemas/TxTable"},{"type":"null"}],"description":"The table a dine-in receipt was served at, frozen at settle; `null` on a counter sale."},"promotions":{"items":{"$ref":"#/components/schemas/TxPromotion"},"type":"array","title":"Promotions","description":"Promotions applied, for attribution; their amounts are already in `discounts` and `total`."},"points_earned":{"type":"integer","title":"Points Earned","description":"Loyalty points the sale earned; 0 = none.","default":0},"loyalty_card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loyalty Card Id","description":"Loyalty card (`card_\u2026`) the points go to; `null` = none."},"loyalty":{"anyOf":[{"$ref":"#/components/schemas/TxLoyalty"},{"type":"null"}],"description":"What the sale did to the attached loyalty card; `null` = no card."},"tse":{"anyOf":[{"$ref":"#/components/schemas/TseSignature"},{"type":"null"}],"description":"The German fiscal signature (TSE) of the receipt; `null` on a till without a TSE."},"signature":{"anyOf":[{"$ref":"#/components/schemas/TxSignature"},{"type":"null"}],"description":"The customer's handwritten signature captured for a signing tender; `null` = none."},"staff_meal":{"anyOf":[{"$ref":"#/components/schemas/TxStaffMeal"},{"type":"null"}],"description":"The staff member who ate a staff meal (Personalessen); `null` = not a staff meal."},"_id":{"type":"string","title":"Id","description":"Record id."},"occurred_at":{"type":"string","title":"Occurred At","description":"Booking time: the shop's local time, written with its offset (`2026-10-22T16:41:16+02:00`) or, on an imported receipt, without one. The list's `from` and `to` compare against this value as text."},"version":{"type":"integer","title":"Version","description":"Grows by one with each change stored on the receipt; of two deliveries of one receipt, the higher `version` is the newer."},"updated_at":{"type":"string","title":"Updated At","description":"When the stored receipt last changed, in UTC, ISO 8601 (`2026-10-22T14:41:16.127000+00:00`). Not the booking time; that is `occurred_at`."}},"type":"object","required":["client_uuid","pos_id","seq","_id"],"title":"TransactionRecord"},"TseSignature":{"properties":{"process_type":{"type":"string","enum":["Kassenbeleg-V1","Bestellung-V1"],"title":"Process Type"},"transaction_number":{"type":"integer","title":"Transaction Number"},"signature_counter":{"type":"integer","title":"Signature Counter"},"signature":{"type":"string","title":"Signature"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"qr_code":{"type":"string","title":"Qr Code"},"tse_serial":{"type":"string","title":"Tse Serial"},"first_order_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Order Time"},"kassen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kassen Id"},"certificate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate"}},"type":"object","required":["process_type","transaction_number","signature_counter","signature","start_time","end_time","qr_code","tse_serial"],"title":"TseSignature","description":"The signature a German fiscal security device (TSE) returned for one receipt. The till fills it, and the server stores it as sent."},"TxCardFx":{"properties":{"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","description":"The card's currency (ISO 4217), e.g. `CHF`."},"rate_bps":{"type":"integer","exclusiveMinimum":0.0,"title":"Rate Bps","description":"The rate used: the till's currency per one unit of the card's currency, \u00d7 10 000 (1.0700 EUR per CHF \u2192 10700)."},"balance_loaded":{"type":"integer","minimum":0.0,"title":"Balance Loaded","description":"Loaded onto the card, in the card's currency (minor units), bonus included.","default":0},"balance_spent":{"type":"integer","minimum":0.0,"title":"Balance Spent","description":"Paid from the card, in the card's currency (minor units).","default":0}},"type":"object","required":["currency","rate_bps"],"title":"TxCardFx","description":"The card's side of a sale whose loyalty card is kept in ANOTHER currency than\nthe till sells in: a CHF card topped up or tendered on a EUR till.\n\nThe receipt-currency figures on `TxLoyalty` (`balance_loaded`, `balance_spent`)\nstay what the till booked, because the day close and the statistics sum them as\nthe till's own money. These are what the CARD moves by, in the card's currency,\nconverted on the till at `rate_bps` and frozen at settle, so the fold never\nconverts and a reprint shows the rate the customer was given. Absent when the\ncard and the till share a currency."},"TxClickCollect":{"properties":{"order_no":{"type":"string","title":"Order No","description":"Order number as shown to the customer.","default":""},"pickup_at":{"type":"string","title":"Pickup At","description":"Pickup date and time as `YYYY-MM-DDTHH:MM`, shop-local, no offset.","default":"","examples":["2026-10-24T11:30"]},"pickup_shop_name":{"type":"string","title":"Pickup Shop Name","description":"Name of the pickup shop.","default":""},"client_name":{"type":"string","title":"Client Name","description":"Who ordered.","default":""},"client_phone":{"type":"string","title":"Client Phone","description":"Their phone number.","default":""},"information":{"type":"string","title":"Information","description":"The customer's comment on the order.","default":""}},"type":"object","title":"TxClickCollect","description":"The Click & Collect preorder a prepayment sale was taken for, as it was at settle: order number, pickup date and time, pickup shop, who ordered and their phone, and the comment. Receipts print it from here, so a reprint shows the pickup as it was booked. `pickup_at` is the shop's local time, `YYYY-MM-DDTHH:MM`, without an offset."},"TxCouponUse":{"properties":{"coupon_id":{"type":"string","minLength":1,"title":"Coupon Id","description":"The coupon (`cpn_\u2026`) of the card account."},"kind":{"type":"string","enum":["item","amount"],"title":"Kind","description":"`item` = an article given away; `amount` = a fixed reduction.","default":"item"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"The coupon's text as the slip printed it."},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"The campaign it belongs to; `null` = none."},"value_minor":{"type":"integer","minimum":0.0,"title":"Value Minor","description":"What it took off the receipt, in minor units.","default":0}},"type":"object","required":["coupon_id"],"title":"TxCouponUse","description":"One coupon a sale used, as the till states it. The server derives the value\nagain from the immutable lines (`loyalty_cards.coupon_ledger.correct`)."},"TxDeliveryAddress":{"properties":{"street":{"type":"string","title":"Street","description":"Street and number.","default":""},"zip":{"type":"string","title":"Zip","description":"Postal code.","default":""},"city":{"type":"string","title":"City","description":"City.","default":""},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country; `null` = the shop's."},"note":{"type":"string","title":"Note","description":"Delivery note, such as the floor.","default":""}},"type":"object","title":"TxDeliveryAddress","description":"Where a home delivery went, as it was at settle (fulfilment type `delivery` only). Swiss VAT taxes a delivered meal at the reduced rate only when the receipt names the service and the delivery address, so every receipt prints it from here. It holds no coordinates: a settled sale keeps no more personal data than it prints."},"TxDiscount":{"properties":{"reason":{"type":"string","title":"Reason","description":"The reason the discount was booked under, as the till names it (`Mitarbeiter` = staff, `Aktion` = promotion, `Kulanz` = goodwill); `Ohne Grund` = no reason given.","default":"Ohne Grund","examples":["Mitarbeiter"]},"amount":{"type":"integer","title":"Amount","description":"Total discount under this reason, gross, in minor units.","default":0}},"type":"object","title":"TxDiscount"},"TxLine":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The article (`prd_\u2026`) sold."},"qty":{"type":"number","title":"Qty","description":"Quantity sold: a count for a piece article; for a weighed article the net weight in kilograms (see `unit`).","default":1,"examples":[2]},"amount":{"type":"integer","title":"Amount","description":"What the line billed, in minor units (cents or Rappen: 630 = 6.30), after its discount: 2 \u00d7 350 with a 10 % discount bills 630.","default":0,"examples":[630]},"name":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the article as the receipt printed it: text per language or a plain string. `null` on a receipt from an older till.","examples":[{"de":"Gipfeli","en":"Croissant"}]},"unit_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price","description":"Unit price before the line discount, in minor units; per kilogram for a weighed article. `null` on a receipt from an older till (then `amount / qty` is the discounted price).","examples":[350]},"dine_in":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dine In","description":"`true`: this line was consumed on the premises (the in-house VAT rate applies); `null` = as the receipt's `fulfillment_type` says."},"discount":{"anyOf":[{"$ref":"#/components/schemas/TxLineDiscount"},{"type":"null"}],"description":"The discount applied to this line; `null` = none."},"modifiers":{"anyOf":[{"items":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"}]},"type":"array"},{"type":"null"}],"title":"Modifiers","description":"Names of the chosen options as printed (text per language or a plain string); their price is already in `unit_price`."},"entered_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entered Weight","description":"Gross weight at the scale in kilograms; present on a weighed line only.","examples":[0.482]},"tare_weight_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tare Weight G","description":"Container weight deducted, in grams; weighed lines only.","examples":[12]},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit","description":"The unit the receipt showed the price per: `kg` or `g100` (per 100 g); `unit_price` stays per kilogram either way."},"manual_weight":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Manual Weight","description":"`true`: the weight was typed in, not weighed."},"pre_tare":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pre Tare","description":"`true`: the tare was preset, not weighed."},"entered_by_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entered By Code","description":"`true`: the article was scanned or typed by its number, not tapped on a tile."},"label_weight":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Label Weight","description":"`true`: the weight came off a scanned scale label."},"kitchen_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kitchen Only","description":"`true`: an information line for the kitchen; left off the customer's receipt when its amount is 0. A menu component with it is always left off, and its amount is shown on the menu's line."},"give_back":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Give Back","description":"`true`: a returned item; the line's amount is negative."},"free_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Units","description":"Units of this line a promotion gave away free; `null` when none."},"points_redeemed":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Points Redeemed","description":"Loyalty points this line spent, all its units together, when its units were redeemed with points. Absent on every other line."},"combo_role":{"anyOf":[{"type":"string","enum":["head","component"]},{"type":"null"}],"title":"Combo Role","description":"A sold menu is stored as one `head` line plus one `component` line per chosen part; `null` on an ordinary line."},"combo_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Combo Group","description":"Ties a menu's head line to its component lines within this receipt."},"combo_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Combo Mode","description":"On a menu's head line: how its components were priced; `null` otherwise."},"combo_vat":{"anyOf":[{"type":"string","const":"parts"},{"type":"null"}],"title":"Combo Vat","description":"On a menu's head line: `parts` when the menu's VAT was signed as its parts carry it; `null` on an older till's menu and on every other line."},"promotion_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion Kind","description":"Which price rule set this line's price (`quantity:x_for_y`, \u2026); `null` when none."},"taxes":{"anyOf":[{"items":{"$ref":"#/components/schemas/TxLineTax"},"type":"array"},{"type":"null"}],"title":"Taxes","description":"Per-rate VAT split for a line whose amount spans several rates (a Click & Collect prepayment); `null` on an ordinary line, which is rated by `tax_ids`."},"tax_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tax Ids","description":"The VAT rates (`tax_\u2026`) the line was rated at, with dine-in or takeaway already applied; `null` on a receipt from an older till."},"tax_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Rate Bps","description":"The VAT rate applied, in basis points (810 = 8.1 %); `null` on older receipts.","examples":[810]},"tax_exempt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax Exempt","description":"`true`: VAT-exempt turnover, reported apart from the 0 %-rated figures."},"booking_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Group","description":"Lines that print as one receipt position share this id; `null` on a normal line."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"How the article was sold: `each`, `kg`, `g100` (per 100 g) or `hour`; decides whether `qty` is a count or a weight.","examples":["each"]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku","description":"Article number as sold."},"category_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id","description":"Product group (`cat_\u2026`) of the article at the time of sale."},"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name","description":"Name of that product group at the time of sale."},"statistic_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Statistic Groups","description":"The article's statistic groups at the time of sale."},"is_payout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payout","description":"`true`: a cash-in or cash-out position rather than goods."},"is_topup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Topup","description":"`true`: the line LOADS a customer card or gift voucher (a prepayment, never turnover)."},"is_atm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Atm","description":"`true`: an ATM cash withdrawal (cash handed out against a card payment), never turnover."},"cash_flow_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Flow Account Id","description":"Cash-in/cash-out account (`cfa_\u2026`) an `is_payout` line books on, at the time of sale."},"gtin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtin","description":"Barcode (GTIN/EAN) of the article as sold."},"epcs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Epcs","description":"RFID tags (EPC, 24 hex characters) of the pieces sold; absent otherwise."}},"type":"object","required":["product_id"],"title":"TxLine"},"TxLineDiscount":{"properties":{"type":{"type":"string","enum":["percent","fixed"],"title":"Type","description":"`percent` = `value` is a percentage in basis points; `fixed` = `value` is an amount in minor units.","default":"percent"},"value":{"type":"integer","title":"Value","description":"The discount: basis points for `percent` (1000 = 10 %), minor units for `fixed` (1000 = 10.00). Read `type` first.","default":0,"examples":[1000]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Reason the cashier picked, free text; `null` = none."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Which till action granted the discount: `percent_key` (the free percent key), `percent_key_2` (the 2 % key), `preset_1` to `preset_5` and `preset_percent` (preset discounts), `promotion`, `staff_card`, `staff_consumption`, `stamp` (a stamp reward), `coupon` (a coupon from the card account), `tier` (a promotion reserved for the card's status level), `points` (an article bought with loyalty points, shown at its price). `null` on a receipt from an older till."},"source_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Code","description":"The raw source code of a receipt imported from CashAssist; `null` otherwise."},"definition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition Id","description":"The configured discount (`disc_\u2026`) this was, when the cashier used one unchanged; `null` for an ad-hoc discount."},"card_kind":{"anyOf":[{"type":"string","enum":["master","free","article","group"]},{"type":"null"}],"title":"Card Kind","description":"On a customer-card line, which of the card's discounts won: `master` = the card's overall rate, `free` = its own rate, `article` or `group` = the rate configured for that article or product group; `null` otherwise."},"coupon_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupon Id","description":"On a `coupon` line, the coupon (`cpn_\u2026`) of the card account that gave it; `null` otherwise."},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"On a `coupon` line, the campaign the coupon belongs to (`birthday-2026`); `null` otherwise."}},"type":"object","title":"TxLineDiscount","description":"The discount on one receipt line, as the till applied it: `value` is basis points for a percent discount and minor units for a fixed one."},"TxLineTax":{"properties":{"tax_id":{"type":"string","title":"Tax Id","description":"The VAT rate (`tax_\u2026`) this part of the line is rated at."},"net":{"type":"integer","title":"Net","description":"Net amount (without VAT) at this rate, in minor units.","default":0},"tax":{"type":"integer","title":"Tax","description":"VAT contained at this rate, in minor units; negative on a pickup line that settles a prepayment.","default":0}},"type":"object","required":["tax_id"],"title":"TxLineTax","description":"The VAT of one receipt line split over several rates, in minor units. Only on the prepayment and pickup lines of a Click & Collect preorder, whose one amount spreads over several rates; reports then read the VAT from here. `tax` can be negative: a pickup line takes back the prepaid VAT."},"TxLoyalty":{"properties":{"card_id":{"type":"string","title":"Card Id","description":"The loyalty card (`card_\u2026`) attached to the sale."},"card_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Number","description":"The card's printed number, frozen at settle so the receipt names the card from the record alone. Never the internal `card_id`."},"points_earned":{"type":"integer","title":"Points Earned","description":"Points this sale granted.","default":0},"balance_spent":{"type":"integer","title":"Balance Spent","description":"Paid from the card's stored value, in minor units.","default":0},"points_redeemed":{"type":"integer","title":"Points Redeemed","description":"Points spent on this sale.","default":0},"discount_applied":{"type":"integer","title":"Discount Applied","description":"Loyalty discount granted, in minor units; already in the line amounts.","default":0},"balance_loaded":{"type":"integer","title":"Balance Loaded","description":"Loaded onto the card by this sale, in minor units, bonus included.","default":0},"balance_loaded_bonus":{"type":"integer","title":"Balance Loaded Bonus","description":"Of `balance_loaded`, the free bonus part, in minor units.","default":0},"card_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Text","description":"The customer-card slip as printed on the receipt."},"card_fx":{"anyOf":[{"$ref":"#/components/schemas/TxCardFx"},{"type":"null"}],"description":"Set when the card is kept in another currency than the sale: the rate and what the card moves by in its own currency. `null` = same currency."},"stamps_earned":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Stamps Earned","description":"Stamps this sale earned on the card; `null` = the till made no claim and the server counts them from the lines."},"stamps_redeemed":{"type":"integer","minimum":0.0,"title":"Stamps Redeemed","description":"Stamps spent on a stamp reward in this sale (the reward line is free).","default":0},"coupons_redeemed":{"anyOf":[{"items":{"$ref":"#/components/schemas/TxCouponUse"},"type":"array"},{"type":"null"}],"title":"Coupons Redeemed","description":"Coupons of the card account this sale used; `null` = none."},"holdout_campaigns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Holdout Campaigns","description":"Campaigns (`birthday-2026`) the card was held out of at settle; `null` = none."},"tier_id":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Tier Id","description":"The card's status level at settle (a level id of the tenant's tier programme); `points_earned` already includes its multiplier. `null` = none."},"tier_notice_until":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Tier Notice Until","description":"The day (YYYY-MM-DD) the card's status level ends, when the receipt printed the notice before a drop. `null` = no notice."},"tier_up_id":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Tier Up Id","description":"The status level the till saw this sale lift the card to, as the receipt printed it; informational, the server decides the level when it books the sale. `null` = none."},"settled_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Settled At","description":"When the till settled the sale, its own clock (ISO instant). `null` = not stated (an older till)."},"is_employee":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Employee"}},"type":"object","required":["card_id"],"title":"TxLoyalty","description":"What the sale did to the attached loyalty card, computed on the till and applied to the card when the sale arrives, once per sale: points earned and redeemed, balance loaded and spent. `discount_applied` is for information: the line and total amounts already include it. A sale carries this or the simpler `points_earned` and `loyalty_card_id`, never both."},"TxPayment":{"properties":{"method":{"type":"string","title":"Method","description":"The tender's kind as the till recorded it, such as `cash`, `card` or `voucher`. Totals by tender group on this value.","examples":["cash"]},"amount":{"type":"integer","title":"Amount","description":"Amount applied to the bill, in minor units. Negative on a receipt with a negative total: money paid out for returned goods.","default":0,"examples":[2000]},"slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot","description":"Which configured tender slot (1 to 10) took the money, as a CashAssist till numbers them; `null` when not recorded."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"The till's payment session this tender belongs to."},"tender_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Id","description":"The till's id for this tender."},"configured_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Configured Method Id","description":"The configured payment method (`pm_\u2026`) used."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"The payment provider the tender settled through; `null` when none."},"provider_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Reference","description":"The provider's reference for this payment."},"terminal_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Transaction Id","description":"The payment terminal's own transaction id."},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference","description":"A reference from an external system, free text."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Text the till showed for this tender."},"tip_amount":{"type":"integer","title":"Tip Amount","description":"Tip carried by this tender, in minor units, on top of `amount`; 0 = none.","default":0,"examples":[100]},"foreign_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Foreign Currency","description":"ISO 4217 code when the cash was tendered in a foreign currency; `null` = the receipt's currency.","examples":["EUR"]},"foreign_tendered":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foreign Tendered","description":"Cash handed over in `foreign_currency`, in that currency's minor units.","examples":[2000]},"exchange_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exchange Rate Bps","description":"Exchange rate the foreign cash was converted at: home currency per one unit of the foreign currency, \u00d7 10 000 (0.9615 CHF per EUR = 9615).","examples":[9615]},"rounding_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rounding Delta","description":"Difference between the exact converted home amount and the amount applied after cash rounding, in minor units."},"eft_slip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eft Slip","description":"The payment terminal's receipt text, verbatim."},"eft_signature_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Eft Signature Requested","description":"True when the card terminal asked for the cardholder's signature."},"eft_merchant_slip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eft Merchant Slip","description":"The terminal's merchant copy, verbatim; kept only with a signature request."},"print_tip_line":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Tip Line","description":"True when the receipt prints a blank tip line for this tender."},"print_signature_line":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Print Signature Line","description":"True when the receipt prints a blank signature line for this tender."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Further provider data, as the till recorded it."},"tendered":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tendered","description":"Cash handed over, in minor units; change = `tendered \u2212 (amount + tip_amount)`. Only on a cash tender that gave change; `null` otherwise.","examples":[5000]},"change_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Currency","description":"ISO 4217 code of the change handed back; set together with `change_amount` on a foreign-cash tender, `null` on a home-currency one.","examples":["EUR"]},"change_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Change Amount","description":"Change handed back, in the minor units of `change_currency`.","examples":[150]},"change_shortage":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Change Shortage","description":"Change the cash machine owed but could not pay out, in minor units; the customer is still owed it. Only on a cash tender; `null` = paid out in full.","examples":[250]}},"type":"object","required":["method"],"title":"TxPayment"},"TxPromotion":{"properties":{"promotion_id":{"type":"string","title":"Promotion Id","description":"The promotion (`promo_\u2026`) applied.","default":""},"name":{"type":"string","title":"Name","description":"Its name at the time of sale.","default":""},"type":{"type":"string","title":"Type","description":"Its kind (`happy_hour`, `buy_x_get_y`, \u2026).","default":""},"amount":{"type":"integer","title":"Amount","description":"Gross discount this promotion granted, in minor units.","default":0}},"type":"object","title":"TxPromotion","description":"One promotion the till's engine applied to this receipt (audit trail). The\ndiscount AMOUNTS already fold into `discounts[]`/`total`; this is the\nattribution \u2014 which promotion granted what \u2014 for reporting/receipt."},"TxRksvBeleg":{"properties":{"kind":{"type":"string","title":"Kind","description":"Which special receipt: `start`, `month`, `year`, `collective` (the re-signing receipt after an outage) or `closing` (the Schlussbeleg that takes the register out of service).","examples":["month"]},"belege":{"items":{"type":"integer"},"type":"array","title":"Belege","description":"Receipt numbers a `collective` receipt re-signs, ascending."}},"type":"object","required":["kind"],"title":"TxRksvBeleg","description":"An Austrian special receipt (RKSV): a start, month or year receipt, or the collective receipt that signs receipts again after a signature card outage, with the receipt numbers it signs in `belege`, in ascending order. Such a receipt has no lines and no amount; readers print its rows from here."},"TxSignature":{"properties":{"png":{"type":"string","title":"Png","description":"The signature as a base64-encoded PNG, without a `data:` prefix."},"width":{"type":"integer","title":"Width","description":"Width of the PNG in pixels.","default":0},"height":{"type":"integer","title":"Height","description":"Height of the PNG in pixels.","default":0},"captured_at":{"type":"string","title":"Captured At","description":"When it was captured, ISO 8601 on the device clock.","default":""},"payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Id","description":"The configured payment method (`pm_\u2026`) that asked for it."}},"type":"object","required":["png"],"title":"TxSignature","description":"The customer's signature, captured at settle for a payment method that requires one: a base64 PNG stored on the receipt, so a receipt prints it without another request."},"TxStaffMeal":{"properties":{"staff_id":{"type":"string","maxLength":64,"minLength":1,"title":"Staff Id","description":"The staff member (`stf_\u2026`) who ate the meal."},"name":{"type":"string","maxLength":200,"title":"Name","description":"Their display name at the time of sale.","default":""},"at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"At","description":"When the meal was settled, on the shop's wall clock (`YYYY-MM-DDTHH:MM:SS`, no offset). Payroll dates the meal by it when it is a real local time within 48 hours of the booking; otherwise, and from an older till that sends none, by the booking time. Never refused."}},"type":"object","required":["staff_id"],"title":"TxStaffMeal","description":"Who ate a staff meal (Personalessen), as it was at settle: the staff member's id and display name, and the till's local settle time. One person per receipt. The receipt stays at 0.00; payroll deducts the meal later, per person, day and meal."},"TxTable":{"properties":{"id":{"type":"string","title":"Id","description":"The table order (`tbl_\u2026`) this receipt closed.","default":""},"label":{"type":"string","title":"Label","description":"The table's label as printed (`1`, `T2`).","default":""},"room":{"type":"string","title":"Room","description":"Room the table sits in (`Terrasse`).","default":""},"guests_count":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":1.0},{"type":"null"}],"title":"Guests Count"}},"type":"object","title":"TxTable","description":"The table of a sale at a table, as it was at settle: its label and room, so the receipt still names the table after the table order is closed. Empty on counter and takeaway sales."},"TxVoidedLine":{"properties":{"product_id":{"type":"string","title":"Product Id","description":"The article (`prd_\u2026`) removed."},"qty":{"type":"number","title":"Qty","description":"The quantity removed.","default":1},"amount":{"type":"integer","title":"Amount","description":"What the removed units would have billed, in minor units.","default":0},"voided_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voided By","description":"Numeric staff id of who removed the line."},"voided_by_name":{"type":"string","title":"Voided By Name","description":"Name of who removed the line.","default":""}},"type":"object","required":["product_id"],"title":"TxVoidedLine","description":"A line removed from the sale before it was settled, kept for the record. It is not billed: the lines, the total and the VAT never include it, and receipts do not print it. Closings count it as a void, against the user who removed it."},"ValidationDetails":{"properties":{"problems":{"items":{"$ref":"#/components/schemas/ValidationProblem"},"type":"array","title":"Problems","description":"Every problem of the refused input, all at once, in request order. Present on `validation_error`; another 422 code may carry other details."}},"type":"object","title":"ValidationDetails","description":"The structured part of a 422."},"ValidationErrorBody":{"properties":{"code":{"type":"string","title":"Code","description":"`validation_error` for a refused parameter or body field. Some operations answer another 422 code for a refused business state; its message says why."},"message":{"type":"string","title":"Message","description":"The first problem as `<field>: <message>`, plus `(and N more)` when there are more. Read `details.problems` for the fields; never parse this text."},"details":{"anyOf":[{"$ref":"#/components/schemas/ValidationDetails"},{"type":"null"}],"description":"Every problem of the refused input."}},"type":"object","required":["code","message"],"title":"ValidationErrorBody","description":"A refused input: the first problem in `message`, every problem in `details.problems`."},"ValidationErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ValidationErrorBody","description":"The refused input."}},"type":"object","required":["error"],"title":"ValidationErrorEnvelope","description":"The body of a 422 answer.","examples":[{"error":{"code":"validation_error","details":{"problems":[{"field":"date","message":"String should match pattern '^\\d{4}-\\d{2}-\\d{2}$'","reason":"string_pattern_mismatch","value":"20261020"},{"field":"customer_id","message":"Field required","reason":"missing"}]},"message":"date: String should match pattern '^\\d{4}-\\d{2}-\\d{2}$' (and 1 more)"}}]},"ValidationProblem":{"properties":{"field":{"type":"string","title":"Field","description":"Where: a body field as a dotted path, list items by index (`positions.2.vat_code`); a query or path parameter by its name. Empty for a problem of the whole body."},"reason":{"type":"string","enum":["all_unsubscribed","archived","arguments_type","assertion_error","below_purchase","bool_parsing","bool_type","bytes_invalid_encoding","bytes_too_long","bytes_too_short","bytes_type","callable_type","cannot_print","category_anchor","cc_articles_missing","cc_in_use","cc_off","cc_till_missing","check_digit","code_expired","code_wrong","column_in_use","complex_str_parsing","complex_type","cycle","dataclass_exact_type","dataclass_type","date_from_datetime_inexact","date_from_datetime_parsing","date_future","date_parsing","date_past","date_type","datetime_from_date_parsing","datetime_future","datetime_object_invalid","datetime_parsing","datetime_past","datetime_type","decimal_max_digits","decimal_max_places","decimal_parsing","decimal_type","decimal_whole_digits","default_factory_not_called","dict_type","empty","enum","extra_forbidden","finite_number","float_parsing","float_type","frozen_field","frozen_instance","frozen_set_type","get_attribute_error","greater_than","greater_than_equal","int_from_float","int_parsing","int_parsing_size","int_type","invalid_key","is_instance_of","is_subclass_of","iterable_type","iteration_error","json_invalid","json_type","less_than","less_than_equal","list_type","literal_error","mapping_type","mismatch","missing","missing_argument","missing_keyword_only_argument","missing_positional_only_argument","missing_sentinel_error","model_attributes_type","model_type","multiple_argument_values","multiple_of","needs_python_object","no_cash_flow_account","no_such_attribute","none_required","not_a_component","not_a_date","not_a_percent","not_allowed","not_eligible","not_in_ladder","not_one_of","not_orderable","not_unique","other_company","out_of_range","po_box","qr_till_missing","recursion_loop","report_rule","required","reserved","retired","same_as_sender","set_item_not_hashable","set_type","single_run_time_required","sms_sender_missing","string_not_ascii","string_pattern_mismatch","string_sub_type","string_too_long","string_too_short","string_type","string_unicode","till_has_device","time_delta_parsing","time_delta_type","time_parsing","time_type","timezone_aware","timezone_naive","timezone_offset","too_long","too_many","too_short","tuple_type","unbalanced","unexpected_keyword_argument","unexpected_positional_argument","union_tag_invalid","union_tag_not_found","unknown_key","unknown_member","unknown_reference","unreadable","url_parsing","url_scheme","url_syntax_violation","url_too_long","url_type","uuid_parsing","uuid_type","uuid_version","value_error","voice_consent_required","voice_key_refused","voice_needs_account","voice_needs_page","wrong_open_amount"],"title":"Reason","description":"Stable code of the rule the value breaks; branch on this. A shape problem names the type check that failed (`missing`, `extra_forbidden`, `string_pattern_mismatch`), a business rule its own name (`unknown_reference`, `not_unique`, `not_in_ladder`). The list is closed."},"message":{"type":"string","title":"Message","description":"What is wrong, in one sentence for the person reading the log. The wording may change."},"value":{"title":"Value","description":"The value that was refused, when it is short and not a secret. Absent otherwise."},"ctx":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ctx","description":"The limits the value broke, for a client that words the problem itself: `min_length` / `max_length` of a text or a list, `ge` / `gt` / `le` / `lt` and `multiple_of` of a number, `expected` (the values a choice allows), `pattern` (the expression a text must match) and `example` (a value that pattern takes). Each key only where it applies; absent when none does."}},"type":"object","required":["field","reason","message"],"title":"ValidationProblem","description":"One failing parameter or body field of a refused input."},"VesselSlot":{"properties":{"vessel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vessel Id"},"grams":{"type":"number","minimum":0.0,"title":"Grams","default":0}},"additionalProperties":true,"type":"object","title":"VesselSlot","description":"One vessel a batch of the recipe is portioned into, and how many grams go into it."},"VesselTolerance":{"properties":{"interval_minus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Minus G"},"interval_plus_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Interval Plus G"},"percent_minus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Minus"},"percent_plus":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Percent Plus"}},"additionalProperties":true,"type":"object","title":"VesselTolerance","description":"The weighing tolerance for every vessel of a recipe: an absolute band in grams and a percent band. The narrower of the two applies."},"WebhookCreate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"url":{"type":"string","title":"Url","description":"Where deliveries are posted: a public http or https address. A private, loopback or link-local address and an internal host name are refused, at registration and again before each delivery."},"events":{"items":{"type":"string","pattern":"^(\\*|[a-z0-9_]+\\.[a-z0-9_]+)$"},"type":"array","title":"Events","description":"The event names this webhook receives, such as `products.created` or `orders.updated`, or `*` for every event. Names follow `{collection}.{created|updated|deleted}`; the webhooks introduction lists the collections. A name is matched exactly, so each is `*` or `<lower-case word>.<lower-case word>`. An empty list receives nothing."},"secret":{"type":"string","minLength":16,"title":"Secret","description":"The key every delivery is signed with (`X-POS-Signature`): at least 16 characters, chosen by you; the server never generates one. Every read of the webhook returns it as stored. Because a create needs it, RunMyHub's in-app assistant does not create webhooks: a change it prepares may not carry a credential."},"active":{"type":"boolean","title":"Active","description":"Whether deliveries are made. `false` keeps the registration and delivers nothing; events that happen meanwhile are not sent later.","default":true}},"additionalProperties":false,"type":"object","required":["url","secret"],"title":"WebhookCreate","description":"A webhook: a public URL RunMyHub calls with the events it names."},"WebhookPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookRecord"},"type":"array","title":"Data","description":"The page's records."},"total":{"type":"integer","title":"Total","description":"Records matching the filters across the WHOLE set, not just this page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `?cursor=` for the next page."}},"type":"object","required":["data","total","has_more"],"title":"WebhookPage"},"WebhookRecord":{"properties":{"_id":{"type":"string","title":"Id","description":"Record id."},"url":{"type":"string","title":"Url","description":"Where deliveries are posted: a public http or https address. A private, loopback or link-local address and an internal host name are refused, at registration and again before each delivery."},"events":{"items":{"type":"string","pattern":"^(\\*|[a-z0-9_]+\\.[a-z0-9_]+)$"},"type":"array","title":"Events","description":"The event names this webhook receives, such as `products.created` or `orders.updated`, or `*` for every event. Names follow `{collection}.{created|updated|deleted}`; the webhooks introduction lists the collections. A name is matched exactly, so each is `*` or `<lower-case word>.<lower-case word>`. An empty list receives nothing."},"secret":{"type":"string","minLength":16,"title":"Secret","description":"The key every delivery is signed with (`X-POS-Signature`): at least 16 characters, chosen by you; the server never generates one. Every read of the webhook returns it as stored. Because a create needs it, RunMyHub's in-app assistant does not create webhooks: a change it prepares may not carry a credential."},"active":{"type":"boolean","title":"Active","description":"Whether deliveries are made. `false` keeps the registration and delivers nothing; events that happen meanwhile are not sent later.","default":true}},"type":"object","required":["_id","url","secret"],"title":"WebhookRecord"},"WebhookUpdate":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The record's id, as a read answers it.","readOnly":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"The workspace the record belongs to.","readOnly":true},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"The record's revision, kept by the server.","readOnly":true},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"The hash of the record's content, kept by the server.","readOnly":true},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"The record's storage schema, kept by the server.","readOnly":true},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"When the record last changed, kept by the server.","readOnly":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the record was created, kept by the server.","readOnly":true},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","description":"Whether the record is deleted, kept by the server.","readOnly":true},"source_owned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source Owned","description":"Whether an import owns the record, as a read of one record answers it.","readOnly":true},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Where deliveries are posted: a public http or https address. A private, loopback or link-local address and an internal host name are refused, at registration and again before each delivery. May be left out, never null."},"events":{"anyOf":[{"items":{"type":"string","pattern":"^(\\*|[a-z0-9_]+\\.[a-z0-9_]+)$"},"type":"array"},{"type":"null"}],"title":"Events","description":"The event names this webhook receives, such as `products.created` or `orders.updated`, or `*` for every event. Names follow `{collection}.{created|updated|deleted}`; the webhooks introduction lists the collections. A name is matched exactly, so each is `*` or `<lower-case word>.<lower-case word>`. An empty list receives nothing. May be left out, never null."},"secret":{"anyOf":[{"type":"string","minLength":16},{"type":"null"}],"title":"Secret","description":"The key every delivery is signed with (`X-POS-Signature`): at least 16 characters, chosen by you; the server never generates one. Every read of the webhook returns it as stored. Because a create needs it, RunMyHub's in-app assistant does not create webhooks: a change it prepares may not carry a credential. A changed secret signs every delivery from then on. May be left out, never null."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether deliveries are made. `false` keeps the registration and delivers nothing; events that happen meanwhile are not sent later. May be left out, never null."}},"additionalProperties":false,"type":"object","title":"WebhookUpdate","description":"A change to a webhook: only the fields sent change."},"WebshopArticle":{"properties":{"option_group_ids":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Option Group Ids","description":"Modifier groups (ids) the guest chooses from online, priced per option."},"inputs":{"items":{"$ref":"#/components/schemas/WebshopInput"},"type":"array","maxItems":20,"title":"Inputs","description":"Free fields the guest fills in (the text on a cake)."},"price":{"anyOf":[{"type":"integer","maximum":100000000.0,"minimum":0.0},{"type":"null"}],"title":"Price","description":"The shop's own price, gross, in minor units; null = the till price (`pricing.amount`)."},"category_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Category Ids","description":"The shop's own categories (ids) the article is listed in."},"description":{"additionalProperties":{"type":"string"},"type":"object","title":"Description","description":"The shop text, plain text with paragraphs by blank lines, per language; empty = the article's `description`.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"shipping_methods":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Shipping Methods","description":"How the article may reach the guest, as the source states it: `pickup`, `post`, `post_express`, `delivery_local`, `delivery_ch`, `annanow`. Stored, not yet enforced."},"domestic_only":{"type":"boolean","title":"Domestic Only","description":"true: shipped within the shop's own country only; a parcel abroad is refused.","default":false},"upload":{"type":"boolean","title":"Upload","description":"true: the guest adds a photo or logo (a photo cake).","default":false},"upload_kind":{"type":"string","enum":["photo","logo"],"title":"Upload Kind","description":"`photo` = an edible print (JPEG, PNG or WebP, at least 600 px); `logo` = also SVG, EPS, PDF, TIFF and GIF.","default":"photo"},"upload_label":{"additionalProperties":{"type":"string"},"type":"object","title":"Upload Label","description":"The upload field's caption, per language; empty = the shop's own word.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"upload_required":{"type":"boolean","title":"Upload Required","description":"false: the guest may order without an upload.","default":true},"print_cm":{"anyOf":[{"$ref":"#/components/schemas/PrintArea"},{"type":"null"}],"description":"The print's size for the guest's proof; null = the shop's default (25 \u00d7 17.5 cm)."},"diet":{"items":{"type":"string","enum":["vegetarian","vegan","gluten_free","lactose_free","spelt","bio"]},"type":"array","maxItems":6,"title":"Diet","description":"Diet marks the guest filters by; the article's `declaration.special_symbols` count too."},"notices":{"items":{"additionalProperties":{"type":"string"},"type":"object","description":"Text in several languages: one entry per language code (`de`, `en`, `fr`, `it`), each a plain string. Send at least the workspace's default language; a reader asking for a language the record lacks gets the default language, then `en`, then the first text present.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"type":"array","maxItems":5,"title":"Notices","description":"Notices the guest confirms before ordering (\"This is a custom order\"); kept on the checkout, never printed on the order."},"change_days":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":0.0},{"type":"null"}],"title":"Change Days","description":"A special order: changes and cancellations are possible until this many days before the day; null = an ordinary article."},"source":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Source","description":"Where this block came from (an import's name), so a re-import knows what it may overwrite."}},"additionalProperties":false,"type":"object","title":"WebshopArticle","description":"The online-shop settings of an article: `option_group_ids` names shared modifier groups (one flavour group for many cakes, priced per option), and `inputs` are the article's own fields the guest fills in."},"WebshopInput":{"properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$","title":"Id","description":"The field's key, unique on the article: lower-case letters, digits, `_`."},"label":{"additionalProperties":{"type":"string"},"type":"object","title":"Label","description":"The field's caption the guest sees, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"required":{"type":"boolean","title":"Required","description":"true: the guest must fill it in.","default":false},"max_chars":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Max Chars","description":"The longest text the guest may enter.","default":100},"price_delta":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Price Delta","description":"Added to the price once per piece when the field is filled, gross, in minor units.","default":0},"hint":{"additionalProperties":{"type":"string"},"type":"object","title":"Hint","description":"A help text under the field, per language.","examples":[{"de":"Kaffee","en":"Coffee","fr":"Caf\u00e9"}]},"on_photo":{"type":"boolean","title":"On Photo","description":"true: the text goes on the photo (the greeting on a photo cake), and the guest's proof shows it over the picture.","default":false}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"WebshopInput","description":"A field the guest fills in when ordering online, such as the text on a cake or the number on a number cake. Priced like an option: `price_delta` (gross, minor units) is added once per piece when the field is filled."},"WeekdayHours":{"properties":{"weekday":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Weekday","description":"The weekday, 0 = Monday to 6 = Sunday."},"closed":{"type":"boolean","title":"Closed","description":"true = closed all day; wins over the windows.","default":false},"windows":{"items":{"$ref":"#/components/schemas/TimeWindow"},"type":"array","title":"Windows","description":"The open periods of the day; several make a lunch break or a split shift."}},"additionalProperties":false,"type":"object","required":["weekday"],"title":"WeekdayHours","description":"The regular opening hours of one weekday. `closed` wins over the windows; several windows make a lunch break or a split shift."},"Weighing":{"properties":{"scale_mode":{"type":"string","enum":["scale","manual","piece_and_weight"],"title":"Scale Mode","description":"How the weight is entered: `scale` (a connected scale), `manual`, or `piece_and_weight` (sold per piece, priced per kg when weighed).","default":"manual"},"tare":{"items":{"$ref":"#/components/schemas/TareOption"},"type":"array","title":"Tare","description":"The article's own tare containers."},"tare_ids":{"items":{"type":"string"},"type":"array","title":"Tare Ids","description":"The workspace's tares (ids) offered for this article; empty = the till's own."},"tare_in_label_mode":{"type":"boolean","title":"Tare In Label Mode","description":"true: the tare applies in label mode only.","default":false},"embedded_barcode":{"anyOf":[{"$ref":"#/components/schemas/EmbeddedBarcode"},{"type":"null"}],"description":"How a scale barcode for this article is read."},"piece_weight_g":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Piece Weight G","description":"For `piece_and_weight`: the weight of one piece in grams; null = `amount` is already the price per kg."}},"additionalProperties":false,"type":"object","title":"Weighing","description":"How a weighed article is sold (`type` `weighed_good`): `scale_mode` says how the weight comes in (`scale`, `manual` or `piece_and_weight`), `tare` lists the tare weights and `embedded_barcode` reads scale barcodes. The price is per `pricing.unit` (kg or 100 g), except for `piece_and_weight`: sold per piece (`unit` `each`, the amount being one piece's price) and priced per kilogram when weighed, at amount \u00d7 1000 \u00f7 `piece_weight_g`."}}}}