{
	"components": {
		"schemas": {
			"Address": {
				"additionalProperties": false,
				"properties": {
					"city": {
						"description": "Town, with the postal district where the post uses one (\"Praha 1\").",
						"type": "string"
					},
					"postal_code": {
						"description": "Postal code, \"415 01\" for a Czech or Slovak one.",
						"type": "string"
					},
					"street": {
						"description": "Street and number — the first line of the address.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"BinLineRow": {
				"additionalProperties": false,
				"properties": {
					"average": {
						"description": "The part's average, not this bin's: value does not live at a location.",
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"qty",
					"average"
				],
				"type": "object"
			},
			"BomLineRow": {
				"additionalProperties": false,
				"properties": {
					"average": {
						"description": "What one of this component costs: the weighted average of what it holds, and for a part that holds nothing the average its last pieces left at. Zero for a part that never had a price.",
						"type": "string"
					},
					"bins": {
						"description": "Every bin holding a non-zero quantity of this component, in code order.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"composed": {
						"description": "This component is made of other parts, so it has a bill of materials of its own.",
						"type": "boolean"
					},
					"description": {
						"type": "string"
					},
					"designators": {
						"description": "As drawn. When a line is wrong the question is always which one on the board.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"dnp": {
						"description": "On the board, deliberately unfitted. It belongs on the bill of materials and must not be consumed.",
						"type": "boolean"
					},
					"exclude_from_bom": {
						"type": "boolean"
					},
					"line_cost": {
						"type": "string"
					},
					"line_no": {
						"format": "int64",
						"type": "integer"
					},
					"min_stock": {
						"description": "The component's minimum stock; empty is none.",
						"type": "string"
					},
					"mpn": {
						"description": "The manufacturer's own number, from the first vendor line that carries one.",
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"on_hand": {
						"type": "string"
					},
					"ordered": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"source": {
						"description": "kicad or manual. An import replaces only the lines it wrote.",
						"type": "string"
					},
					"source_footprint": {
						"type": "string"
					},
					"source_value": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					},
					"unit_cost": {
						"type": "string"
					},
					"vendor_description": {
						"description": "What a vendor calls it, for a part whose own description is empty.",
						"type": "string"
					}
				},
				"required": [
					"line_no",
					"pn",
					"description",
					"unit",
					"designators",
					"qty",
					"dnp",
					"exclude_from_bom",
					"source",
					"on_hand",
					"average",
					"composed",
					"line_cost",
					"unit_cost",
					"ordered",
					"bins"
				],
				"type": "object"
			},
			"Build-requirementsResponse": {
				"additionalProperties": false,
				"properties": {
					"requirements": {
						"items": {
							"$ref": "#/components/schemas/RequirementRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"short": {
						"description": "How many components are missing.",
						"format": "int64",
						"type": "integer"
					}
				},
				"required": [
					"requirements",
					"short"
				],
				"type": "object"
			},
			"BuildJobDelivery": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"format": "date",
						"type": "string"
					},
					"customer": {
						"description": "The code of the customer it went to.",
						"type": "string"
					},
					"customer_name": {
						"description": "Their name as the goods issue copied it.",
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"note_id": {
						"description": "The delivery note it is on, cancelled ones aside. Empty while it waits for one.",
						"type": "string"
					},
					"note_no": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"document_no",
					"accounting_date",
					"customer",
					"customer_name"
				],
				"type": "object"
			},
			"BuildJobDetail": {
				"additionalProperties": false,
				"properties": {
					"builds": {
						"description": "Its products, each reserved, started and completed on its own — and the sub-assemblies made for them, each naming its product in made_for.",
						"items": {
							"$ref": "#/components/schemas/BuildRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"builds"
				],
				"type": "object"
			},
			"BuildJobDocument": {
				"additionalProperties": false,
				"properties": {
					"document_no": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"document_no"
				],
				"type": "object"
			},
			"BuildJobLineInput": {
				"additionalProperties": false,
				"properties": {
					"note": {
						"type": "string"
					},
					"part": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"revision": {
						"description": "Must be released.",
						"type": "string"
					},
					"services": {
						"items": {
							"$ref": "#/components/schemas/BuildJobServiceInput"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"part",
					"revision",
					"qty"
				],
				"type": "object"
			},
			"BuildJobProduct": {
				"additionalProperties": false,
				"properties": {
					"description": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"split_from": {
						"description": "The product this was split off, so the parts of one can be said as one.",
						"type": "string"
					},
					"status": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"pn",
					"description",
					"qty",
					"status"
				],
				"type": "object"
			},
			"BuildJobRow": {
				"additionalProperties": false,
				"properties": {
					"actor": {
						"type": "string"
					},
					"cost": {
						"description": "Production cost of the products completed so far. Absent while none is.",
						"type": "string"
					},
					"created_at": {
						"type": "string"
					},
					"customer": {
						"type": "string"
					},
					"customer_name": {
						"type": "string"
					},
					"deliveries": {
						"items": {
							"$ref": "#/components/schemas/BuildJobDelivery"
						},
						"type": [
							"array",
							"null"
						]
					},
					"deliveries_together": {
						"description": "Two or more of its goods issues wait for a delivery note, every one to the same customer and naming them alike: one delivery note can be issued from all of them.",
						"type": "boolean"
					},
					"documents": {
						"description": "The VR document of each completed product.",
						"items": {
							"$ref": "#/components/schemas/BuildJobDocument"
						},
						"type": [
							"array",
							"null"
						]
					},
					"done": {
						"description": "Of those, the pieces completed.",
						"type": "string"
					},
					"due_on": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"job_no": {
						"type": "string"
					},
					"management": {
						"description": "Calculation price of everything it delivers: products made at what their runs came to, products to make at today's calculation, lines from stock at the part's average. Posted nowhere.",
						"type": "string"
					},
					"management_estimated": {
						"description": "Part of it is a calculation or an average rather than a run's own figure.",
						"type": "boolean"
					},
					"note": {
						"type": "string"
					},
					"products": {
						"items": {
							"$ref": "#/components/schemas/BuildJobProduct"
						},
						"type": [
							"array",
							"null"
						]
					},
					"qty": {
						"description": "Pieces across the products that are not cancelled.",
						"type": "string"
					},
					"reference": {
						"type": "string"
					},
					"reserve_until": {
						"description": "The last day its lines from stock are held. Absent: until cancelled.",
						"type": "string"
					},
					"sale_cost": {
						"description": "The calculation price of what the value counts: of the lines that have a price.",
						"type": "string"
					},
					"sale_estimated": {
						"description": "Part of the cost is today's calculation of a product not yet made, or a part's average.",
						"type": "boolean"
					},
					"sale_partial": {
						"description": "Some of its parts have no price and are not in the value.",
						"type": "boolean"
					},
					"sale_value": {
						"description": "Absent when none of its parts has a price.",
						"type": "string"
					},
					"service_kinds": {
						"description": "The kinds of service booked on its products, each once, in the order of their names. Absent when none.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"services": {
						"type": "string"
					},
					"short": {
						"description": "Components short for the products not yet reserved and the lines from stock that hold nothing, taken together.",
						"format": "int64",
						"type": "integer"
					},
					"short_parts": {
						"items": {
							"$ref": "#/components/schemas/BuildJobShortPart"
						},
						"type": [
							"array",
							"null"
						]
					},
					"status": {
						"description": "Read off the products: partial is some completed and some still to do.",
						"enum": [
							"new",
							"reserved",
							"in_progress",
							"partial",
							"posted",
							"cancelled"
						],
						"type": "string"
					},
					"stock": {
						"items": {
							"$ref": "#/components/schemas/BuildJobStockLine"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"id",
					"job_no",
					"created_at",
					"status",
					"products",
					"stock",
					"qty",
					"done",
					"short",
					"short_parts",
					"services",
					"documents",
					"deliveries"
				],
				"type": "object"
			},
			"BuildJobServiceInput": {
				"additionalProperties": false,
				"properties": {
					"amount": {
						"type": "string"
					},
					"kind": {
						"description": "Board fabrication, a stencil, somebody else's assembly.",
						"type": "string"
					}
				},
				"required": [
					"kind",
					"amount"
				],
				"type": "object"
			},
			"BuildJobShortPart": {
				"additionalProperties": false,
				"properties": {
					"built": {
						"description": "The part is made here: its drawing — the released revision, else the newest draft — fits something. Absent for a part that is bought, a drawn one whose drawing fits nothing included.",
						"type": "boolean"
					},
					"description": {
						"type": "string"
					},
					"for_sub": {
						"description": "Of what is needed, how much the sub-assemblies take that nobody is making yet. Absent when none.",
						"type": "string"
					},
					"free": {
						"description": "On hand less what reserved orders hold.",
						"type": "string"
					},
					"making": {
						"description": "How much of it the build order's own products still to be made will make. Absent when none.",
						"type": "string"
					},
					"needed": {
						"description": "By every product of the build order not yet reserved, together — and by the sub-assemblies they need that nobody is making yet, which are made when they are.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"short": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"needed",
					"free",
					"short"
				],
				"type": "object"
			},
			"BuildJobStockInput": {
				"additionalProperties": false,
				"properties": {
					"note": {
						"type": "string"
					},
					"part": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					}
				},
				"required": [
					"part",
					"qty"
				],
				"type": "object"
			},
			"BuildJobStockLine": {
				"additionalProperties": false,
				"properties": {
					"delivered": {
						"description": "What the build order's goods issues took of the part, less what the customer returned against them.",
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"free": {
						"description": "What anybody but this line may still take of the part.",
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"remaining": {
						"description": "Still to hand over.",
						"type": "string"
					},
					"sale_price": {
						"description": "What its part is sold for today. Absent when the part has no price.",
						"type": "string"
					},
					"state": {
						"description": "Where it stands today: reserved and past the build order's date is expired, and holds nothing; nothing left to hand over is delivered.",
						"enum": [
							"new",
							"reserved",
							"expired",
							"delivered",
							"cancelled"
						],
						"type": "string"
					},
					"status": {
						"description": "What was done to it.",
						"enum": [
							"new",
							"reserved",
							"cancelled"
						],
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"pn",
					"description",
					"unit",
					"qty",
					"delivered",
					"remaining",
					"status",
					"state",
					"free"
				],
				"type": "object"
			},
			"BuildRow": {
				"additionalProperties": false,
				"properties": {
					"actor": {
						"type": "string"
					},
					"cost": {
						"type": "string"
					},
					"created_at": {
						"type": "string"
					},
					"customer": {
						"type": "string"
					},
					"customer_name": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"document_id": {
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"due_on": {
						"type": "string"
					},
					"has_services": {
						"description": "The run has a service line, whatever its estimate.",
						"type": "boolean"
					},
					"id": {
						"type": "string"
					},
					"job_id": {
						"description": "Empty for a product taken off its build order after it was made.",
						"type": "string"
					},
					"job_no": {
						"type": "string"
					},
					"location": {
						"type": "string"
					},
					"made_for": {
						"description": "The product of the same build order this is a sub-assembly for. Absent on a product somebody ordered.",
						"type": "string"
					},
					"management": {
						"description": "Calculation price of the whole run. Posted nowhere.",
						"type": "string"
					},
					"management_estimated": {
						"description": "The run is not made yet, or a component's cost is an estimate: the figure is today's calculation.",
						"type": "boolean"
					},
					"note": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"reference": {
						"type": "string"
					},
					"reservable": {
						"description": "How many whole pieces of a product short of parts the free parts cover now, when at least one: so much of it could be reserved apart. Absent when all of it can be reserved, when it already holds, and when not one piece can.",
						"type": "string"
					},
					"rev": {
						"type": "string"
					},
					"sale_price": {
						"type": "string"
					},
					"serial_mask": {
						"type": "string"
					},
					"serialized": {
						"type": "boolean"
					},
					"service_lines": {
						"items": {
							"$ref": "#/components/schemas/ServiceRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"services": {
						"description": "External services booked against the run — board fabrication, somebody else's assembly.",
						"type": "string"
					},
					"short": {
						"format": "int64",
						"type": "integer"
					},
					"split_from": {
						"description": "The product this was split off, when it was: the original one, so parts of it group on one equality.",
						"type": "string"
					},
					"status": {
						"enum": [
							"new",
							"reserved",
							"in_progress",
							"posted",
							"cancelled"
						],
						"type": "string"
					}
				},
				"required": [
					"id",
					"job_id",
					"job_no",
					"pn",
					"description",
					"rev",
					"qty",
					"status",
					"serialized",
					"short",
					"created_at",
					"services"
				],
				"type": "object"
			},
			"Cancel-purchase-orderRequest": {
				"additionalProperties": false,
				"properties": {
					"reason": {
						"description": "What the vendor said. Optional, and the only part of a cancelled order anybody reads later.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"CostLineRow": {
				"additionalProperties": false,
				"properties": {
					"average_after": {
						"description": "The weighted average as it stood after this movement.",
						"type": "string"
					},
					"date": {
						"type": "string"
					},
					"document": {
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"kind": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"qty_after": {
						"description": "What was on hand after this movement. Issues between two arrivals lower it, and the next arrival is averaged with what was left.",
						"type": "string"
					},
					"total_cost": {
						"description": "What the movement added to the part's value — a revaluation's or a price adjustment's whole effect, since it moves no quantity.",
						"type": "string"
					},
					"unit_cost": {
						"description": "What one unit cost on this arrival.",
						"type": "string"
					},
					"vendor": {
						"description": "Whose receipt it was: a price adjustment's is the receipt's it adjusts.",
						"type": "string"
					}
				},
				"required": [
					"date",
					"document",
					"document_no",
					"kind",
					"qty",
					"unit_cost",
					"total_cost",
					"average_after",
					"qty_after"
				],
				"type": "object"
			},
			"CostedLineRow": {
				"additionalProperties": false,
				"properties": {
					"base": {
						"description": "The invoice line in CZK, plus the tax when it cannot be reclaimed.",
						"type": "string"
					},
					"charges": {
						"description": "Its share of every landed cost on the receipt.",
						"type": "string"
					},
					"line_no": {
						"format": "int64",
						"type": "integer"
					},
					"stocked": {
						"type": "boolean"
					},
					"total": {
						"description": "Acquisition cost of the line.",
						"type": "string"
					},
					"unit": {
						"description": "That, per base unit. What the part's average will be moved toward.",
						"type": "string"
					},
					"vat": {
						"description": "The tax recorded against the line in the company's currency — its own and its share of import VAT — whether or not it is in total. What the line's lot carries for § 79 ZDPH.",
						"type": "string"
					}
				},
				"required": [
					"line_no",
					"base",
					"charges",
					"total",
					"unit",
					"stocked",
					"vat"
				],
				"type": "object"
			},
			"Create-purchase-orderRequest": {
				"additionalProperties": false,
				"properties": {
					"from_builds": {
						"description": "Fill it from what the unfinished products of build orders are short of.",
						"type": "boolean"
					},
					"note": {
						"type": "string"
					},
					"vendor": {
						"type": "string"
					}
				},
				"required": [
					"vendor"
				],
				"type": "object"
			},
			"Create-purchase-orderResponse": {
				"additionalProperties": false,
				"properties": {
					"lines": {
						"format": "int64",
						"type": "integer"
					},
					"number": {
						"type": "string"
					}
				},
				"required": [
					"number",
					"lines"
				],
				"type": "object"
			},
			"CreatePartInputBody": {
				"additionalProperties": false,
				"properties": {
					"attrs": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "What the number was suggested from. Never parsed back out of the number.",
						"type": "object"
					},
					"class": {
						"description": "material and goods are bought, semi and product are made here. Must agree with made when both are sent.",
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"composition": {
						"description": "Whether it is made of other parts. Defaults to none: bought, or otherwise not built from anything.",
						"enum": [
							"none",
							"composed"
						],
						"type": "string"
					},
					"customer": {
						"description": "Whose it is, by customer code. Optional.",
						"type": "string"
					},
					"customer_owned": {
						"description": "Material a customer supplied: counted and consumed, never valued or posted. Bought classes only; settled at the first movement.",
						"type": "boolean"
					},
					"description": {
						"description": "Optional. A part number that already says what the thing is does not need a sentence repeating it.",
						"type": "string"
					},
					"ean": {
						"description": "The manufacturer's EAN or UPC, check digit and all. Unique in the company.",
						"type": "string"
					},
					"for_customer": {
						"description": "Made from a customer's material for that customer, and the customer's: a service, whose value added is work in progress until it is handed over. Semi-finished and finished products only; settled at the first movement.",
						"type": "boolean"
					},
					"kind": {
						"description": "The code of one of the company's kinds of part. Defaults to electronic. attrs keeps only the fields that kind has.",
						"type": "string"
					},
					"labour_rate_per_hour": {
						"description": "Read only for a part made here.",
						"type": "string"
					},
					"machine_rate_per_hour": {
						"description": "Read only for a part made here. Empty takes the company's own rate for a made class.",
						"type": "string"
					},
					"made": {
						"description": "Built here rather than bought. Without a class: a product (123) when made, material (112) when bought.",
						"type": "boolean"
					},
					"min_stock": {
						"description": "What the free stock should not fall below. Absent keeps it, empty clears it.",
						"type": "string"
					},
					"off_balance_value": {
						"description": "What one unit of a customer's material is worth in the off-balance-sheet records, as the customer's contract or delivery note gives it. Optional; ignored on the company's own part. Never in the average, a lot or the posting proposal.",
						"type": "string"
					},
					"order_up_to": {
						"description": "How far an order should bring it; empty is up to the reorder point.",
						"type": "string"
					},
					"overhead_pct_on_material": {
						"description": "As a fraction: 0.15 is fifteen per cent. Read only for a part made here.",
						"type": "string"
					},
					"pn": {
						"description": "Written by a person, and one character of it a letter or a digit. No slash: see docs/part-numbers.md.",
						"pattern": "^[A-Z0-9._-]{1,64}$",
						"type": "string"
					},
					"reorder_point": {
						"description": "When to order it, typed; empty lets Manufik work it out from the minimum, the consumption and the lead time.",
						"type": "string"
					},
					"sale_price": {
						"description": "What one is sold for, in the company's currency and net of its own VAT. Optional; posted nowhere.",
						"type": "string"
					},
					"serial_mask": {
						"description": "Optional, and it only warns: when a particular piece carries a different format, the system has no business arguing.",
						"type": "string"
					},
					"serialized": {
						"type": "boolean"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"unit": {
						"description": "A base unit from the controlled list.",
						"minLength": 1,
						"type": "string"
					},
					"url": {
						"description": "A datasheet, the manufacturer's page, a drawing. Opened in a new tab; never fetched.",
						"type": "string"
					},
					"vendors": {
						"items": {
							"$ref": "#/components/schemas/VendorPartInput"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"pn",
					"unit"
				],
				"type": "object"
			},
			"CustomerBody": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address"
					},
					"code": {
						"type": "string"
					},
					"contact": {
						"type": "string"
					},
					"country": {
						"description": "ISO 3166 alpha-2. Empty is the company's own, which decides how the identifier is checked.",
						"type": "string"
					},
					"ico": {
						"description": "The identifier in the customer's own register, checked by their country: in CZ eight digits with a check digit. Spaces and missing leading zeros are forgiven.",
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"vat_id": {
						"description": "The VAT identification number with its country prefix.",
						"type": "string"
					}
				},
				"required": [
					"code",
					"name"
				],
				"type": "object"
			},
			"CustomerPatch": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address",
						"description": "Replaced whole when sent, its three parts together. Absent keeps it."
					},
					"code": {
						"description": "Ignored: the code is the path's, and does not change. Optional.",
						"type": "string"
					},
					"contact": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"country": {
						"description": "ISO 3166 alpha-2. Empty is the company's own, which decides how the identifier is checked. Absent keeps it.",
						"type": "string"
					},
					"ico": {
						"description": "The identifier in the customer's own register, checked by their country: in CZ eight digits with a check digit. Spaces and missing leading zeros are forgiven. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"name": {
						"description": "Absent keeps it; it cannot be cleared.",
						"type": "string"
					},
					"note": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"vat_id": {
						"description": "The VAT identification number with its country prefix. Absent keeps it; empty clears it.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"CustomerRow": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address"
					},
					"code": {
						"type": "string"
					},
					"contact": {
						"type": "string"
					},
					"country": {
						"type": "string"
					},
					"ico": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"open": {
						"description": "Of those, the ones not finished: a product neither made nor cancelled, or a line from stock neither cancelled nor all handed over.",
						"format": "int64",
						"type": "integer"
					},
					"orders": {
						"description": "Build orders for them. One is enough to stop them being removed.",
						"format": "int64",
						"type": "integer"
					},
					"vat_id": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"name",
					"orders",
					"open"
				],
				"type": "object"
			},
			"CustomerStockLine": {
				"additionalProperties": false,
				"properties": {
					"customer_code": {
						"type": "string"
					},
					"customer_name": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"off_balance_unit_value": {
						"description": "What one is worth in the off-balance-sheet records, as the part says: the customer's contract or delivery note. Absent when nobody said.",
						"type": "string"
					},
					"off_balance_value": {
						"description": "The quantity at that value, to the haléř. Absent when the part has no value said. In no total of the company's stock.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"customer_code",
					"customer_name",
					"pn",
					"description",
					"unit",
					"qty"
				],
				"type": "object"
			},
			"DeliveryInput": {
				"additionalProperties": false,
				"properties": {
					"customer": {
						"description": "Customer code. Their name, Company ID, VAT ID and address are copied onto the goods issue as they are today. On a correction, the customer of the revision corrected keeps the copy made then; empty means the goods issue went to nobody.",
						"type": "string"
					},
					"customer_ref": {
						"description": "Their number for what they ordered.",
						"type": "string"
					},
					"job": {
						"description": "The build order it was issued from, by number.",
						"type": "string"
					},
					"note": {
						"type": "string"
					}
				},
				"required": [
					"customer"
				],
				"type": "object"
			},
			"DeliveryNoteRef": {
				"additionalProperties": false,
				"properties": {
					"cancelled": {
						"type": "boolean"
					},
					"id": {
						"type": "string"
					},
					"note_no": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"note_no",
					"cancelled"
				],
				"type": "object"
			},
			"DeliveryRow": {
				"additionalProperties": false,
				"properties": {
					"customer": {
						"description": "The customer's code today; empty when it was never known, or on a superseded revision whose customer has since been removed — the copy beside it stays.",
						"type": "string"
					},
					"customer_address": {
						"$ref": "#/components/schemas/Address"
					},
					"customer_country": {
						"description": "ISO 3166 alpha-2, the customer's or else the company's, copied with the rest.",
						"type": "string"
					},
					"customer_ico": {
						"type": "string"
					},
					"customer_name": {
						"type": "string"
					},
					"customer_ref": {
						"type": "string"
					},
					"customer_vat_id": {
						"type": "string"
					},
					"job_id": {
						"type": "string"
					},
					"job_no": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"notes": {
						"items": {
							"$ref": "#/components/schemas/DeliveryNoteRef"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"customer",
					"customer_name",
					"notes"
				],
				"type": "object"
			},
			"DisposalInput": {
				"additionalProperties": false,
				"properties": {
					"damage": {
						"description": "Disposed of because it was damaged or destroyed. Then it is damage — deductible up to its compensation, or in full on the police's or a disaster's document — rather than a disposal of stock nobody needs, whatever the reason.",
						"type": "boolean"
					},
					"disposed_at": {
						"description": "When.",
						"format": "date-time",
						"type": "string"
					},
					"method": {
						"description": "How it was disposed of.",
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"outcome": {
						"description": "What became of the items. The law asks for this as well as the method.",
						"type": "string"
					},
					"place": {
						"description": "Where.",
						"type": "string"
					},
					"reason": {
						"description": "Why the stock was disposed of.",
						"type": "string"
					},
					"responsible": {
						"description": "Who was responsible — people, not users: they may have no account here.",
						"type": "string"
					}
				},
				"required": [
					"reason",
					"method",
					"disposed_at",
					"place",
					"outcome",
					"responsible"
				],
				"type": "object"
			},
			"DocumentLineInput": {
				"additionalProperties": false,
				"properties": {
					"duzp": {
						"description": "The date that tax belongs to, YYYY-MM-DD. Required with vat_amount.",
						"type": "string"
					},
					"kind": {
						"enum": [
							"opening",
							"receipt",
							"issue",
							"output",
							"adjustment",
							"scrap",
							"return_vendor",
							"transfer_in",
							"transfer_out",
							"revaluation",
							"return_production",
							"return_customer"
						],
						"type": "string"
					},
					"location": {
						"description": "Bin code within the company.",
						"type": "string"
					},
					"ordinal": {
						"description": "The line's number on the document, which a return names it by. A correction sends each line's own, so a removed line above does not renumber the rest. Absent: the next number after the highest stated, or the line's position when no line states one. Two lines with one number are refused: document.duplicate_line.",
						"format": "int64",
						"minimum": 1,
						"type": "integer"
					},
					"pn": {
						"description": "The part's number.",
						"type": "string"
					},
					"qty": {
						"description": "Signed, in the part's base unit. A string, not a number.",
						"type": "string"
					},
					"serial": {
						"type": "string"
					},
					"source": {
						"$ref": "#/components/schemas/LineSourceInput"
					},
					"value": {
						"description": "Stated value, where the kind takes one. Absent is not zero: zero is what an invoice from a supplier not VAT registered says.",
						"type": "string"
					},
					"vat_amount": {
						"description": "VAT paid on this opening line, for § 79 ZDPH. Only on an opening line. On a correction, absent carries the tax of the line it replaces, for the quantity the line now holds; \"0\" says the line carries none.",
						"type": "string"
					}
				},
				"required": [
					"pn",
					"location",
					"kind",
					"qty"
				],
				"type": "object"
			},
			"DocumentLineRow": {
				"additionalProperties": false,
				"properties": {
					"avg_after": {
						"type": "string"
					},
					"consumed_value": {
						"type": "string"
					},
					"declared_value": {
						"description": "What the document stated. Absent is not zero.",
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"duzp": {
						"type": "string"
					},
					"kind": {
						"type": "string"
					},
					"location": {
						"type": "string"
					},
					"ordinal": {
						"format": "int64",
						"type": "integer"
					},
					"original_value": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"qty_after": {
						"type": "string"
					},
					"serial": {
						"type": "string"
					},
					"source_document_id": {
						"type": "string"
					},
					"source_document_no": {
						"type": "string"
					},
					"source_line": {
						"format": "int64",
						"type": "integer"
					},
					"total_cost": {
						"description": "Signed, like the document's own value.",
						"type": "string"
					},
					"unit": {
						"type": "string"
					},
					"unit_cost": {
						"description": "Per unit, never negative: direction is in the quantity.",
						"type": "string"
					},
					"value_after": {
						"type": "string"
					},
					"vat_amount": {
						"type": "string"
					}
				},
				"required": [
					"ordinal",
					"pn",
					"description",
					"unit",
					"location",
					"kind",
					"qty"
				],
				"type": "object"
			},
			"DocumentPreview": {
				"additionalProperties": false,
				"properties": {
					"lines": {
						"items": {
							"$ref": "#/components/schemas/DocumentPreviewLine"
						},
						"type": [
							"array",
							"null"
						]
					},
					"value": {
						"description": "What the document would do to the value of stock, at cost. Signed, so a transformation of one part into another comes back at about nothing.",
						"type": "string"
					}
				},
				"required": [
					"lines",
					"value"
				],
				"type": "object"
			},
			"DocumentPreviewLine": {
				"additionalProperties": false,
				"properties": {
					"basis": {
						"description": "The costing behaviour that values this line: in_declared, in_at_average, in_computed, out_at_average, out_declared, revalue, skip, in_at_source or adjust_price.",
						"type": "string"
					},
					"ordinal": {
						"format": "int64",
						"type": "integer"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"ordinal",
					"basis"
				],
				"type": "object"
			},
			"DocumentRow": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"type": "string"
					},
					"accounting_no": {
						"type": "string"
					},
					"actor": {
						"type": "string"
					},
					"deleted_at": {
						"description": "When it was taken out of the books. It still exists and still holds its number; it no longer replays.",
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"draft": {
						"type": "boolean"
					},
					"duzp": {
						"type": "string"
					},
					"from_location": {
						"type": "string"
					},
					"held_by": {
						"description": "The number of the delivery note, not cancelled, issued from this goods issue. While it stands, the goods issue can be neither corrected nor deleted.",
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"lines": {
						"description": "The lines the document was written with: a receipt's invoice lines, consumables included, and a transfer's lines once — not its two movements each.",
						"format": "int64",
						"type": "integer"
					},
					"occurred_at": {
						"type": "string"
					},
					"placement": {
						"description": "Where the document stands on its day. Two documents of the same accounting date are read, and listed, in this order.",
						"format": "int64",
						"type": "integer"
					},
					"produced": {
						"description": "Written by a build or a stock count rather than by a person; corrected at its source and never deleted.",
						"type": "boolean"
					},
					"purchase_order": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"recorded_at": {
						"type": "string"
					},
					"reference": {
						"type": "string"
					},
					"revision": {
						"description": "1 for an original, 2 for its first correction, and so on.",
						"format": "int64",
						"type": "integer"
					},
					"screen": {
						"enum": [
							"document",
							"receipt"
						],
						"type": "string"
					},
					"series": {
						"description": "The number series a goods issue was numbered from where its company numbers one leaving it apart — issue_external (WZ) or issue (RW) in Poland. Absent elsewhere, on every other type and on an issue posted before the series existed.",
						"type": "string"
					},
					"superseded": {
						"description": "A later revision replaced this one. It stays in the ledger and does not replay.",
						"type": "boolean"
					},
					"supplier_doc_no": {
						"type": "string"
					},
					"to_location": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"value": {
						"description": "What the document did to the value of stock, at cost. Signed, so a column of these sums.",
						"type": "string"
					},
					"vat": {
						"description": "A receipt's tax, on its lines and its charges, in the company's currency.",
						"type": "string"
					},
					"vendor": {
						"type": "string"
					},
					"vendor_removed": {
						"type": "boolean"
					},
					"without_invoice": {
						"description": "A receipt still waiting for its invoice: neither a correction nor a price adjustment in force has entered it.",
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"document_no",
					"type",
					"revision",
					"superseded",
					"produced",
					"occurred_at",
					"accounting_date",
					"placement",
					"recorded_at",
					"lines",
					"value",
					"draft"
				],
				"type": "object"
			},
			"DraftBody": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"description": "YYYY-MM-DD. Empty is legitimate: a draft is half-typed by definition.",
						"type": "string"
					},
					"lines": {
						"description": "The form's own line shape. Half-typed values are legitimate here.",
						"items": {},
						"type": [
							"array",
							"null"
						]
					},
					"reason": {
						"type": "string"
					},
					"receipt": {
						"description": "The form's own state beside its lines, in the form's own shape. The receipt screen's: vendor, invoice, dates, currency, order and charges; the document form's: who a goods issue goes to, a scrap's disposal record, and whether an opening is already in the books."
					},
					"reference": {
						"type": "string"
					},
					"screen": {
						"description": "The form that wrote it. Absent on drafts older than the field.",
						"enum": [
							"document",
							"receipt"
						],
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"updated_at": {
						"description": "When it was last saved, as get-draft answers it. Sent back with save-draft, it refuses a save over a draft somebody saved or removed since: 409 draft.changed_meanwhile.",
						"type": "string"
					}
				},
				"required": [
					"type",
					"lines"
				],
				"type": "object"
			},
			"DraftRow": {
				"additionalProperties": false,
				"properties": {
					"actor": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"lines": {
						"format": "int64",
						"type": "integer"
					},
					"updated_at": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"lines",
					"updated_at"
				],
				"type": "object"
			},
			"ErrorDetail": {
				"additionalProperties": false,
				"properties": {
					"location": {
						"description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
						"type": "string"
					},
					"message": {
						"description": "Error message text",
						"type": "string"
					},
					"value": {
						"description": "The value at the given location"
					}
				},
				"type": "object"
			},
			"EventRow": {
				"additionalProperties": false,
				"properties": {
					"at": {
						"format": "date-time",
						"type": "string"
					},
					"id": {
						"description": "Rising within a company, in the order things happened. What to ask the feed for the events after.",
						"format": "int64",
						"type": "integer"
					},
					"subject": {
						"description": "What it is about, as the API names it: a document's id and number, a part's number. Read the rest with the key."
					},
					"type": {
						"description": "What happened: document.posted, part.changed, …",
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"at",
					"subject"
				],
				"type": "object"
			},
			"Fault": {
				"additionalProperties": false,
				"properties": {
					"code": {
						"description": "Stable identifier for this refusal, for a client that wants to say it in its own words",
						"type": "string"
					},
					"detail": {
						"description": "A human-readable explanation specific to this occurrence of the problem.",
						"examples": [
							"Property foo is required but is missing."
						],
						"type": "string"
					},
					"errors": {
						"description": "Optional list of individual error details",
						"items": {
							"$ref": "#/components/schemas/ErrorDetail"
						},
						"type": [
							"array",
							"null"
						]
					},
					"instance": {
						"description": "A URI reference that identifies the specific occurrence of the problem.",
						"examples": [
							"https://example.com/error-log/abc123"
						],
						"format": "uri",
						"type": "string"
					},
					"line": {
						"description": "Which line of the submitted document the refusal is about: the number the request gave it where it gave one — a receipt line's line_no, a document line's ordinal — and otherwise its place among the lines sent, counting from 1.",
						"format": "int64",
						"type": "integer"
					},
					"params": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "Values referenced by the message for this code",
						"type": "object"
					},
					"status": {
						"description": "HTTP status code",
						"examples": [
							400
						],
						"format": "int64",
						"type": "integer"
					},
					"title": {
						"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
						"examples": [
							"Bad Request"
						],
						"type": "string"
					},
					"type": {
						"default": "about:blank",
						"description": "A URI reference to human-readable documentation for the error.",
						"examples": [
							"https://example.com/errors/example"
						],
						"format": "uri",
						"type": "string"
					}
				},
				"type": "object"
			},
			"FeedOutputBody": {
				"additionalProperties": false,
				"properties": {
					"events": {
						"items": {
							"$ref": "#/components/schemas/EventRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"next": {
						"description": "Present when there is more: ask again with after set to this.",
						"type": "string"
					}
				},
				"required": [
					"events"
				],
				"type": "object"
			},
			"Get-purchase-orderResponse": {
				"additionalProperties": false,
				"properties": {
					"format": {
						"description": "How this vendor takes a list.",
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/PurchaseLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"list": {
						"description": "Ready to paste. Only the lines the vendor has a number for.",
						"type": "string"
					},
					"order": {
						"$ref": "#/components/schemas/PurchaseRow"
					},
					"receipt_documents": {
						"description": "The goods receipts naming the order, as they now stand, oldest first — the documents order.receipts counts.",
						"items": {
							"$ref": "#/components/schemas/PurchaseReceiptRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"sources": {
						"description": "The bills of materials it was filled from, oldest first.",
						"items": {
							"$ref": "#/components/schemas/PurchaseSourceRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"unknown": {
						"description": "Lines they have no number for, which is why they are not on the list.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"order",
					"lines",
					"format",
					"list",
					"unknown",
					"sources",
					"receipt_documents"
				],
				"type": "object"
			},
			"Get-vendorResponse": {
				"additionalProperties": false,
				"properties": {
					"parts": {
						"items": {
							"$ref": "#/components/schemas/VendorPartRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"vendor": {
						"$ref": "#/components/schemas/VendorRow"
					}
				},
				"required": [
					"vendor",
					"parts"
				],
				"type": "object"
			},
			"GetBOMOutputBody": {
				"additionalProperties": false,
				"properties": {
					"description": {
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/BomLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"note": {
						"description": "The note of the revision shown.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"rev": {
						"type": "string"
					},
					"revisions": {
						"items": {
							"$ref": "#/components/schemas/RevisionSummary"
						},
						"type": [
							"array",
							"null"
						]
					},
					"status": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"rev",
					"status",
					"revisions",
					"lines"
				],
				"type": "object"
			},
			"GetDocumentOutputBody": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"type": "string"
					},
					"actor": {
						"type": "string"
					},
					"consumption_no": {
						"description": "The number from the issue series a build's consumption was given when it was posted — Poland's RW beside the build's PW. Absent elsewhere, on every other type and on a build posted before migration 260.",
						"type": "string"
					},
					"delete_reason": {
						"description": "Why it was taken out of the books, as the person who did it said. Absent on a document deleted before the reason was asked.",
						"type": "string"
					},
					"deleted_at": {
						"description": "When it was taken out of the books. It still exists and still holds its number; it no longer replays.",
						"type": "string"
					},
					"delivery": {
						"$ref": "#/components/schemas/DeliveryRow"
					},
					"document_no": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/DocumentLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"occurred_at": {
						"type": "string"
					},
					"opening": {
						"$ref": "#/components/schemas/OpeningRow"
					},
					"placement": {
						"description": "Where the document stands on its day. Two documents of the same accounting date are read, and listed, in this order.",
						"format": "int64",
						"type": "integer"
					},
					"produced": {
						"description": "Written by a build or a stock count rather than by a person; corrected at its source and never deleted.",
						"type": "boolean"
					},
					"reason": {
						"type": "string"
					},
					"recorded_at": {
						"type": "string"
					},
					"reference": {
						"type": "string"
					},
					"revision": {
						"format": "int64",
						"type": "integer"
					},
					"revisions": {
						"description": "Every revision under this number, oldest first.",
						"items": {
							"$ref": "#/components/schemas/RevisionRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"series": {
						"description": "The number series a goods issue was numbered from where its company numbers one leaving it apart — issue_external (WZ) or issue (RW) in Poland. Absent elsewhere, on every other type and on an issue posted before the series existed.",
						"type": "string"
					},
					"superseded": {
						"type": "boolean"
					},
					"type": {
						"type": "string"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"document_no",
					"type",
					"revision",
					"superseded",
					"produced",
					"occurred_at",
					"accounting_date",
					"placement",
					"recorded_at",
					"value",
					"lines",
					"revisions"
				],
				"type": "object"
			},
			"GetLocationOutputBody": {
				"additionalProperties": false,
				"properties": {
					"available": {
						"type": "boolean"
					},
					"code": {
						"type": "string"
					},
					"lines": {
						"description": "Parts with a non-zero quantity here.",
						"items": {
							"$ref": "#/components/schemas/BinLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"reachable": {
						"description": "available, and so is every warehouse above it",
						"type": "boolean"
					},
					"warehouse": {
						"type": "string"
					},
					"warehouse_path": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"warehouse",
					"warehouse_path",
					"available",
					"reachable",
					"lines"
				],
				"type": "object"
			},
			"GetPartCostOutputBody": {
				"additionalProperties": false,
				"properties": {
					"average": {
						"description": "The part's weighted average as the parts list shows it: after its last movement of any kind, zero when it holds nothing.",
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/CostLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"pn": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"unit",
					"average",
					"lines"
				],
				"type": "object"
			},
			"GetPartStockOutputBody": {
				"additionalProperties": false,
				"properties": {
					"locations": {
						"description": "Bins holding a non-zero quantity of it, by code.",
						"items": {
							"$ref": "#/components/schemas/PartPlaceRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"pn": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"locations"
				],
				"type": "object"
			},
			"GetSerialOutputBody": {
				"additionalProperties": false,
				"properties": {
					"description": {
						"type": "string"
					},
					"location": {
						"type": "string"
					},
					"movements": {
						"description": "Every time this piece moved, oldest first.",
						"items": {
							"$ref": "#/components/schemas/SerialMovementRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"on_hand": {
						"type": "boolean"
					},
					"pn": {
						"type": "string"
					},
					"serial": {
						"type": "string"
					}
				},
				"required": [
					"serial",
					"pn",
					"description",
					"on_hand",
					"movements"
				],
				"type": "object"
			},
			"HeldAccounts": {
				"additionalProperties": false,
				"properties": {
					"goods": {
						"type": "string"
					},
					"material": {
						"description": "Empty: the class's own account.",
						"type": "string"
					},
					"product": {
						"type": "string"
					},
					"semi": {
						"type": "string"
					},
					"wip": {
						"description": "Work in progress whose work is here: 121.9xx. Empty: the company's own.",
						"type": "string"
					}
				},
				"required": [
					"material",
					"goods",
					"semi",
					"product",
					"wip"
				],
				"type": "object"
			},
			"LineSourceInput": {
				"additionalProperties": false,
				"properties": {
					"document_no": {
						"description": "The document's number, e.g. PR-2026-0007.",
						"type": "string"
					},
					"line": {
						"description": "The line: a receipt's line number, or the ordinal on the document.",
						"format": "int64",
						"minimum": 1,
						"type": "integer"
					}
				},
				"required": [
					"document_no",
					"line"
				],
				"type": "object"
			},
			"List-build-jobsResponse": {
				"additionalProperties": false,
				"properties": {
					"jobs": {
						"items": {
							"$ref": "#/components/schemas/BuildJobRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"jobs"
				],
				"type": "object"
			},
			"List-customersResponse": {
				"additionalProperties": false,
				"properties": {
					"customers": {
						"items": {
							"$ref": "#/components/schemas/CustomerRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"customers"
				],
				"type": "object"
			},
			"List-draftsResponse": {
				"additionalProperties": false,
				"properties": {
					"drafts": {
						"items": {
							"$ref": "#/components/schemas/DraftRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"drafts"
				],
				"type": "object"
			},
			"List-part-vendorsResponse": {
				"additionalProperties": false,
				"properties": {
					"vendors": {
						"items": {
							"$ref": "#/components/schemas/PartVendorRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"vendors"
				],
				"type": "object"
			},
			"List-purchase-ordersResponse": {
				"additionalProperties": false,
				"properties": {
					"orders": {
						"items": {
							"$ref": "#/components/schemas/PurchaseRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"orders"
				],
				"type": "object"
			},
			"List-reasonsResponse": {
				"additionalProperties": false,
				"properties": {
					"reasons": {
						"items": {
							"$ref": "#/components/schemas/ReasonRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"reasons"
				],
				"type": "object"
			},
			"List-unitsResponse": {
				"additionalProperties": false,
				"properties": {
					"units": {
						"items": {
							"$ref": "#/components/schemas/UnitRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"units"
				],
				"type": "object"
			},
			"List-vendorsResponse": {
				"additionalProperties": false,
				"properties": {
					"vendors": {
						"items": {
							"$ref": "#/components/schemas/VendorRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"vendors"
				],
				"type": "object"
			},
			"List-warehousesResponse": {
				"additionalProperties": false,
				"properties": {
					"warehouses": {
						"items": {
							"$ref": "#/components/schemas/WarehouseRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"warehouses"
				],
				"type": "object"
			},
			"ListBuildsOutputBody": {
				"additionalProperties": false,
				"properties": {
					"builds": {
						"items": {
							"$ref": "#/components/schemas/BuildRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"builds"
				],
				"type": "object"
			},
			"ListDocumentsOutputBody": {
				"additionalProperties": false,
				"properties": {
					"documents": {
						"items": {
							"$ref": "#/components/schemas/DocumentRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"drafts": {
						"description": "How many of them are still being typed.",
						"format": "int64",
						"type": "integer"
					},
					"next": {
						"description": "Where this block ended. Absent on the last one.",
						"type": "string"
					},
					"total": {
						"description": "Posted documents the filter matches, drafts aside. On the first block only; later ones repeat nothing.",
						"format": "int64",
						"type": "integer"
					},
					"truncated": {
						"description": "There are more: ask again with after set to next.",
						"type": "boolean"
					},
					"value_rounded_total": {
						"description": "Sum of value over the same documents with each rounded to two places first: what the rows add up to as printed. value_total rounded to two places, less this, is the rounding difference. First block only.",
						"type": "string"
					},
					"value_total": {
						"description": "Sum of value over every document the filter matches. First block only.",
						"type": "string"
					},
					"vat_total": {
						"description": "Sum of the VAT on the receipts in force the filter matches, in the company's currency: a superseded or deleted revision's is not in it, as its value is not in value_total. First block only.",
						"type": "string"
					}
				},
				"required": [
					"documents",
					"truncated",
					"total",
					"drafts"
				],
				"type": "object"
			},
			"ListLocationsOutputBody": {
				"additionalProperties": false,
				"properties": {
					"locations": {
						"items": {
							"$ref": "#/components/schemas/LocationRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"locations"
				],
				"type": "object"
			},
			"ListMadeOutputBody": {
				"additionalProperties": false,
				"properties": {
					"parts": {
						"items": {
							"$ref": "#/components/schemas/MadePartRow"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"parts"
				],
				"type": "object"
			},
			"ListPartsOutputBody": {
				"additionalProperties": false,
				"properties": {
					"parts": {
						"items": {
							"$ref": "#/components/schemas/PartView"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"parts"
				],
				"type": "object"
			},
			"ListSerialsOutputBody": {
				"additionalProperties": false,
				"properties": {
					"next": {
						"description": "Where this block ended. Absent on the last one.",
						"type": "string"
					},
					"serials": {
						"items": {
							"$ref": "#/components/schemas/SerialRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"total": {
						"description": "Pieces the filter matches. On the first block only.",
						"format": "int64",
						"type": "integer"
					},
					"truncated": {
						"description": "There are more: ask again with after set to next.",
						"type": "boolean"
					}
				},
				"required": [
					"serials",
					"truncated",
					"total"
				],
				"type": "object"
			},
			"LocationRow": {
				"additionalProperties": false,
				"properties": {
					"available": {
						"type": "boolean"
					},
					"code": {
						"type": "string"
					},
					"held_state": {
						"description": "The EU member state of the vendor or customer holding this bin's warehouse — its country, else the prefix of its VAT ID. Absent for a bin the company holds itself, one a named person holds, and one held outside the Union.",
						"type": "string"
					},
					"parts": {
						"description": "How many parts lie here now: those whose quantity at this bin is not zero.",
						"format": "int64",
						"type": "integer"
					},
					"reachable": {
						"type": "boolean"
					},
					"used": {
						"description": "Whether any movement names this bin, on any document or revision; a bin that is used cannot be removed, empty or not.",
						"type": "boolean"
					},
					"warehouse": {
						"type": "string"
					},
					"warehouse_name": {
						"type": "string"
					},
					"warehouse_path": {
						"type": "string"
					},
					"writable": {
						"type": "boolean"
					}
				},
				"required": [
					"code",
					"warehouse",
					"warehouse_name",
					"warehouse_path",
					"available",
					"reachable",
					"parts",
					"used",
					"writable"
				],
				"type": "object"
			},
			"MadePartRow": {
				"additionalProperties": false,
				"properties": {
					"buildable": {
						"description": "How many could be made from what is on hand now, sub-assemblies on the shelf used first — the plan's own figure.",
						"type": "string"
					},
					"composition": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"drawn": {
						"description": "Whether the released revision has a fitted line — one neither DNP nor left out of the bill of materials. An order unfolds such a product into its components; any other goes on as itself.",
						"type": "boolean"
					},
					"in_build": {
						"description": "Ordered to be made: products of build orders not yet completed.",
						"type": "string"
					},
					"latest": {
						"type": "string"
					},
					"lines": {
						"description": "Components on the latest revision.",
						"format": "int64",
						"type": "integer"
					},
					"material": {
						"description": "What one costs in material — bought components at today's average, one that is out of stock at the average its last pieces left at, sub-assemblies at what making one costs. Absent for a part with no revision, for a bill of materials that contains itself, and for a role that reads neither the parts, the reports, the drawings nor the builds.",
						"type": "string"
					},
					"on_hand": {
						"type": "string"
					},
					"ordered": {
						"description": "Still coming, from orders already sent.",
						"type": "string"
					},
					"planned_lines": {
						"description": "Components on the revision a product of a build order, the buildable quantity and the calculation read: the released one, else the newest draft. Differs from lines while a new draft is open beside a released revision.",
						"format": "int64",
						"type": "integer"
					},
					"pn": {
						"type": "string"
					},
					"released": {
						"description": "The released revision, if there is one. A draft is a bill of materials still being written; a released revision is what a product of a build order may consume.",
						"type": "string"
					},
					"revisions": {
						"format": "int64",
						"type": "integer"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"revisions",
					"latest",
					"lines",
					"planned_lines",
					"drawn",
					"on_hand",
					"ordered",
					"buildable",
					"in_build",
					"composition"
				],
				"type": "object"
			},
			"OpenBuildJobInputBody": {
				"additionalProperties": false,
				"properties": {
					"customer": {
						"description": "Customer code. Empty means for stock.",
						"type": "string"
					},
					"due_on": {
						"description": "YYYY-MM-DD. When the customer is expecting it.",
						"type": "string"
					},
					"lines": {
						"description": "The products, each reserved, started and completed on its own.",
						"items": {
							"$ref": "#/components/schemas/BuildJobLineInput"
						},
						"type": [
							"array",
							"null"
						]
					},
					"note": {
						"type": "string"
					},
					"reference": {
						"description": "Their number for it.",
						"type": "string"
					},
					"reserve_until": {
						"description": "YYYY-MM-DD. The last day its lines from stock are held; empty is until cancelled.",
						"type": "string"
					},
					"stock": {
						"description": "Parts taken from stock rather than made. A build order has at least one product or one of these.",
						"items": {
							"$ref": "#/components/schemas/BuildJobStockInput"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"type": "object"
			},
			"OpenedBuildJobOutputBody": {
				"additionalProperties": false,
				"properties": {
					"id": {
						"type": "string"
					},
					"job_no": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"job_no"
				],
				"type": "object"
			},
			"OpeningInput": {
				"additionalProperties": false,
				"properties": {
					"already_in_books": {
						"description": "The stock is already in the company's books, so the posting proposal leaves the document out. The movements and their value are the same either way.",
						"type": "boolean"
					}
				},
				"required": [
					"already_in_books"
				],
				"type": "object"
			},
			"OpeningRow": {
				"additionalProperties": false,
				"properties": {
					"already_in_books": {
						"type": "boolean"
					}
				},
				"required": [
					"already_in_books"
				],
				"type": "object"
			},
			"PartLink": {
				"additionalProperties": false,
				"properties": {
					"name": {
						"type": "string"
					},
					"sku": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"vendor": {
						"type": "string"
					}
				},
				"required": [
					"vendor",
					"name",
					"sku",
					"url"
				],
				"type": "object"
			},
			"PartPlaceRow": {
				"additionalProperties": false,
				"properties": {
					"available": {
						"type": "boolean"
					},
					"code": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"reachable": {
						"description": "available, and so is every warehouse above it",
						"type": "boolean"
					},
					"warehouse": {
						"type": "string"
					},
					"warehouse_path": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"warehouse",
					"warehouse_path",
					"available",
					"reachable",
					"qty"
				],
				"type": "object"
			},
			"PartVendorRow": {
				"additionalProperties": false,
				"properties": {
					"barcode": {
						"type": "string"
					},
					"mpn": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"pack_label": {
						"type": "string"
					},
					"pack_size": {
						"type": "string"
					},
					"sku": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"vendor": {
						"type": "string"
					}
				},
				"required": [
					"vendor",
					"name",
					"sku",
					"pack_size"
				],
				"type": "object"
			},
			"PartView": {
				"additionalProperties": false,
				"properties": {
					"attrs": {
						"additionalProperties": {
							"type": "string"
						},
						"type": "object"
					},
					"average": {
						"description": "Weighted average unit cost. Empty, like value, for a reader who may not read money.",
						"type": "string"
					},
					"bin": {
						"description": "The bin holding it, when there is exactly one. Empty when it is nowhere or in several.",
						"type": "string"
					},
					"bins": {
						"description": "How many bins hold a non-zero quantity of it, available or not.",
						"format": "int64",
						"type": "integer"
					},
					"class": {
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"composition": {
						"type": "string"
					},
					"customer": {
						"description": "Whose it is: the customer's code.",
						"type": "string"
					},
					"customer_owned": {
						"type": "boolean"
					},
					"description": {
						"type": "string"
					},
					"ean": {
						"type": "string"
					},
					"for_customer": {
						"description": "Made from a customer's material for that customer, and the customer's: a service, whose value added is work in progress until it is handed over. Semi-finished and finished products only; settled at the first movement.",
						"type": "boolean"
					},
					"free": {
						"type": "string"
					},
					"held": {
						"type": "string"
					},
					"in_bom": {
						"description": "Whether a bill of materials has it as a component.",
						"type": "boolean"
					},
					"kind": {
						"description": "The code of one of the company's kinds of part: electronic, other, or one it made.",
						"type": "string"
					},
					"labour_rate_per_hour": {
						"type": "string"
					},
					"last_location": {
						"description": "When no bin holds any of it: the bin it last left, if goods may be put there. Empty otherwise.",
						"type": "string"
					},
					"links": {
						"items": {
							"$ref": "#/components/schemas/PartLink"
						},
						"type": [
							"array",
							"null"
						]
					},
					"machine_rate_per_hour": {
						"type": "string"
					},
					"made": {
						"type": "boolean"
					},
					"min_stock": {
						"description": "What the free stock should not fall below.",
						"type": "string"
					},
					"moved": {
						"type": "boolean"
					},
					"off_balance_value": {
						"description": "What one unit of a customer's material is worth in the off-balance-sheet records, as the customer's contract or delivery note gives it. Absent when nobody said, and on the company's own parts.",
						"type": "string"
					},
					"on_hand": {
						"description": "Base units. A string, because a decimal that goes through a float is not the same decimal.",
						"type": "string"
					},
					"order_up_to": {
						"description": "How far an order should bring it.",
						"type": "string"
					},
					"ordered": {
						"type": "string"
					},
					"overhead_pct_on_material": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"reorder_point": {
						"description": "When to order, typed over the computed one.",
						"type": "string"
					},
					"sale_price": {
						"type": "string"
					},
					"serial_mask": {
						"description": "Warns; never refuses.",
						"type": "string"
					},
					"serialized": {
						"type": "boolean"
					},
					"sole_location": {
						"description": "The one bin this part's stock is in, when it is in exactly one. Empty otherwise.",
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"unit": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"value": {
						"description": "What the stock on hand is worth, in the company's currency. Empty for a reader whose role reads neither the parts nor the reports.",
						"type": "string"
					},
					"vendors": {
						"format": "int64",
						"type": "integer"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"on_hand",
					"value",
					"average",
					"serialized",
					"made",
					"class",
					"composition",
					"kind",
					"overhead_pct_on_material",
					"labour_rate_per_hour",
					"machine_rate_per_hour",
					"tags",
					"free",
					"held",
					"ordered",
					"vendors",
					"links",
					"moved",
					"customer_owned",
					"for_customer",
					"bins",
					"in_bom"
				],
				"type": "object"
			},
			"PostDocumentInputBody": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"description": "Which period it belongs to.",
						"format": "date",
						"type": "string"
					},
					"confirm": {
						"description": "Go ahead even though this moves figures already reported, or is dated ahead — or, on an opening not in the company's books, is dated after the first day of its accounting period (opening.mid_period).",
						"type": "boolean"
					},
					"delivery": {
						"$ref": "#/components/schemas/DeliveryInput",
						"description": "Who an issue went to: the customer, copied as they are today, their order number and the build order. Only on an issue."
					},
					"disposal": {
						"$ref": "#/components/schemas/DisposalInput",
						"description": "The disposal record of a scrap: required when the reason's chart row requires one, frozen once posted."
					},
					"lines": {
						"description": "At most 1000, but on an opening, which is a company's whole stock: more is refused as 422 document.too_many_lines.",
						"items": {
							"$ref": "#/components/schemas/DocumentLineInput"
						},
						"minItems": 1,
						"type": [
							"array",
							"null"
						]
					},
					"occurred_at": {
						"description": "When it physically happened. Defaults to now — the moment it is posted; a correction keeps the time of the revision it corrects.",
						"format": "date-time",
						"type": "string"
					},
					"opening": {
						"$ref": "#/components/schemas/OpeningInput",
						"description": "Whether this opening balance is already in the company's books. Only on an opening; absent is a document the posting proposal offers."
					},
					"position": {
						"description": "Where this goes among the documents already on its day. Asked with a 409 document.position when it matters; after them when not given.",
						"enum": [
							"before",
							"after"
						],
						"type": "string"
					},
					"reason": {
						"description": "Required on scrap and stocktake: it decides the account, and therefore the tax treatment.",
						"type": "string"
					},
					"reference": {
						"type": "string"
					},
					"type": {
						"description": "The kind of document. Completing a product and posting a stock count write their own documents; neither is posted here. Nor is a new receipt, which post-receipt posts with its vendor, DUZP, tax and invoice — a gift or a sample too, with its reason (422 receipt.own_form); receipt is here for the preview of a correction of a receipt posted before it had a form of its own.",
						"enum": [
							"opening",
							"receipt",
							"issue",
							"transfer",
							"scrap",
							"revaluation",
							"return_vendor",
							"return_production",
							"return_customer"
						],
						"type": "string"
					}
				},
				"required": [
					"type",
					"accounting_date",
					"lines"
				],
				"type": "object"
			},
			"PostDocumentOutputBody": {
				"additionalProperties": false,
				"properties": {
					"attached": {
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"revision": {
						"format": "int64",
						"type": "integer"
					}
				},
				"required": [
					"document_no",
					"id",
					"revision"
				],
				"type": "object"
			},
			"PreviewReceiptOutputBody": {
				"additionalProperties": false,
				"properties": {
					"charges": {
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/CostedLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"reclaimable_import_vat": {
						"description": "Import VAT a company that is VAT registered reclaims, left out of every line's value — a receivable, not stock.",
						"type": "string"
					},
					"total": {
						"type": "string"
					},
					"vat_payer": {
						"description": "Whether the tax on this receipt's DUZP is reclaimable. For a company not VAT registered it is part of what the stock cost.",
						"type": "boolean"
					}
				},
				"required": [
					"lines",
					"total",
					"charges",
					"vat_payer",
					"reclaimable_import_vat"
				],
				"type": "object"
			},
			"PurchaseLineRow": {
				"additionalProperties": false,
				"properties": {
					"average": {
						"description": "What one costs: the weighted average of what the part holds, and for a part that holds nothing the average its last pieces left at. Zero for a part that never had a price. Not a vendor's price.",
						"type": "string"
					},
					"bins": {
						"description": "Every bin holding a non-zero quantity of it, by code.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"build": {
						"description": "The product of a build order this line came from, when it came from one.",
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"missing": {
						"description": "What this order still waits for of it: the quantity less what was received, and never below nought — an over-delivery is not a negative order.",
						"type": "string"
					},
					"on_hand": {
						"type": "string"
					},
					"ordered": {
						"description": "Outstanding across every sent order, this one included.",
						"type": "string"
					},
					"pack_size": {
						"type": "string"
					},
					"packs": {
						"description": "Whole packs, rounded up: half a reel is not a thing they sell.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"description": "In the part's base unit.",
						"type": "string"
					},
					"received": {
						"description": "What the goods receipts naming this order took in of it, in force: a corrected receipt as it now stands, a deleted one not at all.",
						"type": "string"
					},
					"sku": {
						"description": "Empty when the vendor has no number for it, which is what stops it reaching their list.",
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"qty",
					"on_hand",
					"ordered",
					"average",
					"bins",
					"received",
					"missing"
				],
				"type": "object"
			},
			"PurchaseReceiptRow": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"description": "YYYY-MM-DD.",
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"document_no",
					"accounting_date"
				],
				"type": "object"
			},
			"PurchaseRow": {
				"additionalProperties": false,
				"properties": {
					"cancel_reason": {
						"type": "string"
					},
					"created_at": {
						"type": "string"
					},
					"expected_from": {
						"description": "What said so: the day written on the order, the vendor's lead time measured on its earlier orders, or the one typed on the vendor.",
						"enum": [
							"typed",
							"measured",
							"vendor"
						],
						"type": "string"
					},
					"expected_on": {
						"description": "When it is expected: the day written on it, or else sent plus the vendor's lead time. In the list, only for an order still waited for.",
						"format": "date",
						"type": "string"
					},
					"lines": {
						"format": "int64",
						"type": "integer"
					},
					"note": {
						"type": "string"
					},
					"number": {
						"type": "string"
					},
					"overdue": {
						"description": "Sent, something on it still to arrive, and its day has passed by the company's own date. In the list.",
						"type": "boolean"
					},
					"receipts": {
						"format": "int64",
						"type": "integer"
					},
					"sent_at": {
						"description": "When it went to the vendor. Kept on an order put back to a draft once something has arrived against it, and on an order closed.",
						"type": "string"
					},
					"status": {
						"enum": [
							"draft",
							"sent",
							"closed",
							"cancelled"
						],
						"type": "string"
					},
					"vendor": {
						"type": "string"
					},
					"vendor_name": {
						"type": "string"
					},
					"vendor_ref": {
						"description": "The vendor's own number for this order — their sales order or confirmation.",
						"type": "string"
					},
					"vendor_removed": {
						"type": "boolean"
					}
				},
				"required": [
					"number",
					"vendor",
					"vendor_name",
					"status",
					"lines",
					"created_at",
					"receipts"
				],
				"type": "object"
			},
			"PurchaseSourceRow": {
				"additionalProperties": false,
				"properties": {
					"created_at": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"lines": {
						"description": "How many of this order's lines it added or added to.",
						"format": "int64",
						"type": "integer"
					},
					"only_missing": {
						"description": "Only what was missing, rather than everything the products take.",
						"type": "boolean"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"description": "How many products' worth.",
						"type": "string"
					},
					"rev": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"rev",
					"qty",
					"lines",
					"created_at"
				],
				"type": "object"
			},
			"RateBody": {
				"additionalProperties": false,
				"properties": {
					"inverse": {
						"description": "The company's own currency is on the left — 1 EUR = 25.03 CZK in a euro company reading a crown invoice.",
						"type": "boolean"
					},
					"quote": {
						"description": "What they are worth in the currency on the right.",
						"type": "string"
					},
					"units": {
						"description": "How many of the currency on the left: 1, or 100 for a currency quoted per hundred.",
						"type": "string"
					}
				},
				"required": [
					"units",
					"quote"
				],
				"type": "object"
			},
			"ReasonRow": {
				"additionalProperties": false,
				"properties": {
					"code": {
						"type": "string"
					},
					"entertainment": {
						"description": "In a Czech company, an issue under this reason posts to representation costs, 513: a VAT payer's deduction on the stock is adjusted, or it is a supply.",
						"type": "boolean"
					},
					"event": {
						"description": "The movement kind this reason is mapped for.",
						"type": "string"
					},
					"gift_limit": {
						"description": "An issue under this reason gives things away for the business: a piece valued over the country's limit is possibly a supply and not a tax expense.",
						"type": "boolean"
					},
					"label": {
						"description": "The reason as a document says it: the code. The note on the mapping is note.",
						"type": "string"
					},
					"note": {
						"description": "The accountant's note on the chart's row for this reason, when it has one: an explanation, not a name.",
						"type": "string"
					},
					"requires_disposal_record": {
						"description": "A scrap under this reason is not posted without a disposal record — on any row of the reason, for any class.",
						"type": "boolean"
					},
					"taxable_supply": {
						"description": "An issue under this reason is a possible taxable supply when the company is VAT registered.",
						"type": "boolean"
					}
				},
				"required": [
					"event",
					"code",
					"label",
					"requires_disposal_record",
					"taxable_supply",
					"gift_limit",
					"entertainment"
				],
				"type": "object"
			},
			"ReceiptBody": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"format": "date",
						"type": "string"
					},
					"accounting_no": {
						"description": "The number the accounting software knows this invoice by. A reference only.",
						"type": "string"
					},
					"charges": {
						"description": "At most 100: more is refused as 422 document.too_many_charges.",
						"items": {
							"$ref": "#/components/schemas/ReceiptChargeInput"
						},
						"type": [
							"array",
							"null"
						]
					},
					"closes_order": {
						"description": "Mark the order finished with, in the same request.",
						"type": "boolean"
					},
					"confirm": {
						"description": "Go ahead even though this moves figures already reported, or is dated ahead.",
						"type": "boolean"
					},
					"currency": {
						"description": "ISO 4217. Empty is the company's own.",
						"type": "string"
					},
					"duzp": {
						"description": "The tax point (DUZP), YYYY-MM-DD. Empty is the invoice's date, and with none the accounting date. Whether the company is VAT registered is read for this date.",
						"type": "string"
					},
					"fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate as the document prints it."
					},
					"fx_note": {
						"type": "string"
					},
					"fx_rate": {
						"description": "From the document, never fetched — so this rate and the accounting's agree by construction. A bare multiplier: company currency per one unit of the document's. fx wins when both are sent.",
						"type": "string"
					},
					"invoice_date": {
						"description": "YYYY-MM-DD. The date the invoice was issued — and its tax point when it states no DUZP.",
						"type": "string"
					},
					"ksef_no": {
						"description": "The number KSeF gave the purchase invoice, as TNumerKSeF writes it. A reference.",
						"type": "string"
					},
					"lines": {
						"description": "At most 1000: more is refused as 422 document.too_many_lines.",
						"items": {
							"$ref": "#/components/schemas/ReceiptLineInput"
						},
						"minItems": 1,
						"type": [
							"array",
							"null"
						]
					},
					"occurred_at": {
						"format": "date-time",
						"type": "string"
					},
					"position": {
						"description": "Where this goes among the documents already on a back-dated day.",
						"enum": [
							"before",
							"after"
						],
						"type": "string"
					},
					"price_known": {
						"description": "With without_invoice: the prices are known from a contract or the vendor's delivery note rather than estimated. Ignored without it.",
						"type": "boolean"
					},
					"purchase_order": {
						"description": "Order number.",
						"type": "string"
					},
					"reading": {
						"description": "The reading this was made from. Its document becomes the receipt's attachment.",
						"type": "string"
					},
					"reason": {
						"description": "From the chart of accounts for receipts; empty for an ordinary purchase.",
						"type": "string"
					},
					"reference": {
						"description": "The receipt's note.",
						"type": "string"
					},
					"supplier_doc_no": {
						"type": "string"
					},
					"vat_fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate the lines' tax is converted at, when it is not fx."
					},
					"vendor": {
						"description": "Vendor code.",
						"type": "string"
					},
					"vendor_name": {
						"description": "The vendor's name. Read-only; the code is what identifies them.",
						"type": "string"
					},
					"vendor_removed": {
						"type": "boolean"
					},
					"without_invoice": {
						"description": "The goods arrived before the invoice and are priced by estimate. Cleared by the correction that enters the invoice; read back false as well once a price adjustment in force says it is the invoice.",
						"type": "boolean"
					}
				},
				"required": [
					"accounting_date",
					"lines"
				],
				"type": "object"
			},
			"ReceiptChargeInput": {
				"additionalProperties": false,
				"properties": {
					"amount": {
						"description": "Never below zero, but for a rounding: the difference between the invoice's total and its lines, which corrects the price paid either way.",
						"type": "string"
					},
					"basis": {
						"description": "Per charge, not per document: freight by weight and duty by value on one receipt is normal.",
						"enum": [
							"value",
							"weight",
							"quantity",
							"direct"
						],
						"type": "string"
					},
					"currency": {
						"type": "string"
					},
					"direct_line": {
						"format": "int64",
						"type": "integer"
					},
					"duzp": {
						"description": "The charge's own tax point (DUZP), YYYY-MM-DD — a carrier's or a customs document dated apart from the goods' invoice. Whether its tax and an import VAT are reclaimable is read for it. Empty is the receipt's.",
						"type": "string"
					},
					"fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate as the document prints it."
					},
					"fx_rate": {
						"description": "The rate as a bare multiplier. fx wins when both are sent.",
						"type": "string"
					},
					"kind": {
						"description": "A vedlejší pořizovací náklad of vyhl. 500/2002 § 49 odst. 1, or a rounding of the invoice. Interest, penalties and anything else that is not part of acquisition cost is not a charge (since 24 October 2026).",
						"enum": [
							"freight",
							"duty",
							"import_vat",
							"handling",
							"insurance",
							"packaging",
							"commission",
							"rounding"
						],
						"type": "string"
					},
					"provisional": {
						"description": "An estimate standing in for an invoice that has not arrived.",
						"type": "boolean"
					},
					"vat_amount": {
						"description": "The tax printed on this charge's own line. Spread with the charge; part of the value only while the company is not VAT registered. Never below zero, but for a rounding.",
						"type": "string"
					},
					"vat_fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate the tax is converted at, when it is not fx."
					}
				},
				"required": [
					"kind",
					"amount"
				],
				"type": "object"
			},
			"ReceiptCosting": {
				"additionalProperties": false,
				"properties": {
					"charges": {
						"description": "What the lines took of the charges, together.",
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/CostedLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"reclaimable_import_vat": {
						"description": "Import VAT a company that is VAT registered reclaims, left out of every line's value — a receivable, not stock. Each charge read for its own DUZP.",
						"type": "string"
					},
					"total": {
						"description": "Acquisition cost of every line together.",
						"type": "string"
					},
					"vat_payer": {
						"description": "Whether the tax on this receipt's DUZP is reclaimable. For a company not VAT registered it is part of what the stock cost. A charge with a DUZP of its own is read for that one.",
						"type": "boolean"
					}
				},
				"required": [
					"lines",
					"total",
					"charges",
					"vat_payer",
					"reclaimable_import_vat"
				],
				"type": "object"
			},
			"ReceiptLineInput": {
				"additionalProperties": false,
				"properties": {
					"invoiced_qty": {
						"description": "What the paper said, if it was in packs.",
						"type": "string"
					},
					"line_no": {
						"description": "Position on the invoice. It becomes the movement's ordinal, so a line that creates none leaves a gap.",
						"format": "int64",
						"minimum": 1,
						"type": "integer"
					},
					"line_total": {
						"description": "What the invoice says the line comes to before VAT, in the document's currency, when it states a total rather than a unit price. It is what the line is costed at — quantity × a six-place unit price is a different amount once the quantity is large — and it must agree with qty × unit_price to the sixth place of the price.",
						"type": "string"
					},
					"location": {
						"description": "The bin it goes to. A line expensed on purchase (stocked: false) may leave it out: it goes to no shelf.",
						"type": "string"
					},
					"pack_size": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"description": "Base units. A string, not a number.",
						"type": "string"
					},
					"serial": {
						"description": "The piece's number, for a part tracked by serial number. Such a line is one piece.",
						"type": "string"
					},
					"stocked": {
						"description": "Default true. False expenses it on purchase — it still takes its share of the charges, and the posting proposal sends what it came to straight to consumption. Only in a company whose settings allow it (expensed_on_purchase), refused otherwise as receipt.expensed_off — but a correction keeps a line the receipt being corrected already expensed, for the same part.",
						"type": "boolean"
					},
					"unit_price": {
						"description": "Per base unit, in the document's currency.",
						"type": "string"
					},
					"vat_amount": {
						"description": "Required even while the company is not VAT registered. Zero is a value; a supplier not VAT registered charged none.",
						"type": "string"
					},
					"vat_non_deductible": {
						"description": "The line's tax cannot be deducted whoever the company is — reprezentace, for instance: it is part of what the line cost for a VAT payer too, and never in the line's lot, so no claim at registration takes it. Its share of the charges' tax follows it.",
						"type": "boolean"
					},
					"weight_g": {
						"description": "The line's total shipping weight, as a packing list gives it.",
						"type": "string"
					}
				},
				"required": [
					"line_no",
					"pn",
					"qty",
					"unit_price",
					"vat_amount"
				],
				"type": "object"
			},
			"ReceiptRead": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"format": "date",
						"type": "string"
					},
					"accounting_no": {
						"description": "The number the accounting software knows this invoice by. A reference only.",
						"type": "string"
					},
					"charges": {
						"description": "At most 100: more is refused as 422 document.too_many_charges.",
						"items": {
							"$ref": "#/components/schemas/ReceiptChargeInput"
						},
						"type": [
							"array",
							"null"
						]
					},
					"closes_order": {
						"description": "Mark the order finished with, in the same request.",
						"type": "boolean"
					},
					"confirm": {
						"description": "Go ahead even though this moves figures already reported, or is dated ahead.",
						"type": "boolean"
					},
					"costed": {
						"$ref": "#/components/schemas/ReceiptCosting",
						"description": "What each line came to — its own price in the company's currency, its share of the charges, and the two together — as preview-receipt answers it. Absent when the ledger holds other figures for the receipt than its costing gives today."
					},
					"currency": {
						"description": "ISO 4217. Empty is the company's own.",
						"type": "string"
					},
					"duzp": {
						"description": "The tax point (DUZP), YYYY-MM-DD. Empty is the invoice's date, and with none the accounting date. Whether the company is VAT registered is read for this date.",
						"type": "string"
					},
					"fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate as the document prints it."
					},
					"fx_note": {
						"type": "string"
					},
					"fx_rate": {
						"description": "From the document, never fetched — so this rate and the accounting's agree by construction. A bare multiplier: company currency per one unit of the document's. fx wins when both are sent.",
						"type": "string"
					},
					"invoice_date": {
						"description": "YYYY-MM-DD. The date the invoice was issued — and its tax point when it states no DUZP.",
						"type": "string"
					},
					"ksef_no": {
						"description": "The number KSeF gave the purchase invoice, as TNumerKSeF writes it. A reference.",
						"type": "string"
					},
					"lines": {
						"description": "At most 1000: more is refused as 422 document.too_many_lines.",
						"items": {
							"$ref": "#/components/schemas/ReceiptLineInput"
						},
						"minItems": 1,
						"type": [
							"array",
							"null"
						]
					},
					"occurred_at": {
						"format": "date-time",
						"type": "string"
					},
					"position": {
						"description": "Where this goes among the documents already on a back-dated day.",
						"enum": [
							"before",
							"after"
						],
						"type": "string"
					},
					"price_known": {
						"description": "With without_invoice: the prices are known from a contract or the vendor's delivery note rather than estimated. Ignored without it.",
						"type": "boolean"
					},
					"purchase_order": {
						"description": "Order number.",
						"type": "string"
					},
					"reading": {
						"description": "The reading this was made from. Its document becomes the receipt's attachment.",
						"type": "string"
					},
					"reason": {
						"description": "From the chart of accounts for receipts; empty for an ordinary purchase.",
						"type": "string"
					},
					"reference": {
						"description": "The receipt's note.",
						"type": "string"
					},
					"supplier_doc_no": {
						"type": "string"
					},
					"vat_fx": {
						"$ref": "#/components/schemas/RateBody",
						"description": "The rate the lines' tax is converted at, when it is not fx."
					},
					"vendor": {
						"description": "Vendor code.",
						"type": "string"
					},
					"vendor_name": {
						"description": "The vendor's name. Read-only; the code is what identifies them.",
						"type": "string"
					},
					"vendor_removed": {
						"type": "boolean"
					},
					"without_invoice": {
						"description": "The goods arrived before the invoice and are priced by estimate. Cleared by the correction that enters the invoice; read back false as well once a price adjustment in force says it is the invoice.",
						"type": "boolean"
					}
				},
				"required": [
					"accounting_date",
					"lines"
				],
				"type": "object"
			},
			"RequirementRow": {
				"additionalProperties": false,
				"properties": {
					"average": {
						"description": "What one costs on the shelf today — the weighted average, and of a part that has run out the average its last pieces left at. Absent for a part that has never been in stock.",
						"type": "string"
					},
					"customer_owned": {
						"description": "Material the customer supplied: consumed, and worth nothing to the product.",
						"type": "boolean"
					},
					"description": {
						"type": "string"
					},
					"free": {
						"type": "string"
					},
					"needed": {
						"type": "string"
					},
					"on_hand": {
						"type": "string"
					},
					"ordered": {
						"description": "Still coming, from orders already sent. It does not make a part reservable.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"reserved": {
						"description": "What other orders hold. This one never counts itself.",
						"type": "string"
					},
					"serial_mask": {
						"description": "The shape those numbers are meant to have. Warns; never refuses.",
						"type": "string"
					},
					"serialized": {
						"description": "The pieces that go in have to be named at completion.",
						"type": "boolean"
					},
					"short": {
						"description": "Zero when there is enough. Never negative.",
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"needed",
					"on_hand",
					"reserved",
					"free",
					"short",
					"ordered",
					"serialized",
					"customer_owned"
				],
				"type": "object"
			},
			"ReserveStockInputBody": {
				"additionalProperties": false,
				"properties": {
					"reserve_until": {
						"description": "YYYY-MM-DD. A new last day, set before reserving — what a build order whose date has passed needs.",
						"type": "string"
					},
					"until_cancelled": {
						"description": "No last day: held until cancelled.",
						"type": "boolean"
					}
				},
				"type": "object"
			},
			"RevisionRow": {
				"additionalProperties": false,
				"properties": {
					"current": {
						"type": "boolean"
					},
					"id": {
						"type": "string"
					},
					"recorded_at": {
						"type": "string"
					},
					"revision": {
						"format": "int64",
						"type": "integer"
					}
				},
				"required": [
					"id",
					"revision",
					"recorded_at",
					"current"
				],
				"type": "object"
			},
			"RevisionSummary": {
				"additionalProperties": false,
				"properties": {
					"created_at": {
						"type": "string"
					},
					"labour_minutes": {
						"type": "string"
					},
					"lines": {
						"format": "int64",
						"type": "integer"
					},
					"machine_minutes": {
						"type": "string"
					},
					"note": {
						"description": "What the bench should know that the lines do not say: several lines, shown on the assembly list.",
						"type": "string"
					},
					"released_at": {
						"type": "string"
					},
					"rev": {
						"type": "string"
					},
					"status": {
						"type": "string"
					}
				},
				"required": [
					"rev",
					"status",
					"labour_minutes",
					"machine_minutes",
					"created_at",
					"lines"
				],
				"type": "object"
			},
			"SerialMovementRow": {
				"additionalProperties": false,
				"properties": {
					"accounting_date": {
						"type": "string"
					},
					"document_id": {
						"type": "string"
					},
					"document_no": {
						"type": "string"
					},
					"kind": {
						"type": "string"
					},
					"location": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"type": {
						"type": "string"
					}
				},
				"required": [
					"document_no",
					"document_id",
					"type",
					"kind",
					"accounting_date",
					"location",
					"qty"
				],
				"type": "object"
			},
			"SerialRow": {
				"additionalProperties": false,
				"properties": {
					"class": {
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"composition": {
						"enum": [
							"none",
							"composed"
						],
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"first_seen": {
						"type": "string"
					},
					"last_moved": {
						"type": "string"
					},
					"last_reason": {
						"description": "Why it moved last — the reason of the document, where there was one.",
						"type": "string"
					},
					"location": {
						"description": "Where it was last put. Absent once it has left.",
						"type": "string"
					},
					"on_hand": {
						"description": "Derived from the movements, never stored.",
						"type": "boolean"
					},
					"pn": {
						"type": "string"
					},
					"serial": {
						"type": "string"
					}
				},
				"required": [
					"serial",
					"pn",
					"description",
					"class",
					"composition",
					"on_hand",
					"first_seen",
					"last_moved"
				],
				"type": "object"
			},
			"ServiceRow": {
				"additionalProperties": false,
				"properties": {
					"amount": {
						"description": "The estimate the product's value carries.",
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"invoice_no": {
						"description": "The supplier's document.",
						"type": "string"
					},
					"invoiced": {
						"description": "What the supplier invoiced for it; absent until somebody writes it.",
						"type": "string"
					},
					"kind": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"kind",
					"amount"
				],
				"type": "object"
			},
			"Set-purchase-lineRequest": {
				"additionalProperties": false,
				"properties": {
					"qty": {
						"type": "string"
					}
				},
				"required": [
					"qty"
				],
				"type": "object"
			},
			"Set-vendor-partRequest": {
				"additionalProperties": false,
				"properties": {
					"barcode": {
						"description": "The number on their label when it is not their SKU. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"mpn": {
						"description": "The manufacturer's own number. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"pack_label": {
						"description": "What one pack is called. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"pack_size": {
						"description": "How many base units in one pack. A spool of 1000 g is 1000, not a unit conversion. Omit to leave it alone.",
						"type": "string"
					},
					"sku": {
						"description": "Their number, as they print it. Never uppercased: a SKU is theirs and case can be part of it.",
						"type": "string"
					},
					"url": {
						"description": "Their page for this part. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					}
				},
				"required": [
					"sku"
				],
				"type": "object"
			},
			"SetPurchaseLineOutputBody": {
				"additionalProperties": false,
				"properties": {
					"added": {
						"description": "How many lines the order gained or had changed.",
						"format": "int64",
						"type": "integer"
					},
					"customer_owned": {
						"description": "Components a customer supplies, which are never ordered and therefore not on the order.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"skipped": {
						"description": "Components this vendor has no number for, and which are therefore not on the order.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"added",
					"skipped",
					"customer_owned"
				],
				"type": "object"
			},
			"TurnoverClass": {
				"additionalProperties": false,
				"properties": {
					"class": {
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"closing_value": {
						"type": "string"
					},
					"in_value": {
						"type": "string"
					},
					"opening_value": {
						"type": "string"
					},
					"out_value": {
						"type": "string"
					},
					"revaluation": {
						"type": "string"
					}
				},
				"required": [
					"class",
					"opening_value",
					"in_value",
					"out_value",
					"revaluation",
					"closing_value"
				],
				"type": "object"
			},
			"TurnoverLine": {
				"additionalProperties": false,
				"properties": {
					"account": {
						"type": "string"
					},
					"class": {
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"closing_qty": {
						"type": "string"
					},
					"closing_value": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"in_qty": {
						"description": "Received, opened, made and counted over, less what went back to a vendor.",
						"type": "string"
					},
					"in_value": {
						"type": "string"
					},
					"opening_qty": {
						"type": "string"
					},
					"opening_value": {
						"type": "string"
					},
					"out_qty": {
						"description": "Issued, used in production, scrapped and counted short, less what came back from production or a customer. Positive.",
						"type": "string"
					},
					"out_value": {
						"description": "Positive.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"revaluation": {
						"description": "Revaluations and price adjustments: what the value did without a quantity moving. The rounding of the other four lands here too, so the line adds up as printed.",
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"class",
					"account",
					"opening_qty",
					"opening_value",
					"in_qty",
					"in_value",
					"out_qty",
					"out_value",
					"revaluation",
					"closing_qty",
					"closing_value"
				],
				"type": "object"
			},
			"TurnoverOutputBody": {
				"additionalProperties": false,
				"properties": {
					"classes": {
						"description": "The same summed by class of stock, every class that has a line: the exact values summed and rounded once, so the lines, each rounded, may differ from it by a few hundredths. The revaluation is worked out from the other four, as on a line.",
						"items": {
							"$ref": "#/components/schemas/TurnoverClass"
						},
						"type": [
							"array",
							"null"
						]
					},
					"customer_owned": {
						"description": "Parts the customer owns that moved or are held: never valued, so not here.",
						"format": "int64",
						"type": "integer"
					},
					"from": {
						"format": "date",
						"type": "string"
					},
					"lines": {
						"description": "Every part with stock at either end or a movement between, by number.",
						"items": {
							"$ref": "#/components/schemas/TurnoverLine"
						},
						"type": [
							"array",
							"null"
						]
					},
					"to": {
						"format": "date",
						"type": "string"
					},
					"total": {
						"$ref": "#/components/schemas/TurnoverClass",
						"description": "Everything, summed as a class is; its class is empty."
					}
				},
				"required": [
					"from",
					"to",
					"lines",
					"classes",
					"total",
					"customer_owned"
				],
				"type": "object"
			},
			"UnitRow": {
				"additionalProperties": false,
				"properties": {
					"code": {
						"type": "string"
					},
					"countable": {
						"type": "boolean"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"name",
					"countable"
				],
				"type": "object"
			},
			"UpdateBuildJobInputBody": {
				"additionalProperties": false,
				"properties": {
					"customer": {
						"description": "Customer code. Empty means for stock. Absent keeps it.",
						"type": "string"
					},
					"due_on": {
						"description": "YYYY-MM-DD. When the customer is expecting it. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"note": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"reference": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"reserve_until": {
						"description": "YYYY-MM-DD. The last day its lines from stock are held; empty is until cancelled. Absent keeps it.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"UpdatePartInputBody": {
				"additionalProperties": false,
				"properties": {
					"attrs": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "The fields the part's kind describes it by. Replaced wholesale when sent; absent keeps them, unless the kind changes.",
						"type": "object"
					},
					"class": {
						"description": "Absent keeps the class when it agrees with made. Changes only before the first movement.",
						"enum": [
							"material",
							"goods",
							"semi",
							"product"
						],
						"type": "string"
					},
					"composition": {
						"description": "Absent keeps it.",
						"enum": [
							"none",
							"composed"
						],
						"type": "string"
					},
					"customer": {
						"description": "Whose it is, by customer code. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"customer_owned": {
						"description": "Absent keeps it. Changes only before the first movement.",
						"type": "boolean"
					},
					"description": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"ean": {
						"description": "Changeable at any time: it describes the box, not the ledger. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"for_customer": {
						"description": "Made from a customer's material for that customer, and the customer's. Absent keeps it. Semi-finished and finished products only; changes only before the first movement.",
						"type": "boolean"
					},
					"kind": {
						"description": "Changeable at any time: it describes the part and moves nothing. The fields of the old kind are dropped. Absent keeps it.",
						"type": "string"
					},
					"labour_rate_per_hour": {
						"description": "Times the revision's labour minutes. Zero means no labour cost at all. Whether it is capitalised is asked on the completion form, not here. Absent keeps it; empty is zero.",
						"type": "string"
					},
					"machine_rate_per_hour": {
						"description": "Times the revision's machine minutes. Never capitalised: machine time is in the management figure alone. Absent keeps it; empty is zero.",
						"type": "string"
					},
					"made": {
						"description": "Absent keeps where the part comes from.",
						"type": "boolean"
					},
					"method_reason": {
						"description": "Why the overhead or the labour rate changes. Kept in the record of methods.",
						"type": "string"
					},
					"min_stock": {
						"description": "What the free stock should not fall below. Absent keeps it, empty clears it.",
						"type": "string"
					},
					"off_balance_value": {
						"description": "What one unit of a customer's material is worth in the off-balance-sheet records. Changeable at any time: nothing in the ledger reads it. Absent keeps it; empty clears it; ignored, and cleared, on the company's own part.",
						"type": "string"
					},
					"order_up_to": {
						"description": "How far an order should bring it; empty is up to the reorder point.",
						"type": "string"
					},
					"overhead_pct_on_material": {
						"description": "Solder, flux, cleaner, electricity, a worn nozzle — as a fraction of this part's own material. 0.08 is eight per cent. Absent keeps it; empty is zero.",
						"type": "string"
					},
					"reorder_point": {
						"description": "When to order it, typed; empty lets Manufik work it out from the minimum, the consumption and the lead time.",
						"type": "string"
					},
					"sale_price": {
						"description": "What one is sold for, net of the company's own VAT. Changeable at any time: it is read beside the calculation price and posted nowhere. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"serial_mask": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"serialized": {
						"description": "Absent keeps it. Changes only before the first movement.",
						"type": "boolean"
					},
					"tags": {
						"description": "Replaced wholesale when sent: what is sent is what the part has afterwards. Absent keeps them.",
						"items": {
							"type": "string"
						},
						"type": [
							"array",
							"null"
						]
					},
					"unit": {
						"description": "Absent keeps it. Changes only before the first movement.",
						"minLength": 1,
						"type": "string"
					},
					"url": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"ValuationHeld": {
				"additionalProperties": false,
				"properties": {
					"account": {
						"description": "The warehouse's analytic account for the part's class, or the part's own when it names none.",
						"type": "string"
					},
					"holder": {
						"description": "Who held it.",
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"value": {
						"type": "string"
					},
					"warehouse": {
						"description": "The held warehouse's code.",
						"type": "string"
					},
					"warehouse_name": {
						"type": "string"
					}
				},
				"required": [
					"warehouse",
					"warehouse_name",
					"holder",
					"account",
					"qty",
					"value"
				],
				"type": "object"
			},
			"ValuationLine": {
				"additionalProperties": false,
				"properties": {
					"account": {
						"description": "112 for material, 123 for finished products. It comes from the part.",
						"type": "string"
					},
					"allowance": {
						"description": "The impairment allowance in force on the date. Not taken off value.",
						"type": "string"
					},
					"average": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"held": {
						"description": "What of qty and value sat at warehouses a third party holds — inside qty and value, each on its warehouse's account. by_account counts it there.",
						"items": {
							"$ref": "#/components/schemas/ValuationHeld"
						},
						"type": [
							"array",
							"null"
						]
					},
					"in_production_qty": {
						"type": "string"
					},
					"in_production_value": {
						"type": "string"
					},
					"net": {
						"description": "Value less the allowance: what the balance sheet shows.",
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"type": "string"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"account",
					"qty",
					"average",
					"value",
					"in_production_qty",
					"in_production_value",
					"allowance",
					"net"
				],
				"type": "object"
			},
			"ValuationOutputBody": {
				"additionalProperties": false,
				"properties": {
					"allowance_accounts": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "Per inventory account, where its impairment allowance sits: 112 → 191, 121 → 192, 122 → 193, 123 → 194, 132 → 196 in the standard chart. An account two classes share shows the first class's, in the order material, goods, semi-finished, finished.",
						"type": "object"
					},
					"allowance_by_account": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "The allowance per inventory account it corrects.",
						"type": "object"
					},
					"allowance_total": {
						"type": "string"
					},
					"as_of": {
						"type": "string"
					},
					"by_account": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "How the accountant reconciles it: 112 against 112, 123 against 123.",
						"type": "object"
					},
					"computed_at": {
						"description": "When this answer was produced. It matters for an open year.",
						"type": "string"
					},
					"customer_owned": {
						"description": "Material customers supplied, held on the date, in no total of the company's stock: off-balance-sheet records, valued there at what each part says it is worth.",
						"items": {
							"$ref": "#/components/schemas/CustomerStockLine"
						},
						"type": [
							"array",
							"null"
						]
					},
					"from_snapshot": {
						"description": "A closed year answers from the record, not from a recomputation.",
						"type": "boolean"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/ValuationLine"
						},
						"type": [
							"array",
							"null"
						]
					},
					"net_by_account": {
						"additionalProperties": {
							"type": "string"
						},
						"description": "By account, less the allowance against each.",
						"type": "object"
					},
					"net_total": {
						"description": "Total less every allowance.",
						"type": "string"
					},
					"off_balance_total": {
						"description": "What the customers' material held on the date is worth in the off-balance-sheet records: the sum of the lines with a value said. Never in the total of the company's stock.",
						"type": "string"
					},
					"off_balance_unvalued": {
						"description": "Lines of customers' material whose part has no value for the off-balance-sheet records.",
						"format": "int64",
						"type": "integer"
					},
					"provisional": {
						"description": "The year is open: a later back-dated document can still change this.",
						"type": "boolean"
					},
					"total": {
						"type": "string"
					},
					"wip": {
						"description": "Work in progress on the date, per order. Its material is not in lines; its value is in the total and by account.",
						"items": {
							"$ref": "#/components/schemas/ValuationWIP"
						},
						"type": [
							"array",
							"null"
						]
					}
				},
				"required": [
					"as_of",
					"computed_at",
					"from_snapshot",
					"provisional",
					"total",
					"by_account",
					"lines",
					"wip",
					"customer_owned",
					"allowance_accounts",
					"allowance_total",
					"allowance_by_account",
					"net_total",
					"net_by_account",
					"off_balance_total",
					"off_balance_unvalued"
				],
				"type": "object"
			},
			"ValuationWIP": {
				"additionalProperties": false,
				"properties": {
					"account": {
						"type": "string"
					},
					"allowance": {
						"description": "The impairment allowance the order's record carries, as much as counts. Not taken off value.",
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"holder": {
						"type": "string"
					},
					"labour": {
						"type": "string"
					},
					"material": {
						"type": "string"
					},
					"net": {
						"description": "Value less the allowance.",
						"type": "string"
					},
					"order_id": {
						"type": "string"
					},
					"over": {
						"description": "The order's record says more of a component was in production than the part held on the date. The material here is what the part held, and the record wants correcting.",
						"type": "boolean"
					},
					"overhead": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"qty": {
						"description": "The order's quantity.",
						"type": "string"
					},
					"services": {
						"type": "string"
					},
					"value": {
						"type": "string"
					},
					"warehouse": {
						"description": "The warehouse a third party held where the work was; account is its analytic account when it names one.",
						"type": "string"
					}
				},
				"required": [
					"order_id",
					"pn",
					"description",
					"account",
					"qty",
					"material",
					"overhead",
					"services",
					"labour",
					"value",
					"allowance",
					"net",
					"over"
				],
				"type": "object"
			},
			"VendorBody": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address"
					},
					"code": {
						"type": "string"
					},
					"country": {
						"type": "string"
					},
					"format": {
						"enum": [
							"generic",
							"digikey",
							"mouser"
						],
						"type": "string"
					},
					"ico": {
						"description": "The identifier in the vendor's own register, checked by their country: in CZ eight digits with a check digit. Spaces and missing leading zeros are forgiven.",
						"type": "string"
					},
					"lead_days": {
						"description": "How long they take to deliver, in days. Zero clears it; absent keeps it.",
						"format": "int64",
						"maximum": 365,
						"minimum": 0,
						"type": "integer"
					},
					"name": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"vat_id": {
						"description": "The VAT identification number with its country prefix.",
						"type": "string"
					}
				},
				"required": [
					"code",
					"name"
				],
				"type": "object"
			},
			"VendorCatalogueOutputBody": {
				"additionalProperties": false,
				"properties": {
					"lines": {
						"items": {
							"$ref": "#/components/schemas/VendorLineRow"
						},
						"type": [
							"array",
							"null"
						]
					},
					"matching": {
						"description": "After the filter: how many lines the blocks add up to. On the first block only.",
						"format": "int64",
						"type": "integer"
					},
					"next": {
						"description": "Where this block ended. Absent on the last one.",
						"type": "string"
					},
					"total": {
						"description": "Before the filter.",
						"format": "int64",
						"type": "integer"
					}
				},
				"required": [
					"lines",
					"total",
					"matching"
				],
				"type": "object"
			},
			"VendorLineRow": {
				"additionalProperties": false,
				"properties": {
					"description": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"imported": {
						"description": "It came from one of their files rather than being typed in here.",
						"type": "boolean"
					},
					"mpn": {
						"type": "string"
					},
					"pack_label": {
						"type": "string"
					},
					"pack_size": {
						"type": "string"
					},
					"pn": {
						"description": "Our part, when somebody has matched it. Empty means unmatched — never a guess.",
						"type": "string"
					},
					"sku": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"sku",
					"pack_size",
					"imported"
				],
				"type": "object"
			},
			"VendorPartInput": {
				"additionalProperties": false,
				"properties": {
					"barcode": {
						"description": "The number on their label when it is not their SKU. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"mpn": {
						"description": "The manufacturer's own number, when the vendor's line carries one. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"pack_label": {
						"description": "What one pack is called. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"pack_size": {
						"description": "Omit to leave it alone. Blank is the default of one.",
						"type": "string"
					},
					"sku": {
						"type": "string"
					},
					"url": {
						"description": "Their page for this part. Omit to leave it alone; send \"\" to clear it.",
						"type": "string"
					},
					"vendor": {
						"description": "Vendor code.",
						"type": "string"
					}
				},
				"required": [
					"vendor",
					"sku"
				],
				"type": "object"
			},
			"VendorPartRow": {
				"additionalProperties": false,
				"properties": {
					"description": {
						"type": "string"
					},
					"on_hand": {
						"type": "string"
					},
					"pack_label": {
						"description": "What one pack is called: reel, spool, cut tape.",
						"type": "string"
					},
					"pack_size": {
						"type": "string"
					},
					"pn": {
						"type": "string"
					},
					"sku": {
						"type": "string"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"pn",
					"description",
					"unit",
					"sku",
					"pack_size",
					"on_hand"
				],
				"type": "object"
			},
			"VendorPatch": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address",
						"description": "Replaced whole when sent, its three parts together. Absent keeps it."
					},
					"code": {
						"description": "Ignored: the code is the path's, and does not change. Optional.",
						"type": "string"
					},
					"country": {
						"description": "ISO 3166 alpha-2. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"format": {
						"description": "How they take an order list. Absent keeps it.",
						"enum": [
							"generic",
							"digikey",
							"mouser"
						],
						"type": "string"
					},
					"ico": {
						"description": "The identifier in the vendor's own register, checked by their country: in CZ eight digits with a check digit. Spaces and missing leading zeros are forgiven. Absent keeps it; empty clears it.",
						"type": "string"
					},
					"lead_days": {
						"description": "How long they take to deliver, in days. Zero clears it; absent keeps it.",
						"format": "int64",
						"maximum": 365,
						"minimum": 0,
						"type": "integer"
					},
					"name": {
						"description": "Absent keeps it; it cannot be cleared.",
						"type": "string"
					},
					"note": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"url": {
						"description": "Absent keeps it; empty clears it.",
						"type": "string"
					},
					"vat_id": {
						"description": "The VAT identification number with its country prefix. Absent keeps it; empty clears it.",
						"type": "string"
					}
				},
				"type": "object"
			},
			"VendorRow": {
				"additionalProperties": false,
				"properties": {
					"address": {
						"$ref": "#/components/schemas/Address",
						"description": "Street and number, postal code and town, apart."
					},
					"code": {
						"type": "string"
					},
					"country": {
						"description": "ISO 3166 alpha-2. Inside or outside the EU decides import VAT and duty.",
						"type": "string"
					},
					"format": {
						"enum": [
							"generic",
							"digikey",
							"mouser"
						],
						"type": "string"
					},
					"ico": {
						"description": "The identifier in the vendor's own register, by the vendor's country — an IČO in CZ and SK, a NIP in PL.",
						"type": "string"
					},
					"lead_days": {
						"description": "How long they take to deliver, in days, as somebody typed it.",
						"format": "int64",
						"type": "integer"
					},
					"name": {
						"type": "string"
					},
					"note": {
						"type": "string"
					},
					"orders": {
						"description": "Purchase orders naming this vendor. They survive the vendor's removal too.",
						"format": "int64",
						"type": "integer"
					},
					"parts": {
						"description": "Lines of this vendor's catalogue, whether or not each is matched to a part of ours.",
						"format": "int64",
						"type": "integer"
					},
					"receipts": {
						"description": "Goods receipts naming this vendor. They survive the vendor's removal, keeping the name.",
						"format": "int64",
						"type": "integer"
					},
					"url": {
						"type": "string"
					},
					"vat_id": {
						"description": "The VAT identification number with its country prefix.",
						"type": "string"
					}
				},
				"required": [
					"code",
					"name",
					"format",
					"parts",
					"receipts",
					"orders"
				],
				"type": "object"
			},
			"WarehouseHolder": {
				"additionalProperties": false,
				"properties": {
					"accounts": {
						"$ref": "#/components/schemas/HeldAccounts",
						"description": "The analytic accounts of its stock, per class."
					},
					"customer": {
						"description": "The customer's code, while there is one.",
						"type": "string"
					},
					"for": {
						"enum": [
							"processing",
							"storage",
							"consignment"
						],
						"type": "string"
					},
					"kind": {
						"enum": [
							"vendor",
							"customer",
							"other"
						],
						"type": "string"
					},
					"name": {
						"description": "Who: the partner's name, or the one typed.",
						"type": "string"
					},
					"vendor": {
						"description": "The vendor's code, while there is one.",
						"type": "string"
					}
				},
				"required": [
					"kind",
					"name",
					"accounts"
				],
				"type": "object"
			},
			"WarehouseRow": {
				"additionalProperties": false,
				"properties": {
					"available": {
						"type": "boolean"
					},
					"bins": {
						"description": "Bins directly in this warehouse, not counting those in the ones inside it.",
						"format": "int64",
						"type": "integer"
					},
					"children": {
						"format": "int64",
						"type": "integer"
					},
					"code": {
						"type": "string"
					},
					"depth": {
						"description": "1 for a top-level warehouse.",
						"format": "int64",
						"type": "integer"
					},
					"held_at": {
						"description": "The code of the nearest warehouse up the tree, itself included, that a third party holds.",
						"type": "string"
					},
					"held_by": {
						"description": "Who holds that one.",
						"type": "string"
					},
					"holder": {
						"$ref": "#/components/schemas/WarehouseHolder",
						"description": "A third party holds this warehouse: an assembly house, a store, a consignee."
					},
					"name": {
						"type": "string"
					},
					"parent": {
						"description": "Code of the warehouse this one is inside.",
						"type": "string"
					},
					"path": {
						"description": "Names from the top down, for display: 'Cabinet / Box C'.",
						"type": "string"
					},
					"reachable": {
						"description": "available, and so is everything above it",
						"type": "boolean"
					},
					"responsible": {
						"description": "Who answers for its stock: its own responsible_person, or that of the nearest warehouse above it that names one. Empty: nobody named — the company as one.",
						"type": "string"
					},
					"responsible_person": {
						"description": "The hmotně odpovědná osoba named on this warehouse. Empty: none named here.",
						"type": "string"
					},
					"writable": {
						"description": "The reader's role may change this warehouse and post stock in it.",
						"type": "boolean"
					}
				},
				"required": [
					"code",
					"name",
					"depth",
					"path",
					"available",
					"reachable",
					"bins",
					"children",
					"writable"
				],
				"type": "object"
			}
		},
		"securitySchemes": {
			"apiKey": {
				"bearerFormat": "mfk_…",
				"description": "An API key made in Settings → Users → API.",
				"scheme": "bearer",
				"type": "http"
			}
		}
	},
	"info": {
		"description": "Stock, purchasing and production of one company, for a program.\n\n**Authentication.** Every request carries an API key the company's owner made in\n*Settings → Users → API*: `Authorization: Bearer mfk_…`. A key belongs to one\ncompany — no path names it — and may do what its role may: the same role a\nperson would hold. It is never the owner.\n\n**Refusals.** A refusal is `application/problem+json` with a stable\n`code` such as `part.unknown`, the values the sentence needs in `params`, and\n`line` when it is about one line of a document. Write programs against the\ncode, not the detail.\n\n**Pace.** A company's programs share an allowance of their own, apart from its\npeople's. Past it the answer is 429; wait and send again.\n\n**Money and quantities** are decimal strings, never floats. **Dates** are\n`YYYY-MM-DD` in the company's own day.\n\n**Sending a request again.** A writing request may carry `Idempotency-Key`, any\nstring the program chooses. For a day the same key with the same request is\nanswered what the first was answered, and is not carried out a second time —\nso a request that timed out can be sent again safely.\n\n**Lists** that can be long are read in blocks: an answer with a `next` cursor\nhas more, asked for with `?after=`.\n\n**A PATCH changes what it is sent.** A field left out is left as it is; a field\nsent empty is cleared. A PUT replaces the whole.\n\n**Stability.** Operations, fields and codes are added; none is removed or\nchanges its meaning within version 1. Its corrections. 11 October 2026:\n`POST /documents` no longer takes the types `build` and `stocktake`. Completing a\nproduct and posting a stock count write those documents. 24 October 2026: a receipt's\ncharge takes a `kind` from its list only — freight, duty, import VAT, handling,\ninsurance, packaging, commission, rounding. Interest or a penalty capitalised as a\ncharge is not part of acquisition cost. And an opening not in the company's books,\ndated after the first day of its accounting period, is asked about\n(`opening.mid_period`) until it is sent with `confirm`. 5 November 2026: a new\nreceipt is posted by `POST /receipts`, which keeps its vendor, DUZP, tax and\ninvoice — a gift or a sample too, with its reason; `POST /documents` answers\n`type: receipt` with 422 `receipt.own_form`.",
		"title": "Manufik API",
		"version": "1"
	},
	"openapi": "3.1.0",
	"paths": {
		"/api/v1/boms": {
			"get": {
				"description": "Everything whose composition is not `none`, whether or not it has a revision yet.",
				"operationId": "list-made-parts",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListMadeOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "List the parts we make"
			}
		},
		"/api/v1/build-jobs": {
			"get": {
				"description": "Newest first, one row per build order with its products summed up.",
				"operationId": "list-build-jobs",
				"parameters": [
					{
						"description": "Empty means every state; live is everything not finished or cancelled.",
						"explode": false,
						"in": "query",
						"name": "status",
						"schema": {
							"description": "Empty means every state; live is everything not finished or cancelled.",
							"enum": [
								"new",
								"reserved",
								"in_progress",
								"partial",
								"posted",
								"cancelled",
								"live"
							],
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-build-jobsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "List build orders"
			},
			"post": {
				"description": "Numbered when it is raised. Each product is reserved, started and completed on its own, and holds nothing until it is reserved.",
				"operationId": "open-build-job",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/OpenBuildJobInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/OpenedBuildJobOutputBody"
								}
							}
						},
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Raise a build order of one or more products"
			}
		},
		"/api/v1/build-jobs/{id}": {
			"get": {
				"operationId": "get-build-job",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/BuildJobDetail"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read one build order and its products"
			},
			"patch": {
				"description": "The header only, in any state: who a finished build order was for can still be put right. A field left out is left as it is; a field sent empty is cleared. The customer is not changed to another than the one goods issues naming the build order went to (build_job.delivered_to_other); for stock — none — always is.",
				"operationId": "update-build-job",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateBuildJobInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Correct who a build order is for, when, and what they call it"
			}
		},
		"/api/v1/build-jobs/{id}/cancel": {
			"post": {
				"description": "What was completed stays completed: a product in stock is not unmade by a customer changing their mind.",
				"operationId": "cancel-build-job",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Abandon every product of a build order not yet completed"
			}
		},
		"/api/v1/build-jobs/{id}/release-stock": {
			"post": {
				"description": "The lines stay, as demand: they can be reserved again.",
				"operationId": "release-job-stock",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Give back what a build order's lines from stock hold"
			}
		},
		"/api/v1/build-jobs/{id}/reserve-stock": {
			"post": {
				"description": "Every line that holds nothing — written and not reserved, or reserved past its date — together, or none of them: refused, naming what is short, when the quantity is not free. Free is what may be taken less what build orders and other customers hold.",
				"operationId": "reserve-job-stock",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ReserveStockInputBody"
							}
						}
					}
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Hold a build order's lines from stock for its customer"
			}
		},
		"/api/v1/builds": {
			"get": {
				"description": "Newest first. An open order is a plan and has no cost yet; a posted one points at the document it became.",
				"operationId": "list-builds",
				"parameters": [
					{
						"description": "Empty means every state.",
						"explode": false,
						"in": "query",
						"name": "status",
						"schema": {
							"description": "Empty means every state.",
							"enum": [
								"new",
								"reserved",
								"in_progress",
								"posted",
								"cancelled"
							],
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListBuildsOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "List the products of build orders"
			}
		},
		"/api/v1/builds/{id}": {
			"get": {
				"operationId": "get-build",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/BuildRow"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read one product of a build order"
			}
		},
		"/api/v1/builds/{id}/requirements": {
			"get": {
				"description": "Free is on hand less what other orders hold. An order that already holds does not count itself.",
				"operationId": "build-requirements",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Build-requirementsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What this order needs, and whether it is there"
			}
		},
		"/api/v1/customers": {
			"get": {
				"operationId": "list-customers",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-customersResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Who we make things for"
			},
			"post": {
				"operationId": "create-customer",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CustomerBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Add a customer"
			}
		},
		"/api/v1/customers/{code}": {
			"patch": {
				"description": "The code is not among them: it is in every build order that names them. A field left out is left as it is; a field sent empty is cleared.",
				"operationId": "update-customer",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CustomerPatch"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Change a customer's details"
			}
		},
		"/api/v1/documents": {
			"get": {
				"description": "Newest first, by accounting date and then by the sequence they were posted in. In blocks: pass the previous block's next as after.",
				"operationId": "list-documents",
				"parameters": [
					{
						"description": "Comma-separated document types. Empty means every type.",
						"explode": false,
						"in": "query",
						"name": "type",
						"schema": {
							"description": "Comma-separated document types. Empty means every type.",
							"type": "string"
						}
					},
					{
						"description": "Accounting date, inclusive.",
						"explode": false,
						"in": "query",
						"name": "from",
						"schema": {
							"description": "Accounting date, inclusive.",
							"format": "date",
							"type": "string"
						}
					},
					{
						"description": "Accounting date, inclusive.",
						"explode": false,
						"in": "query",
						"name": "to",
						"schema": {
							"description": "Accounting date, inclusive.",
							"format": "date",
							"type": "string"
						}
					},
					{
						"description": "Only documents touching this part.",
						"explode": false,
						"in": "query",
						"name": "pn",
						"schema": {
							"description": "Only documents touching this part.",
							"type": "string"
						}
					},
					{
						"description": "Include revisions that a later one replaced. Off by default: they are history, not entries.",
						"explode": false,
						"in": "query",
						"name": "superseded",
						"schema": {
							"description": "Include revisions that a later one replaced. Off by default: they are history, not entries.",
							"type": "boolean"
						}
					},
					{
						"description": "Only the receipts still waiting for their invoice, or with a charge still an estimate, as of the company's today — what the overview's tile counts. No drafts.",
						"explode": false,
						"in": "query",
						"name": "waiting",
						"schema": {
							"description": "Only the receipts still waiting for their invoice, or with a charge still an estimate, as of the company's today — what the overview's tile counts. No drafts.",
							"type": "boolean"
						}
					},
					{
						"description": "The next of the previous block. Empty is the first block, which also carries the drafts and the total.",
						"explode": false,
						"in": "query",
						"name": "after",
						"schema": {
							"description": "The next of the previous block. Empty is the first block, which also carries the drafts and the total.",
							"type": "string"
						}
					},
					{
						"explode": false,
						"in": "query",
						"name": "limit",
						"schema": {
							"default": 100,
							"format": "int64",
							"maximum": 500,
							"minimum": 1,
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListDocumentsOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "List documents"
			},
			"post": {
				"description": "A posted document is final for a program: it is corrected in the application, by a new revision under the same number — never by posting a second document, which would count twice.",
				"operationId": "post-document",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PostDocumentInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PostDocumentOutputBody"
								}
							}
						},
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Post a document"
			}
		},
		"/api/v1/documents/preview": {
			"post": {
				"description": "The same calculation the posting runs, over the draft's own lines, against what the parts held at the end of the accounting date given. Nothing is written and nothing is numbered. An `output` takes its value from the issues sharing the document.",
				"operationId": "preview-document",
				"parameters": [
					{
						"description": "The revision a correction would replace, by id: it is previewed as though that revision had not taken or given anything. Absent for a new document.",
						"explode": false,
						"in": "query",
						"name": "corrects",
						"schema": {
							"description": "The revision a correction would replace, by id: it is previewed as though that revision had not taken or given anything. Absent for a new document.",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PostDocumentInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/DocumentPreview"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What this document would be worth, without posting it"
			}
		},
		"/api/v1/documents/{id}": {
			"get": {
				"description": "Header, lines with the cost each came to, and every revision under the same number.",
				"operationId": "get-document",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetDocumentOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read one document"
			}
		},
		"/api/v1/drafts": {
			"get": {
				"description": "Most recently touched first. They also appear in the document list, marked as drafts.",
				"operationId": "list-drafts",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-draftsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Documents somebody has started"
			}
		},
		"/api/v1/drafts/{id}": {
			"delete": {
				"operationId": "delete-draft",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "When the draft was last saved, as get-draft answered it. Given, a draft somebody saved since is not thrown away: 409 draft.changed_meanwhile. A draft already gone is gone either way.",
						"explode": false,
						"in": "query",
						"name": "updated_at",
						"schema": {
							"description": "When the draft was last saved, as get-draft answered it. Given, a draft somebody saved since is not thrown away: 409 draft.changed_meanwhile. A draft already gone is gone either way.",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Throw one away"
			},
			"get": {
				"operationId": "get-draft",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/DraftBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read one back to carry on with"
			},
			"put": {
				"description": "The client chooses the id, so a draft that has never reached the server and one that has are the same thing to it.",
				"operationId": "save-draft",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/DraftBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content",
						"headers": {
							"Draft-Saved-At": {
								"schema": {
									"description": "When this save happened: what to send as updated_at with the next one.",
									"type": "string"
								}
							}
						}
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Write down where somebody has got to"
			}
		},
		"/api/v1/events": {
			"get": {
				"description": "The feed a webhook is sent, to be asked instead: thin events, oldest first, kept thirty days. Only events about what the caller's role may read. Keep the id of the last event seen and ask for what came after it.",
				"operationId": "list-events",
				"parameters": [
					{
						"description": "The id of the last event already seen. Empty is from the oldest kept.",
						"explode": false,
						"in": "query",
						"name": "after",
						"schema": {
							"description": "The id of the last event already seen. Empty is from the oldest kept.",
							"type": "string"
						}
					},
					{
						"description": "Comma-separated types. Empty is every type the key's role may read.",
						"explode": false,
						"in": "query",
						"name": "type",
						"schema": {
							"description": "Comma-separated types. Empty is every type the key's role may read.",
							"type": "string"
						}
					},
					{
						"explode": false,
						"in": "query",
						"name": "limit",
						"schema": {
							"default": 100,
							"format": "int64",
							"maximum": 500,
							"minimum": 1,
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/FeedOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What happened in the company, in order, after an event already seen"
			}
		},
		"/api/v1/locations": {
			"get": {
				"description": "Ordered by warehouse path and then by code, which is the order they are walked in.",
				"operationId": "list-locations",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListLocationsOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "List bins"
			}
		},
		"/api/v1/locations/{code}": {
			"get": {
				"operationId": "get-location",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetLocationOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What is in one bin"
			}
		},
		"/api/v1/orders": {
			"get": {
				"operationId": "list-purchase-orders",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-purchase-ordersResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What we have ordered"
			},
			"post": {
				"description": "With `from_builds`, it is filled with whatever the unfinished products of build orders are short of and this vendor has a number for.",
				"operationId": "create-purchase-order",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/Create-purchase-orderRequest"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Create-purchase-orderResponse"
								}
							}
						},
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Start an order to a vendor"
			}
		},
		"/api/v1/orders/{number}": {
			"get": {
				"description": "The list is generated now rather than stored: their packaging is theirs to change.",
				"operationId": "get-purchase-order",
				"parameters": [
					{
						"in": "path",
						"name": "number",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Get-purchase-orderResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "One order, its lines, and the list the vendor reads"
			}
		},
		"/api/v1/orders/{number}/cancel": {
			"post": {
				"description": "A draft or an order already sent. Refused once anything has arrived against it — close that one instead.",
				"operationId": "cancel-purchase-order",
				"parameters": [
					{
						"in": "path",
						"name": "number",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/Cancel-purchase-orderRequest"
							}
						}
					}
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Say it is not going to happen"
			}
		},
		"/api/v1/orders/{number}/lines/{pn}": {
			"delete": {
				"operationId": "delete-purchase-line",
				"parameters": [
					{
						"in": "path",
						"name": "number",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Take a part off an order"
			},
			"put": {
				"description": "A part that is assembled puts its components on instead, recursively — you cannot buy a board we make. Only components this vendor has a number for go on; the rest come back in `skipped`. What a customer supplies is never ordered: such a component comes back in `customer_owned`, and such a part asked for by itself is refused. An assembled part with no released revision, which this vendor has a number for, goes on as itself. A part already on the order has its quantity set, whatever it is made of: nothing is unfolded.",
				"operationId": "set-purchase-line",
				"parameters": [
					{
						"in": "path",
						"name": "number",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/Set-purchase-lineRequest"
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/SetPurchaseLineOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Put a part on an order, or change how many"
			}
		},
		"/api/v1/orders/{number}/send": {
			"post": {
				"operationId": "send-purchase-order",
				"parameters": [
					{
						"in": "path",
						"name": "number",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Say it has gone to the vendor"
			}
		},
		"/api/v1/parts": {
			"get": {
				"operationId": "list-parts",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListPartsOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Parts and what is on hand"
			},
			"post": {
				"operationId": "create-part",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreatePartInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PartView"
								}
							}
						},
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Add a part"
			}
		},
		"/api/v1/parts/{pn}": {
			"patch": {
				"description": "The number never changes. What else may change depends on whether anything has moved: before the first movement everything can; after it the unit, whether it is tracked by serial number, its class of stock and whether the customer owns it are fixed, and everything else may still change. A field left out is left as it is; a field sent empty is cleared.",
				"operationId": "update-part",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdatePartInputBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Correct a part"
			}
		},
		"/api/v1/parts/{pn}/bom": {
			"get": {
				"description": "The revision's lines, what each component costs and whether it is itself made, plus every revision of the part.",
				"operationId": "get-bom",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Which revision. Empty means the released one, or the newest draft if none is released.",
						"explode": false,
						"in": "query",
						"name": "rev",
						"schema": {
							"description": "Which revision. Empty means the released one, or the newest draft if none is released.",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetBOMOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read one bill of materials"
			}
		},
		"/api/v1/parts/{pn}/cost": {
			"get": {
				"operationId": "get-part-cost",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetPartCostOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "The arrivals the average is made of"
			}
		},
		"/api/v1/parts/{pn}/serial": {
			"get": {
				"description": "As get-serial, for any number: one with a slash in it cannot be a path segment.",
				"operationId": "get-serial-by-query",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "The piece's number, as on its label.",
						"explode": false,
						"in": "query",
						"name": "serial",
						"required": true,
						"schema": {
							"description": "The piece's number, as on its label.",
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetSerialOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "One piece, and everywhere it has been — its number in the query"
			}
		},
		"/api/v1/parts/{pn}/serials/{serial}": {
			"get": {
				"description": "Addressed by part and number together, because the number alone does not identify a piece. A number with a slash in it cannot be a path segment: get-serial-by-query takes it in the query.",
				"operationId": "get-serial",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "serial",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetSerialOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "One piece, and everywhere it has been"
			}
		},
		"/api/v1/parts/{pn}/stock": {
			"get": {
				"operationId": "get-part-stock",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GetPartStockOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Which bins hold one part, and how many"
			}
		},
		"/api/v1/parts/{pn}/vendors": {
			"get": {
				"description": "The other way round from get-vendor.",
				"operationId": "list-part-vendors",
				"parameters": [
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-part-vendorsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Who sells one part, and what they call it"
			}
		},
		"/api/v1/reasons": {
			"get": {
				"description": "Read off the chart of accounts, because a reason nothing maps stops a handover rather than labelling one. Narrow with the type query to what a particular kind of document may say.",
				"operationId": "list-reasons",
				"parameters": [
					{
						"description": "A document type: scrap, stocktake, revaluation, issue or receipt. Empty is every reason the chart knows.",
						"explode": false,
						"in": "query",
						"name": "type",
						"schema": {
							"description": "A document type: scrap, stocktake, revaluation, issue or receipt. Empty is every reason the chart knows.",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-reasonsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "The reasons a document may give"
			}
		},
		"/api/v1/receipts": {
			"post": {
				"description": "The one place a price enters the system. Charges are allocated across the lines by largest remainder, so the shares sum to the charge exactly.",
				"operationId": "post-receipt",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ReceiptBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PostDocumentOutputBody"
								}
							}
						},
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Post a goods receipt"
			}
		},
		"/api/v1/receipts/preview": {
			"post": {
				"description": "The same allocation the posting does, so what a preview promises and what the posting writes cannot drift. Nothing is written and nothing is numbered.",
				"operationId": "preview-receipt",
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ReceiptBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PreviewReceiptOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What this receipt would cost, without posting it"
			}
		},
		"/api/v1/receipts/{id}": {
			"get": {
				"description": "In the shape it was posted in — unit prices and charges, not movements.",
				"operationId": "get-receipt",
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"format": "uuid",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReceiptRead"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Read a posted goods receipt back"
			}
		},
		"/api/v1/serials": {
			"get": {
				"description": "A number may belong to more than one part — a product and the board inside it commonly share one — so every row names its part.",
				"operationId": "list-serials",
				"parameters": [
					{
						"description": "Part of a serial number. Empty lists everything.",
						"explode": false,
						"in": "query",
						"name": "q",
						"schema": {
							"description": "Part of a serial number. Empty lists everything.",
							"type": "string"
						}
					},
					{
						"description": "Only this part.",
						"explode": false,
						"in": "query",
						"name": "pn",
						"schema": {
							"description": "Only this part.",
							"type": "string"
						}
					},
					{
						"description": "Only pieces currently on the shelf.",
						"explode": false,
						"in": "query",
						"name": "on_hand",
						"schema": {
							"description": "Only pieces currently on the shelf.",
							"type": "boolean"
						}
					},
					{
						"description": "yes: only on the shelf; no: only pieces that have left. Empty is either.",
						"explode": false,
						"in": "query",
						"name": "stocked",
						"schema": {
							"description": "yes: only on the shelf; no: only pieces that have left. Empty is either.",
							"enum": [
								"yes",
								"no",
								""
							],
							"type": "string"
						}
					},
					{
						"description": "Only pieces of parts of this class of stock.",
						"explode": false,
						"in": "query",
						"name": "class",
						"schema": {
							"description": "Only pieces of parts of this class of stock.",
							"enum": [
								"material",
								"goods",
								"semi",
								"product",
								""
							],
							"type": "string"
						}
					},
					{
						"description": "yes: only parts made of other parts; no: only the rest.",
						"explode": false,
						"in": "query",
						"name": "composed",
						"schema": {
							"description": "yes: only parts made of other parts; no: only the rest.",
							"enum": [
								"yes",
								"no",
								""
							],
							"type": "string"
						}
					},
					{
						"description": "The next of the previous block. Empty is the first block, which also carries the total.",
						"explode": false,
						"in": "query",
						"name": "after",
						"schema": {
							"description": "The next of the previous block. Empty is the first block, which also carries the total.",
							"type": "string"
						}
					},
					{
						"explode": false,
						"in": "query",
						"name": "limit",
						"schema": {
							"default": 200,
							"format": "int64",
							"maximum": 500,
							"minimum": 1,
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ListSerialsOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Find a serial number"
			}
		},
		"/api/v1/turnover": {
			"get": {
				"description": "Quantities and values from the stored costs, net of returns; a part the customer owns is never valued and is counted apart. A closed period's figures are worked out from the movements; the valuation at a date reads the closing snapshot instead.",
				"operationId": "turnover",
				"parameters": [
					{
						"description": "The first day. Default the first of this month.",
						"explode": false,
						"in": "query",
						"name": "from",
						"schema": {
							"description": "The first day. Default the first of this month.",
							"format": "date",
							"type": "string"
						}
					},
					{
						"description": "The last day. Default today.",
						"explode": false,
						"in": "query",
						"name": "to",
						"schema": {
							"description": "The last day. Default today.",
							"format": "date",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/TurnoverOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Opening, in, out, revaluation and closing per part over a period"
			}
		},
		"/api/v1/units": {
			"get": {
				"description": "A controlled list, the same in every company, so that g, gram, gramy and G do not become four units.",
				"operationId": "list-units",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-unitsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "The units a quantity may be counted in"
			}
		},
		"/api/v1/valuation": {
			"get": {
				"description": "A closed year answers from the snapshot taken when it was closed. An open one is recomputed and says so.",
				"operationId": "valuation",
				"parameters": [
					{
						"description": "The date to value stock at: today at the latest, by the company's own day. A later one is refused, 422 date.future.",
						"explode": false,
						"in": "query",
						"name": "on",
						"schema": {
							"description": "The date to value stock at: today at the latest, by the company's own day. A later one is refused, 422 date.future.",
							"format": "date",
							"type": "string"
						}
					},
					{
						"description": "RFC 3339. Answers 'as it was reported' rather than 'what I actually had'. The last day of a closed year is its closing snapshot as it stood then, or a replay as known then if the year had not yet been closed. Documents and allowances are read as known then; a work-in-progress record is read as it stands today, by the day it was last saved, and one removed since is not there.",
						"explode": false,
						"in": "query",
						"name": "known_at",
						"schema": {
							"description": "RFC 3339. Answers 'as it was reported' rather than 'what I actually had'. The last day of a closed year is its closing snapshot as it stood then, or a replay as known then if the year had not yet been closed. Documents and allowances are read as known then; a work-in-progress record is read as it stands today, by the day it was last saved, and one removed since is not there.",
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ValuationOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Stock and its value at a date"
			}
		},
		"/api/v1/vendors": {
			"get": {
				"operationId": "list-vendors",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-vendorsResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Who we buy from"
			},
			"post": {
				"operationId": "create-vendor",
				"parameters": [
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/VendorBody"
							}
						}
					},
					"required": true
				},
				"responses": {
					"201": {
						"description": "Created"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Conflict"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Add a vendor"
			}
		},
		"/api/v1/vendors/{code}": {
			"get": {
				"operationId": "get-vendor",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Get-vendorResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "One vendor, and every part they have a number for"
			},
			"patch": {
				"description": "The code is not among them: it is on receipts and in order lists already. A field left out is left as it is; a field sent empty is cleared.",
				"operationId": "update-vendor",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/VendorPatch"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Change a vendor's details"
			}
		},
		"/api/v1/vendors/{code}/catalogue": {
			"get": {
				"operationId": "list-vendor-catalogue",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Substring of their number or their description.",
						"explode": false,
						"in": "query",
						"name": "q",
						"schema": {
							"description": "Substring of their number or their description.",
							"type": "string"
						}
					},
					{
						"explode": false,
						"in": "query",
						"name": "matched",
						"schema": {
							"default": "all",
							"enum": [
								"all",
								"yes",
								"no"
							],
							"type": "string"
						}
					},
					{
						"description": "The next of the previous block. Empty is the first block.",
						"explode": false,
						"in": "query",
						"name": "after",
						"schema": {
							"description": "The next of the previous block. Empty is the first block.",
							"type": "string"
						}
					},
					{
						"explode": false,
						"in": "query",
						"name": "limit",
						"schema": {
							"default": 200,
							"format": "int64",
							"maximum": 1000,
							"minimum": 1,
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/VendorCatalogueOutputBody"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What this vendor sells, and which of it we have matched"
			}
		},
		"/api/v1/vendors/{code}/parts/{pn}": {
			"delete": {
				"operationId": "delete-vendor-part",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "Forget that this vendor sells this part"
			},
			"put": {
				"description": "Idempotent: the pair is the key, so setting it twice corrects it rather than duplicating it. A number of theirs another part already has is refused, naming that part: it is moved on the vendor's catalogue.",
				"operationId": "set-vendor-part",
				"parameters": [
					{
						"in": "path",
						"name": "code",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "pn",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A name the program gives this request, so that sending it again does not do it twice — see Sending a request again.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": false,
						"schema": {
							"maxLength": 200,
							"minLength": 1,
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/Set-vendor-partRequest"
							}
						}
					},
					"required": true
				},
				"responses": {
					"204": {
						"description": "No Content"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Forbidden"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "What this vendor calls one of our parts"
			}
		},
		"/api/v1/warehouses": {
			"get": {
				"description": "Depth-first from each root, which is the order a tree is read in.",
				"operationId": "list-warehouses",
				"responses": {
					"200": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/List-warehousesResponse"
								}
							}
						},
						"description": "OK"
					},
					"401": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "No key, or none this system will take — missing, not one of this system's, or expired: api.key_invalid; revoked: api.key_revoked. A key that ran out minutes ago may be answered api.key_expired"
					},
					"403": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The key's role may not do this"
					},
					"404": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Not Found"
					},
					"409": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "The state does not allow it — or the company's plan does not include the public API: plan.feature_off"
					},
					"422": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Unprocessable Entity"
					},
					"429": {
						"description": "Too many requests: the company's programs are past their allowance"
					},
					"500": {
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Fault"
								}
							}
						},
						"description": "Internal Server Error"
					}
				},
				"security": [
					{
						"apiKey": []
					}
				],
				"summary": "The warehouse tree"
			}
		}
	},
	"servers": [
		{
			"description": "This system",
			"url": "/"
		}
	]
}
