{
 "components": {
  "schemas": {
   "AddressInput": {
    "additionalProperties": false,
    "description": "An address, written as a whole.\n\nEvery part is set from the object, so an omitted part is cleared. Omit the\nobject to leave the address unchanged.",
    "properties": {
     "city": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "City"
     },
     "line1": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Line1"
     },
     "line2": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Line2"
     },
     "postal_code": {
      "anyOf": [
       {
        "maxLength": 20,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Postal or ZIP code.",
      "title": "Postal Code"
     },
     "state": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Province or state. Free text.",
      "title": "State"
     }
    },
    "title": "AddressInput",
    "type": "object"
   },
   "AllergenCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /allergens`.",
    "properties": {
     "code": {
      "anyOf": [
       {
        "maxLength": 40,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "is_major_allergen": {
      "default": false,
      "title": "Is Major Allergen",
      "type": "boolean"
     },
     "name": {
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "name_fr": {
      "maxLength": 100,
      "minLength": 1,
      "title": "Name Fr",
      "type": "string"
     },
     "regulatory_reference": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Regulatory Reference"
     }
    },
    "required": [
     "name",
     "name_fr"
    ],
    "title": "AllergenCreateRequest",
    "type": "object"
   },
   "AllergenUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /allergens/{allergen_id}`. Omitted fields are left unchanged.",
    "properties": {
     "code": {
      "anyOf": [
       {
        "maxLength": 40,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "is_major_allergen": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Is Major Allergen"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "name_fr": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name Fr"
     },
     "regulatory_reference": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Regulatory Reference"
     }
    },
    "title": "AllergenUpdateRequest",
    "type": "object"
   },
   "BillCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /bills`. Recorded with no tax; taxes are not written through v1.",
    "properties": {
     "bill_date": {
      "description": "The date on the supplier's invoice.",
      "format": "date",
      "title": "Bill Date",
      "type": "string"
     },
     "lines": {
      "description": "At least 1 line and at most 1000, for at most 200 different products. Each line receives stock.",
      "items": {
       "$ref": "#/components/schemas/BillLineRequest"
      },
      "maxItems": 1000,
      "minItems": 1,
      "title": "Lines",
      "type": "array"
     },
     "notes": {
      "anyOf": [
       {
        "maxLength": 2000,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "purchase_order_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Links the bill to one of your orders, without changing its status.",
      "title": "Purchase Order Id"
     },
     "supplier_id": {
      "exclusiveMinimum": 0.0,
      "title": "Supplier Id",
      "type": "integer"
     },
     "supplier_reference": {
      "anyOf": [
       {
        "maxLength": 255,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Usually the supplier's own invoice number.",
      "title": "Supplier Reference"
     }
    },
    "required": [
     "supplier_id",
     "bill_date",
     "lines"
    ],
    "title": "BillCreateRequest",
    "type": "object"
   },
   "BillLineRequest": {
    "additionalProperties": false,
    "description": "One line of a bill, in the product's purchase unit. Each line receives stock.",
    "properties": {
     "cost": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per purchase unit.",
      "title": "Cost"
     },
     "discount_rate": {
      "anyOf": [
       {
        "maximum": 100.0,
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Discount Rate"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Refused with 409 when the lot exists with a different expiry.",
      "title": "Expiration Date"
     },
     "location_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where the stock lands: one of your warehouses or a location in one.",
      "title": "Location Id"
     },
     "lot_number": {
      "description": "The supplier's lot code.",
      "maxLength": 100,
      "minLength": 1,
      "title": "Lot Number",
      "type": "string"
     },
     "product_id": {
      "description": "A product in your account.",
      "exclusiveMinimum": 0.0,
      "title": "Product Id",
      "type": "integer"
     },
     "quantity": {
      "description": "In the product's purchase unit.",
      "exclusiveMinimum": 0.0,
      "title": "Quantity",
      "type": "number"
     },
     "supplier_partno": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Partno"
     }
    },
    "required": [
     "product_id",
     "quantity",
     "lot_number"
    ],
    "title": "BillLineRequest",
    "type": "object"
   },
   "CustomerCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /customers`.\n\nShipping addresses are added afterwards, one at a time, through\n`/customers/{customer_id}/shipping-addresses`.",
    "properties": {
     "active": {
      "default": true,
      "title": "Active",
      "type": "boolean"
     },
     "address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "company": {
      "description": "The customer name.",
      "maxLength": 100,
      "minLength": 1,
      "title": "Company",
      "type": "string"
     },
     "contact": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "customer_code": {
      "description": "Your reference for this customer, unique within your account. Stored trimmed and upper-cased.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Customer Code",
      "type": "string"
     },
     "customer_type_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Type Id"
     },
     "email": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "price_list_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Price List Id"
     },
     "salesperson_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Salesperson Id"
     },
     "shipping_method_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Shipping Method Id"
     },
     "tag_ids": {
      "anyOf": [
       {
        "items": {
         "exclusiveMinimum": 0.0,
         "type": "integer"
        },
        "maxItems": 100,
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "The customer's complete set of tags, each a tag of your account. Replaces the current set; `[]` removes every tag.",
      "title": "Tag Ids"
     },
     "tax_rate_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tax Rate Id"
     },
     "territory_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Territory Id"
     },
     "website": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "required": [
     "customer_code",
     "company"
    ],
    "title": "CustomerCreateRequest",
    "type": "object"
   },
   "CustomerUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /customers/{customer_id}`. Omitted fields are left unchanged.",
    "properties": {
     "active": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Active"
     },
     "address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "company": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "contact": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "customer_code": {
      "anyOf": [
       {
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Code"
     },
     "customer_type_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Type Id"
     },
     "email": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "price_list_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Price List Id"
     },
     "salesperson_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Salesperson Id"
     },
     "shipping_method_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Shipping Method Id"
     },
     "tag_ids": {
      "anyOf": [
       {
        "items": {
         "exclusiveMinimum": 0.0,
         "type": "integer"
        },
        "maxItems": 100,
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "Replaces the current set of tags; `[]` removes every tag.",
      "title": "Tag Ids"
     },
     "tax_rate_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tax Rate Id"
     },
     "territory_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Territory Id"
     },
     "website": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "title": "CustomerUpdateRequest",
    "type": "object"
   },
   "EquipmentCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /equipment`.",
    "properties": {
     "code": {
      "description": "Unique within your account. Stored trimmed and upper-cased.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Code",
      "type": "string"
     },
     "name": {
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "out_of_service": {
      "default": false,
      "description": "True marks the equipment unavailable for production.",
      "title": "Out Of Service",
      "type": "boolean"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where it is. One of your warehouses.",
      "title": "Warehouse Id"
     }
    },
    "required": [
     "code",
     "name"
    ],
    "title": "EquipmentCreateRequest",
    "type": "object"
   },
   "EquipmentUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /equipment/{equipment_id}`.\n\nOmitted fields are left unchanged. A null `warehouse_id` clears it; `code`,\n`name` and `out_of_service` cannot be null.",
    "properties": {
     "code": {
      "anyOf": [
       {
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "out_of_service": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Out Of Service"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Warehouse Id"
     }
    },
    "title": "EquipmentUpdateRequest",
    "type": "object"
   },
   "EventData": {
    "description": "What changed.",
    "properties": {
     "changed": {
      "description": "Fields whose value actually moved. Empty on a `.created`, where everything is new. Bookkeeping columns (`updated_at`, integration ids) never appear here and never trigger an event on their own.",
      "examples": [
       [
        "status"
       ]
      ],
      "items": {
       "type": "string"
      },
      "title": "Changed",
      "type": "array"
     },
     "id": {
      "description": "Its id in this account. Fetch it with the matching `GET`.",
      "examples": [
       41207
      ],
      "title": "Id",
      "type": "integer"
     },
     "object_type": {
      "description": "The kind of record, e.g. `sales_order`.",
      "examples": [
       "sales_order"
      ],
      "title": "Object Type",
      "type": "string"
     },
     "snapshot": {
      "additionalProperties": true,
      "description": "A few scalar fields as they were **at the time of the event**, to route on. Never monetary, and never the whole record: `GET` the resource for current, complete and correctly scoped state.",
      "examples": [
       {
        "id": 41207,
        "sales_order_no": "SO-1042",
        "status": "SHIPPED"
       }
      ],
      "title": "Snapshot",
      "type": "object"
     }
    },
    "required": [
     "object_type",
     "id"
    ],
    "title": "EventData",
    "type": "object"
   },
   "EventSource": {
    "description": "Who caused the change.\n\nRead this before acting. If an event names your own key, it is the echo of\na write you just made, so skip it; otherwise your handler and NutraSoft can\nkeep answering each other. Endpoints can also be configured to drop these\nserver-side, in Settings, which needs no code.\n\nThe key is named by its prefix and last four characters, which are the two\nthings the keys page still shows you after a key is created, so you can\ncompare them against a key you hold.",
    "properties": {
     "key_last4": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Present only when `type` is `api`. The last four characters of that key.",
      "title": "Key Last4"
     },
     "key_prefix": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Present only when `type` is `api`. The start of the key that made the change, as shown on the keys page, for example `nsk_live_WGj`.",
      "title": "Key Prefix"
     },
     "type": {
      "description": "`webapp` is a person in NutraSoft, `api` is a call made with one of the account's API keys, `system` is the scheduler or one of NutraSoft's own integrations.",
      "enum": [
       "webapp",
       "api",
       "system"
      ],
      "title": "Type",
      "type": "string"
     }
    },
    "required": [
     "type"
    ],
    "title": "EventSource",
    "type": "object"
   },
   "FoodCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /foods`. Nutrient values cannot be written in v1.",
    "properties": {
     "name": {
      "description": "English name.",
      "maxLength": 254,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "name_fr": {
      "description": "French name.",
      "maxLength": 254,
      "minLength": 1,
      "title": "Name Fr",
      "type": "string"
     },
     "source": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where the nutrition data came from, e.g. a reference database.",
      "title": "Source"
     },
     "suggested_yield_description": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Suggested Yield Description"
     },
     "suggested_yield_pct": {
      "default": 0,
      "description": "Percentage of the raw weight left after preparation.",
      "maximum": 100.0,
      "minimum": 0.0,
      "title": "Suggested Yield Pct",
      "type": "number"
     }
    },
    "required": [
     "name",
     "name_fr"
    ],
    "title": "FoodCreateRequest",
    "type": "object"
   },
   "FoodUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /foods/{food_id}`. Nutrient values are left unchanged.",
    "properties": {
     "name": {
      "anyOf": [
       {
        "maxLength": 254,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "name_fr": {
      "anyOf": [
       {
        "maxLength": 254,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name Fr"
     },
     "source": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Source"
     },
     "suggested_yield_description": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Suggested Yield Description"
     },
     "suggested_yield_pct": {
      "anyOf": [
       {
        "maximum": 100.0,
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Suggested Yield Pct"
     }
    },
    "title": "FoodUpdateRequest",
    "type": "object"
   },
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
     }
    },
    "title": "HTTPValidationError",
    "type": "object"
   },
   "ItemResponse_PublicAllergen_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicAllergen"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicAllergen]",
    "type": "object"
   },
   "ItemResponse_PublicBill_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicBill"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicBill]",
    "type": "object"
   },
   "ItemResponse_PublicCountry_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicCountry"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicCountry]",
    "type": "object"
   },
   "ItemResponse_PublicCustomerType_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicCustomerType"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicCustomerType]",
    "type": "object"
   },
   "ItemResponse_PublicCustomer_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicCustomer"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicCustomer]",
    "type": "object"
   },
   "ItemResponse_PublicEmployee_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicEmployee"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicEmployee]",
    "type": "object"
   },
   "ItemResponse_PublicEquipment_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicEquipment"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicEquipment]",
    "type": "object"
   },
   "ItemResponse_PublicFood_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicFood"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicFood]",
    "type": "object"
   },
   "ItemResponse_PublicInvoice_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicInvoice"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicInvoice]",
    "type": "object"
   },
   "ItemResponse_PublicNutrient_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicNutrient"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicNutrient]",
    "type": "object"
   },
   "ItemResponse_PublicOperation_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicOperation"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicOperation]",
    "type": "object"
   },
   "ItemResponse_PublicOrganization_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicOrganization"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicOrganization]",
    "type": "object"
   },
   "ItemResponse_PublicPreservation_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicPreservation"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicPreservation]",
    "type": "object"
   },
   "ItemResponse_PublicPriceList_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicPriceList"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicPriceList]",
    "type": "object"
   },
   "ItemResponse_PublicProductLot_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicProductLot"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicProductLot]",
    "type": "object"
   },
   "ItemResponse_PublicProduct_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicProduct"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicProduct]",
    "type": "object"
   },
   "ItemResponse_PublicProductionLine_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicProductionLine"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicProductionLine]",
    "type": "object"
   },
   "ItemResponse_PublicProduction_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicProduction"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicProduction]",
    "type": "object"
   },
   "ItemResponse_PublicPurchaseOrder_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicPurchaseOrder"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicPurchaseOrder]",
    "type": "object"
   },
   "ItemResponse_PublicQCCheckpoint_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicQCCheckpoint"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicQCCheckpoint]",
    "type": "object"
   },
   "ItemResponse_PublicQCUnitOfMeasure_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicQCUnitOfMeasure"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicQCUnitOfMeasure]",
    "type": "object"
   },
   "ItemResponse_PublicSalesOrder_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicSalesOrder"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicSalesOrder]",
    "type": "object"
   },
   "ItemResponse_PublicSalesperson_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicSalesperson"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicSalesperson]",
    "type": "object"
   },
   "ItemResponse_PublicShippingAddress_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicShippingAddress"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicShippingAddress]",
    "type": "object"
   },
   "ItemResponse_PublicShippingMethod_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicShippingMethod"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicShippingMethod]",
    "type": "object"
   },
   "ItemResponse_PublicSupplier_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicSupplier"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicSupplier]",
    "type": "object"
   },
   "ItemResponse_PublicTag_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicTag"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicTag]",
    "type": "object"
   },
   "ItemResponse_PublicTaxRate_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicTaxRate"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicTaxRate]",
    "type": "object"
   },
   "ItemResponse_PublicTerritory_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicTerritory"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicTerritory]",
    "type": "object"
   },
   "ItemResponse_PublicUnitOfMeasure_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicUnitOfMeasure"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicUnitOfMeasure]",
    "type": "object"
   },
   "ItemResponse_PublicWarehouse_": {
    "properties": {
     "data": {
      "$ref": "#/components/schemas/PublicWarehouse"
     }
    },
    "required": [
     "data"
    ],
    "title": "ItemResponse[PublicWarehouse]",
    "type": "object"
   },
   "ListResponse_PublicAllergen_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicAllergen"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicAllergen]",
    "type": "object"
   },
   "ListResponse_PublicBill_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicBill"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicBill]",
    "type": "object"
   },
   "ListResponse_PublicCountry_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicCountry"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicCountry]",
    "type": "object"
   },
   "ListResponse_PublicCustomerType_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicCustomerType"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicCustomerType]",
    "type": "object"
   },
   "ListResponse_PublicCustomer_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicCustomer"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicCustomer]",
    "type": "object"
   },
   "ListResponse_PublicEmployee_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicEmployee"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicEmployee]",
    "type": "object"
   },
   "ListResponse_PublicEquipment_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicEquipment"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicEquipment]",
    "type": "object"
   },
   "ListResponse_PublicFood_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicFood"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicFood]",
    "type": "object"
   },
   "ListResponse_PublicInvoice_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicInvoice"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicInvoice]",
    "type": "object"
   },
   "ListResponse_PublicNutrient_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicNutrient"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicNutrient]",
    "type": "object"
   },
   "ListResponse_PublicOperation_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicOperation"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicOperation]",
    "type": "object"
   },
   "ListResponse_PublicPreservation_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicPreservation"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicPreservation]",
    "type": "object"
   },
   "ListResponse_PublicPriceList_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicPriceList"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicPriceList]",
    "type": "object"
   },
   "ListResponse_PublicProductLot_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicProductLot"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicProductLot]",
    "type": "object"
   },
   "ListResponse_PublicProduct_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicProduct"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicProduct]",
    "type": "object"
   },
   "ListResponse_PublicProductionLine_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicProductionLine"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicProductionLine]",
    "type": "object"
   },
   "ListResponse_PublicProduction_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicProduction"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicProduction]",
    "type": "object"
   },
   "ListResponse_PublicPurchaseOrder_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicPurchaseOrder"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicPurchaseOrder]",
    "type": "object"
   },
   "ListResponse_PublicQCCheckpoint_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicQCCheckpoint"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicQCCheckpoint]",
    "type": "object"
   },
   "ListResponse_PublicQCUnitOfMeasure_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicQCUnitOfMeasure"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicQCUnitOfMeasure]",
    "type": "object"
   },
   "ListResponse_PublicSalesOrder_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicSalesOrder"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicSalesOrder]",
    "type": "object"
   },
   "ListResponse_PublicSalesperson_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicSalesperson"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicSalesperson]",
    "type": "object"
   },
   "ListResponse_PublicShippingAddress_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicShippingAddress"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicShippingAddress]",
    "type": "object"
   },
   "ListResponse_PublicShippingMethod_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicShippingMethod"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicShippingMethod]",
    "type": "object"
   },
   "ListResponse_PublicSupplier_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicSupplier"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicSupplier]",
    "type": "object"
   },
   "ListResponse_PublicTag_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicTag"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicTag]",
    "type": "object"
   },
   "ListResponse_PublicTaxRate_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicTaxRate"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicTaxRate]",
    "type": "object"
   },
   "ListResponse_PublicTerritory_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicTerritory"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicTerritory]",
    "type": "object"
   },
   "ListResponse_PublicUnitOfMeasure_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicUnitOfMeasure"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicUnitOfMeasure]",
    "type": "object"
   },
   "ListResponse_PublicWarehouse_": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/PublicWarehouse"
      },
      "title": "Data",
      "type": "array"
     },
     "order": {
      "description": "The ordering actually applied, as a comma-separated field:direction list. Always ends in the primary key, which is what makes paging stable.",
      "title": "Order",
      "type": "string"
     },
     "pagination": {
      "$ref": "#/components/schemas/Pagination"
     }
    },
    "required": [
     "data",
     "pagination",
     "order"
    ],
    "title": "ListResponse[PublicWarehouse]",
    "type": "object"
   },
   "LotOrigin": {
    "enum": [
     "RECEPTION",
     "INVOICE",
     "PRODUCTION",
     "MANUAL_ADJUSTMENT",
     "PACKAGING",
     "SHIPPING",
     "INVENTORY_COUNT",
     "PRODUCT_FORM",
     "SHOPIFY"
    ],
    "title": "LotOrigin",
    "type": "string"
   },
   "LotQCStatus": {
    "enum": [
     "AVAILABLE",
     "ON_HOLD",
     "QUARANTINE",
     "RELEASED",
     "REJECTED"
    ],
    "title": "LotQCStatus",
    "type": "string"
   },
   "OperationCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /operations`.",
    "properties": {
     "code": {
      "description": "Unique within your account. Stored trimmed and upper-cased.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Code",
      "type": "string"
     },
     "cost": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Cost per `qty`. Returned only to keys holding `cost:read`.",
      "title": "Cost"
     },
     "name": {
      "maxLength": 50,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "qty": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "The quantity `cost` is per, in the unit `unit_of_measure_id`.",
      "title": "Qty"
     },
     "unit_of_measure_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "One of your units of measure or a shared one.",
      "title": "Unit Of Measure Id"
     }
    },
    "required": [
     "code",
     "name"
    ],
    "title": "OperationCreateRequest",
    "type": "object"
   },
   "OperationUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /operations/{operation_id}`.\n\nOmitted fields are left unchanged. `code` and `name` cannot be null.",
    "properties": {
     "code": {
      "anyOf": [
       {
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "cost": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Cost"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 50,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "qty": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Qty"
     },
     "unit_of_measure_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Unit Of Measure Id"
     }
    },
    "title": "OperationUpdateRequest",
    "type": "object"
   },
   "Pagination": {
    "properties": {
     "has_more": {
      "description": "True when another page exists. Computed from offset, the rows returned and total, so a client can page without arithmetic.",
      "title": "Has More",
      "type": "boolean"
     },
     "limit": {
      "description": "Rows requested, at most 200. On an unpaginated list, the rows returned.",
      "title": "Limit",
      "type": "integer"
     },
     "offset": {
      "description": "Rows skipped before this page.",
      "title": "Offset",
      "type": "integer"
     },
     "total": {
      "description": "Rows matching the filter, ignoring paging.",
      "title": "Total",
      "type": "integer"
     }
    },
    "required": [
     "limit",
     "offset",
     "total",
     "has_more"
    ],
    "title": "Pagination",
    "type": "object"
   },
   "PingPayload": {
    "description": "The body of a test event, sent by the **Send test** button in NutraSoft.\n\nNothing changed and no record is referenced: it exists so you can prove the\nURL, the TLS certificate and your signature check all work before a real\nevent depends on them.",
    "properties": {
     "api_version": {
      "default": "1.1",
      "title": "Api Version",
      "type": "string"
     },
     "created_at": {
      "examples": [
       "2026-09-16T14:03:11.412Z"
      ],
      "title": "Created At",
      "type": "string"
     },
     "data": {
      "$ref": "#/components/schemas/EventData"
     },
     "id": {
      "examples": [
       "evt_test_1758031391"
      ],
      "title": "Id",
      "type": "string"
     },
     "livemode": {
      "title": "Livemode",
      "type": "boolean"
     },
     "source": {
      "$ref": "#/components/schemas/EventSource"
     },
     "type": {
      "const": "ping",
      "title": "Type",
      "type": "string"
     }
    },
    "required": [
     "id",
     "type",
     "created_at",
     "livemode",
     "source",
     "data"
    ],
    "title": "PingPayload",
    "type": "object"
   },
   "ProductLotCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /product-lots`.",
    "properties": {
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "ISO 8601. Null for stock that does not expire.",
      "title": "Expiration Date"
     },
     "location_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where the stock sits: one of your warehouses or a location in one.",
      "title": "Location Id"
     },
     "lot_number": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Unique per product and location. Omit it only for the product's unnumbered lot, of which there is at most one.",
      "title": "Lot Number"
     },
     "product_id": {
      "description": "The product this lot is stock of. Must be one of yours.",
      "exclusiveMinimum": 0.0,
      "title": "Product Id",
      "type": "integer"
     },
     "quantity_base": {
      "default": 0,
      "description": "On hand, in the product's base unit. Stored as sent.",
      "minimum": 0.0,
      "title": "Quantity Base",
      "type": "number"
     }
    },
    "required": [
     "product_id"
    ],
    "title": "ProductLotCreateRequest",
    "type": "object"
   },
   "ProductLotUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /product-lots/{lot_id}`.\n\nOmitted fields are left unchanged; an explicit null clears `lot_number`,\n`location_id` or `expiration_date`. Clearing both `lot_number` and\n`location_id` makes this the product's unnumbered lot, refused with 409\nwhen the product already has one.",
    "properties": {
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "location_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Location Id"
     },
     "lot_number": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Lot Number"
     },
     "quantity_base": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "On hand, in the product's base unit. A correction: it writes no stock movement. Cannot be null.",
      "title": "Quantity Base"
     }
    },
    "title": "ProductLotUpdateRequest",
    "type": "object"
   },
   "ProductType": {
    "enum": [
     "RAW_MATERIAL",
     "PACKAGING",
     "MISCELLANEOUS",
     "RECIPE",
     "SUB_RECIPE",
     "FINISHED_GOOD"
    ],
    "title": "ProductType",
    "type": "string"
   },
   "ProductionLineCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /production-lines`.",
    "properties": {
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "description": "Unique within your account.",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "One of your warehouses.",
      "title": "Warehouse Id"
     }
    },
    "required": [
     "name"
    ],
    "title": "ProductionLineCreateRequest",
    "type": "object"
   },
   "ProductionLineUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /production-lines/{production_line_id}`.\n\nOmitted fields are left unchanged. A null `description` or `warehouse_id`\nclears it; `name` cannot be null.",
    "properties": {
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Warehouse Id"
     }
    },
    "title": "ProductionLineUpdateRequest",
    "type": "object"
   },
   "ProductionStatus": {
    "enum": [
     "PLANNED",
     "IN_PROGRESS",
     "IN_PROGRESS_TRANSFORMATION",
     "COMPLETED",
     "CANCELLED",
     "ON_HOLD",
     "QUARANTINE"
    ],
    "title": "ProductionStatus",
    "type": "string"
   },
   "ProductionStatusChangeRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /productions/{production_id}/status`.",
    "properties": {
     "status": {
      "$ref": "#/components/schemas/ProductionStatus",
      "description": "`PLANNED`, `ON_HOLD`, `QUARANTINE` or `CANCELLED`. `IN_PROGRESS`, `IN_PROGRESS_TRANSFORMATION` and `COMPLETED` are refused with 409: starting and completing a run happen on the production floor.",
      "examples": [
       "ON_HOLD"
      ]
     }
    },
    "required": [
     "status"
    ],
    "title": "ProductionStatusChangeRequest",
    "type": "object"
   },
   "PublicAddress": {
    "properties": {
     "city": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "City"
     },
     "line1": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Line1"
     },
     "line2": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Line2"
     },
     "postal_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Postal Code"
     },
     "state": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "State"
     }
    },
    "title": "PublicAddress",
    "type": "object"
   },
   "PublicAllergen": {
    "properties": {
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Short code, unique within an account. Null on older rows.",
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Free text. Null when never filled in.",
      "title": "Description"
     },
     "id": {
      "description": "Stable identifier for this allergen.",
      "title": "Id",
      "type": "integer"
     },
     "is_global": {
      "description": "True for a NutraSoft-supplied reference row shared by every account, which your account can read but not change.",
      "title": "Is Global",
      "type": "boolean"
     },
     "is_major_allergen": {
      "description": "Whether this is a major allergen for labelling purposes.",
      "title": "Is Major Allergen",
      "type": "boolean"
     },
     "name": {
      "description": "English name.",
      "title": "Name",
      "type": "string"
     },
     "name_fr": {
      "description": "French name.",
      "title": "Name Fr",
      "type": "string"
     },
     "regulatory_reference": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The regulation this allergen is declared under, if recorded.",
      "title": "Regulatory Reference"
     }
    },
    "required": [
     "id",
     "name",
     "name_fr",
     "is_major_allergen",
     "is_global"
    ],
    "title": "PublicAllergen",
    "type": "object"
   },
   "PublicBill": {
    "description": "A supplier bill. Tax amounts and document totals are not published in v1.",
    "properties": {
     "bill_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Bill Date"
     },
     "bill_no": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Bill No"
     },
     "billing_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "cancelled_at": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Cancelled At"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_cancelled": {
      "title": "Is Cancelled",
      "type": "boolean"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicBillLine"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On a single bill and on writes; null on the list.",
      "title": "Lines"
     },
     "paid_amount": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Requires `cost:read`.",
      "title": "Paid Amount"
     },
     "purchase_order_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Purchase Order Id"
     },
     "subtotal": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Sum of the lines after line discounts, before tax. Requires `cost:read`; null means redacted, not zero.",
      "title": "Subtotal"
     },
     "supplier_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Id"
     },
     "supplier_reference": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Reference"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax1"
     },
     "tax1_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 1 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax1 Rate"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax2"
     },
     "tax2_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 2 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax2 Rate"
     }
    },
    "required": [
     "id",
     "is_cancelled",
     "billing_address"
    ],
    "title": "PublicBill",
    "type": "object"
   },
   "PublicBillLine": {
    "description": "One product on a bill. The per-lot breakdown is not published.",
    "properties": {
     "cost": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per purchase unit. Requires `cost:read`.",
      "title": "Cost"
     },
     "discount_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line. Requires `cost:read`.",
      "title": "Discount Rate"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "product_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Name"
     },
     "quantity": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Received, in the purchase unit.",
      "title": "Quantity"
     },
     "quantity_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Received, in the product's base unit.",
      "title": "Quantity Base"
     },
     "supplier_partno": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Partno"
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicBillLine",
    "type": "object"
   },
   "PublicCountry": {
    "properties": {
     "code": {
      "description": "ISO 3166-1 alpha-2, as recorded. Not unique: two rows share `MF`, so match on `id`.",
      "title": "Code",
      "type": "string"
     },
     "id": {
      "description": "Stable across every NutraSoft account.",
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "description": "English country name. May contain non-ASCII.",
      "title": "Name",
      "type": "string"
     }
    },
    "required": [
     "id",
     "name",
     "code"
    ],
    "title": "PublicCountry",
    "type": "object"
   },
   "PublicCustomer": {
    "properties": {
     "active": {
      "title": "Active",
      "type": "boolean"
     },
     "address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "contact": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "customer_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Code"
     },
     "customer_type_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Type Id"
     },
     "email": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "phone": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "price_list_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Price List Id"
     },
     "salesperson_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Salesperson Id"
     },
     "shipping_method_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Shipping Method Id"
     },
     "tax_rate_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tax Rate Id"
     },
     "territory_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Territory Id"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     },
     "website": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "required": [
     "id",
     "active",
     "address"
    ],
    "title": "PublicCustomer",
    "type": "object"
   },
   "PublicCustomerType": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "code"
    ],
    "title": "PublicCustomerType",
    "type": "object"
   },
   "PublicEmployee": {
    "properties": {
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "employee_type": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The employee type's name, where one is assigned.",
      "title": "Employee Type"
     },
     "employee_type_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Employee Type Id"
     },
     "first_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "First Name"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_active": {
      "title": "Is Active",
      "type": "boolean"
     },
     "last_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Last Name"
     }
    },
    "required": [
     "id",
     "is_active"
    ],
    "title": "PublicEmployee",
    "type": "object"
   },
   "PublicEquipment": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "out_of_service": {
      "description": "True when the equipment is unavailable for production.",
      "title": "Out Of Service",
      "type": "boolean"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where it is. Resolve with `GET /warehouses/{warehouse_id}`.",
      "title": "Warehouse Id"
     }
    },
    "required": [
     "id",
     "code",
     "name",
     "out_of_service"
    ],
    "title": "PublicEquipment",
    "type": "object"
   },
   "PublicError": {
    "description": "Every error response on this API has exactly this shape.",
    "properties": {
     "error": {
      "$ref": "#/components/schemas/PublicErrorBody"
     }
    },
    "required": [
     "error"
    ],
    "title": "PublicError",
    "type": "object"
   },
   "PublicErrorBody": {
    "description": "The `error` object.",
    "properties": {
     "code": {
      "$ref": "#/components/schemas/PublicErrorCode",
      "description": "Machine-readable and stable. Branch on this, never on the message."
     },
     "details": {
      "description": "Present for validation failures, listing the offending fields.",
      "title": "Details"
     },
     "message": {
      "description": "Human-readable. May change; do not parse it.",
      "title": "Message",
      "type": "string"
     },
     "request_id": {
      "description": "Quote this in a support ticket. Also sent as X-Request-Id.",
      "title": "Request Id",
      "type": "string"
     }
    },
    "required": [
     "code",
     "message",
     "request_id"
    ],
    "title": "PublicErrorBody",
    "type": "object"
   },
   "PublicErrorCode": {
    "description": "The closed set a partner may branch on.",
    "enum": [
     "INVALID_REQUEST",
     "UNAUTHENTICATED",
     "INVALID_API_KEY",
     "NOT_ENTITLED",
     "INSUFFICIENT_SCOPE",
     "READ_ONLY",
     "NOT_FOUND",
     "CONFLICT",
     "UNPROCESSABLE",
     "RATE_LIMITED",
     "INTERNAL_ERROR",
     "SERVICE_UNAVAILABLE"
    ],
    "title": "PublicErrorCode",
    "type": "string"
   },
   "PublicFood": {
    "description": "A nutrition source. Products reference a food for their nutrient data.",
    "properties": {
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_global": {
      "description": "True for a NutraSoft-supplied reference food shared by every account, which you can read but not change.",
      "title": "Is Global",
      "type": "boolean"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "name_fr": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name Fr"
     },
     "nutrients": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicFoodNutrient"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "Nutrient values, on `GET /foods/{food_id}` only: null elsewhere means not loaded, while an empty array means none.",
      "title": "Nutrients"
     },
     "source": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Where the nutrition data came from, e.g. a reference database.",
      "title": "Source"
     },
     "suggested_yield_description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Suggested Yield Description"
     },
     "suggested_yield_pct": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Suggested Yield Pct"
     }
    },
    "required": [
     "id",
     "is_global"
    ],
    "title": "PublicFood",
    "type": "object"
   },
   "PublicFoodNutrient": {
    "properties": {
     "label": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Label"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "nutrient_id": {
      "title": "Nutrient Id",
      "type": "integer"
     },
     "uom": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The unit `value` is expressed in.",
      "title": "Uom"
     },
     "value": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Value"
     }
    },
    "required": [
     "nutrient_id"
    ],
    "title": "PublicFoodNutrient",
    "type": "object"
   },
   "PublicInvoice": {
    "description": "An invoice. Tax amounts and document totals are not published in v1.",
    "properties": {
     "billing_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "cancelled_at": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Cancelled At"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "customer_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Id"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "invoice_no": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Invoice No"
     },
     "is_cancelled": {
      "description": "A cancelled invoice is kept, never deleted.",
      "title": "Is Cancelled",
      "type": "boolean"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicInvoiceLine"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On a single invoice; null on the list.",
      "title": "Lines"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "paid_amount": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Requires `cost:read`.",
      "title": "Paid Amount"
     },
     "sales_order_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Sales Order Id"
     },
     "ship_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ship Date"
     },
     "shipping_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "subtotal": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Sum of the lines after line discounts, before tax. Requires `cost:read`; null means redacted, not zero.",
      "title": "Subtotal"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax1"
     },
     "tax1_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 1 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax1 Rate"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax2"
     },
     "tax2_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 2 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax2 Rate"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     }
    },
    "required": [
     "id",
     "is_cancelled",
     "billing_address",
     "shipping_address"
    ],
    "title": "PublicInvoice",
    "type": "object"
   },
   "PublicInvoiceLine": {
    "description": "One product on an invoice. The per-lot breakdown is not published.",
    "properties": {
     "discount_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line. Requires `cost:read`.",
      "title": "Discount Rate"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per `uom_type` unit. Requires `cost:read`.",
      "title": "Price"
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "product_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Name"
     },
     "shipped_qty": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Shipped, in `uom_type` units.",
      "title": "Shipped Qty"
     },
     "shipped_qty_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Shipped, in the product's base unit.",
      "title": "Shipped Qty Base"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this line. Requires `cost:read`.",
      "title": "Tax1"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this line. Requires `cost:read`.",
      "title": "Tax2"
     },
     "uom_type": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/UomType"
       },
       {
        "type": "null"
       }
      ],
      "description": "The unit `shipped_qty` and `price` are in."
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicInvoiceLine",
    "type": "object"
   },
   "PublicNutrient": {
    "properties": {
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_major_nutrient": {
      "description": "Whether this nutrient appears on a standard nutrition facts panel.",
      "title": "Is Major Nutrient",
      "type": "boolean"
     },
     "label": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Display label, where one differs from the name.",
      "title": "Label"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "uom": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The unit this nutrient's values are expressed in.",
      "title": "Uom"
     }
    },
    "required": [
     "id",
     "is_major_nutrient"
    ],
    "title": "PublicNutrient",
    "type": "object"
   },
   "PublicOperation": {
    "properties": {
     "code": {
      "description": "Unique within your account.",
      "title": "Code",
      "type": "string"
     },
     "cost": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Cost per `qty`. Requires `cost:read`; null means redacted, not zero.",
      "title": "Cost"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "qty": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "The quantity `cost` is per, in the unit `unit_of_measure_id`.",
      "title": "Qty"
     },
     "unit_of_measure_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Resolve with `GET /units-of-measure/{uom_id}`.",
      "title": "Unit Of Measure Id"
     }
    },
    "required": [
     "id",
     "code",
     "name"
    ],
    "title": "PublicOperation",
    "type": "object"
   },
   "PublicOrganization": {
    "properties": {
     "api_key_id": {
      "description": "Quote this alongside a request id in support.",
      "title": "Api Key Id",
      "type": "integer"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The account name, as configured in NutraSoft.",
      "title": "Company"
     },
     "currency": {
      "description": "ISO 4217 code of the account's currency, which every money field is in.",
      "title": "Currency",
      "type": "string"
     },
     "environment": {
      "description": "Derived from the account, never from the key.",
      "enum": [
       "live",
       "test"
      ],
      "title": "Environment",
      "type": "string"
     },
     "key_prefix": {
      "description": "The visible start of the key, so you can tell which one is in use.",
      "title": "Key Prefix",
      "type": "string"
     },
     "license_id": {
      "description": "The account this key belongs to.",
      "title": "License Id",
      "type": "integer"
     },
     "rate_limit_per_min": {
      "description": "Requests per minute, counted per account rather than per key.",
      "title": "Rate Limit Per Min",
      "type": "integer"
     },
     "scopes": {
      "description": "The effective scopes: a write scope also lists its read scope, so `sales:write` reports both `sales:write` and `sales:read`.",
      "items": {
       "type": "string"
      },
      "title": "Scopes",
      "type": "array"
     }
    },
    "required": [
     "license_id",
     "currency",
     "environment",
     "scopes",
     "rate_limit_per_min",
     "api_key_id",
     "key_prefix"
    ],
    "title": "PublicOrganization",
    "type": "object"
   },
   "PublicPreservation": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "code"
    ],
    "title": "PublicPreservation",
    "type": "object"
   },
   "PublicPriceList": {
    "properties": {
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "end_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "End Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "items": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicPriceListItem"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On `GET /price-lists/{price_list_id}` only; null on the list.",
      "title": "Items"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "start_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Start Date"
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicPriceList",
    "type": "object"
   },
   "PublicPriceListItem": {
    "properties": {
     "custom_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The name documents use for the product; null means its own name.",
      "title": "Custom Name"
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "The list price. Requires `cost:read`; null means redacted.",
      "title": "Price"
     },
     "product_id": {
      "title": "Product Id",
      "type": "integer"
     }
    },
    "required": [
     "product_id"
    ],
    "title": "PublicPriceListItem",
    "type": "object"
   },
   "PublicProduct": {
    "properties": {
     "active": {
      "title": "Active",
      "type": "boolean"
     },
     "allergens": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicProductAllergen"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On `GET /products/{product_id}` only; null on the list.",
      "title": "Allergens"
     },
     "cost": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Cost per inventory unit. Requires `cost:read`; null means redacted, not zero. Separate from `operations_cost`.",
      "title": "Cost"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_deleted": {
      "title": "Is Deleted",
      "type": "boolean"
     },
     "kind": {
      "description": "Derived from `product_type`. Says which of `material` and `recipe` is populated.",
      "enum": [
       "material",
       "recipe"
      ],
      "title": "Kind",
      "type": "string"
     },
     "material": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/PublicProductMaterial"
       },
       {
        "type": "null"
       }
      ],
      "description": "Populated only when `kind` is `material`."
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "operations_cost": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Operations cost per inventory unit. Requires `cost:read`.",
      "title": "Operations Cost"
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_type": {
      "$ref": "#/components/schemas/ProductType"
     },
     "recipe": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/PublicProductRecipe"
       },
       {
        "type": "null"
       }
      ],
      "description": "Populated only when `kind` is `recipe`."
     },
     "shelf_life": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Shelf Life"
     },
     "tag_ids": {
      "anyOf": [
       {
        "items": {
         "type": "integer"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On `GET /products/{product_id}` only; null on the list.",
      "title": "Tag Ids"
     },
     "unit_of_measure_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Unit Of Measure Id"
     },
     "uom_base_conversion": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Second conversion factor. See `uom_qty`.",
      "title": "Uom Base Conversion"
     },
     "uom_base_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Uom Base Id"
     },
     "uom_qty": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "First conversion factor. One inventory unit is `uom_qty * uom_base_conversion` base units.",
      "title": "Uom Qty"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     }
    },
    "required": [
     "id",
     "product_type",
     "kind",
     "active",
     "is_deleted"
    ],
    "title": "PublicProduct",
    "type": "object"
   },
   "PublicProductAllergen": {
    "properties": {
     "allergen_id": {
      "title": "Allergen Id",
      "type": "integer"
     },
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "is_major_allergen": {
      "title": "Is Major Allergen",
      "type": "boolean"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "source": {
      "description": "`declared`: recorded directly against this product.",
      "title": "Source",
      "type": "string"
     }
    },
    "required": [
     "allergen_id",
     "is_major_allergen",
     "source"
    ],
    "title": "PublicProductAllergen",
    "type": "object"
   },
   "PublicProductLot": {
    "properties": {
     "archived": {
      "description": "Archived lots are retired but stay readable with their history.",
      "title": "Archived",
      "type": "boolean"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "location_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Location Code"
     },
     "location_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Location Id"
     },
     "location_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Location Name"
     },
     "lot_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Null on the product's unnumbered lot, which holds stock that was never lotted.",
      "title": "Lot Number"
     },
     "lot_origin": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/LotOrigin"
       },
       {
        "type": "null"
       }
      ],
      "description": "How the lot came into existence."
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "product_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Name"
     },
     "qc_release_expires_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "When a `RELEASED` status stops counting. Null means it does not expire.",
      "title": "Qc Release Expires At"
     },
     "qc_status": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/LotQCStatus"
       },
       {
        "type": "null"
       }
      ],
      "description": "Two statuses are sellable: `AVAILABLE` and `RELEASED`. A production output under positive release moves from `ON_HOLD` to `RELEASED`, never to `AVAILABLE`."
     },
     "qc_status_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Qc Status At"
     },
     "qc_status_note": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Qc Status Note"
     },
     "quantity_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "On hand, in the product's base unit.",
      "title": "Quantity Base"
     },
     "unit_of_measure_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Unit Of Measure Id"
     },
     "uom_base_conversion": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Second conversion factor. See `uom_qty`.",
      "title": "Uom Base Conversion"
     },
     "uom_base_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Uom Base Id"
     },
     "uom_qty": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "First conversion factor. One inventory unit is `uom_qty * uom_base_conversion` base units.",
      "title": "Uom Qty"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     }
    },
    "required": [
     "id",
     "archived"
    ],
    "title": "PublicProductLot",
    "type": "object"
   },
   "PublicProductMaterial": {
    "description": "Populated only when `kind` is `material`.",
    "properties": {
     "banned_country_ids": {
      "items": {
       "type": "integer"
      },
      "title": "Banned Country Ids",
      "type": "array"
     },
     "food_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "The nutrition source. Fetch with `GET /foods/{food_id}`.",
      "title": "Food Id"
     },
     "substitute_product_ids": {
      "items": {
       "type": "integer"
      },
      "title": "Substitute Product Ids",
      "type": "array"
     },
     "supplier_ids": {
      "items": {
       "type": "integer"
      },
      "title": "Supplier Ids",
      "type": "array"
     }
    },
    "title": "PublicProductMaterial",
    "type": "object"
   },
   "PublicProductRecipe": {
    "description": "Populated only when `kind` is `recipe`.",
    "properties": {
     "byproduct_product_ids": {
      "items": {
       "type": "integer"
      },
      "title": "Byproduct Product Ids",
      "type": "array"
     },
     "ingredients_en": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The generated ingredient declaration.",
      "title": "Ingredients En"
     },
     "ingredients_fr": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ingredients Fr"
     },
     "portion_in_grams": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Portion In Grams"
     },
     "qc_checkpoint_ids": {
      "items": {
       "type": "integer"
      },
      "title": "Qc Checkpoint Ids",
      "type": "array"
     },
     "recipe_grams_yield": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Recipe Grams Yield"
     }
    },
    "title": "PublicProductRecipe",
    "type": "object"
   },
   "PublicProduction": {
    "properties": {
     "consumed_steps": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicProductionStep"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "What the run consumed, lot by lot. On `GET /productions/{production_id}` only; null elsewhere.",
      "title": "Consumed Steps"
     },
     "end_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "End Date"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "location_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Location Id"
     },
     "lot_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Lot Number"
     },
     "planned_steps": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicProductionStep"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "What the run intends to consume. On `GET /productions/{production_id}` only; null elsewhere.",
      "title": "Planned Steps"
     },
     "produced_qty_display_units": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "What was produced, in the product's display unit.",
      "title": "Produced Qty Display Units"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "production_line_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Production Line Id"
     },
     "production_no": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "The run number, unique within your account.",
      "title": "Production No"
     },
     "production_qty_display_units": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "The planned quantity, in the product's display unit. Step quantities are in base units.",
      "title": "Production Qty Display Units"
     },
     "start_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Start Date"
     },
     "status": {
      "$ref": "#/components/schemas/ProductionStatus"
     }
    },
    "required": [
     "id",
     "status"
    ],
    "title": "PublicProduction",
    "type": "object"
   },
   "PublicProductionLine": {
    "properties": {
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "warehouse_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Warehouse Id"
     }
    },
    "required": [
     "id",
     "name"
    ],
    "title": "PublicProductionLine",
    "type": "object"
   },
   "PublicProductionStep": {
    "description": "One planned or consumed line on a production run.",
    "properties": {
     "lot_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Set on consumption only, not on a plan.",
      "title": "Lot Id"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "quantity_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "In the component product's base unit.",
      "title": "Quantity Base"
     }
    },
    "title": "PublicProductionStep",
    "type": "object"
   },
   "PublicPurchaseOrder": {
    "description": "A purchase order. Tax amounts and document totals are not published in v1.",
    "properties": {
     "billing_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The supplier name as it stood on this order.",
      "title": "Company"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicPurchaseOrderLine"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On a single order and on writes; null on the list.",
      "title": "Lines"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "purchase_order_no": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Unique within your account.",
      "title": "Purchase Order No"
     },
     "received_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Received Date"
     },
     "shipping_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "status": {
      "$ref": "#/components/schemas/PurchaseOrderStatus",
      "description": "Note `CLOSED`, where a sales order status uses `CLOSE`."
     },
     "subtotal": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Sum of the lines after line discounts, before tax. Requires `cost:read`; null means redacted, not zero.",
      "title": "Subtotal"
     },
     "supplier_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Id"
     },
     "supplier_reference": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The supplier's own reference for this order.",
      "title": "Supplier Reference"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax1"
     },
     "tax1_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 1 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax1 Rate"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax2"
     },
     "tax2_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 2 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax2 Rate"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     }
    },
    "required": [
     "id",
     "status",
     "billing_address",
     "shipping_address"
    ],
    "title": "PublicPurchaseOrder",
    "type": "object"
   },
   "PublicPurchaseOrderLine": {
    "properties": {
     "cost": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per purchase unit. Requires `cost:read`.",
      "title": "Cost"
     },
     "discount_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line. Requires `cost:read`.",
      "title": "Discount Rate"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "lead_time": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "In days.",
      "title": "Lead Time"
     },
     "notes": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "product_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Name"
     },
     "quantity": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Ordered, in the purchase unit.",
      "title": "Quantity"
     },
     "quantity_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Ordered, in the product's base unit.",
      "title": "Quantity Base"
     },
     "supplier_partno": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The supplier's part number.",
      "title": "Supplier Partno"
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicPurchaseOrderLine",
    "type": "object"
   },
   "PublicQCCheckpoint": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "input_type": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/QCInputType"
       },
       {
        "type": "null"
       }
      ],
      "description": "How a result is recorded."
     },
     "is_critical": {
      "description": "Whether failing this checkpoint blocks the batch.",
      "title": "Is Critical",
      "type": "boolean"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "pass_value": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/QCPassValue"
       },
       {
        "type": "null"
       }
      ],
      "description": "For a `YES_NO` checkpoint, which answer passes."
     },
     "qc_unit_of_measure_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "The QC unit a numeric result is recorded in, if any.",
      "title": "Qc Unit Of Measure Id"
     }
    },
    "required": [
     "id",
     "code",
     "name",
     "is_critical"
    ],
    "title": "PublicQCCheckpoint",
    "type": "object"
   },
   "PublicQCUnitOfMeasure": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_global": {
      "description": "True for a shared unit, false for one your account created.",
      "title": "Is Global",
      "type": "boolean"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "code",
     "is_global"
    ],
    "title": "PublicQCUnitOfMeasure",
    "type": "object"
   },
   "PublicSalesOrder": {
    "description": "A sales order. Tax amounts and document totals are not published in v1.",
    "properties": {
     "billing_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The customer name as it stood on this order.",
      "title": "Company"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "customer_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Id"
     },
     "customer_purchase_order_no": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The customer's own purchase order reference. Free text.",
      "title": "Customer Purchase Order No"
     },
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PublicSalesOrderLine"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "On a single order and on writes; null on the list.",
      "title": "Lines"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "sales_order_no": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "The order number, unique in your account.",
      "title": "Sales Order No"
     },
     "ship_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ship Date"
     },
     "shipping_address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "status": {
      "$ref": "#/components/schemas/SalesOrderStatus",
      "description": "Note `CLOSE`, where a purchase order status uses `CLOSED`."
     },
     "subtotal": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Sum of the lines after line discounts, before tax. Requires `cost:read`; null means redacted, not zero.",
      "title": "Subtotal"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax1"
     },
     "tax1_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 1 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax1 Rate"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this document. Requires `cost:read`; null means redacted, not false.",
      "title": "Tax2"
     },
     "tax2_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 2 percentage, e.g. `5.0` for 5%. Requires `cost:read`.",
      "title": "Tax2 Rate"
     },
     "tracking_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tracking Number"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     }
    },
    "required": [
     "id",
     "status",
     "billing_address",
     "shipping_address"
    ],
    "title": "PublicSalesOrder",
    "type": "object"
   },
   "PublicSalesOrderLine": {
    "properties": {
     "cancelled_qty_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Written off, in the product's base unit.",
      "title": "Cancelled Qty Base"
     },
     "discount_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line. Requires `cost:read`.",
      "title": "Discount Rate"
     },
     "id": {
      "description": "Send it back on `PATCH` to keep this line.",
      "title": "Id",
      "type": "integer"
     },
     "notes": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "order_qty": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Ordered, in `uom_type` units.",
      "title": "Order Qty"
     },
     "order_qty_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Ordered, in the product's base unit.",
      "title": "Order Qty Base"
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per `uom_type` unit. Requires `cost:read`.",
      "title": "Price"
     },
     "product_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Code"
     },
     "product_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Id"
     },
     "product_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Product Name"
     },
     "shipped_qty_base": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Shipped, in the product's base unit.",
      "title": "Shipped Qty Base"
     },
     "tax1": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 1 applies to this line. Requires `cost:read`.",
      "title": "Tax1"
     },
     "tax2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "description": "Whether tax 2 applies to this line. Requires `cost:read`.",
      "title": "Tax2"
     },
     "uom_type": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/UomType"
       },
       {
        "type": "null"
       }
      ],
      "description": "The unit `order_qty` and `price` are in."
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicSalesOrderLine",
    "type": "object"
   },
   "PublicSalesperson": {
    "properties": {
     "active": {
      "title": "Active",
      "type": "boolean"
     },
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "email": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "first_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "First Name"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "last_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Last Name"
     }
    },
    "required": [
     "id",
     "active"
    ],
    "title": "PublicSalesperson",
    "type": "object"
   },
   "PublicShippingAddress": {
    "properties": {
     "address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "contact": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "customer_id": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Id"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_default": {
      "title": "Is Default",
      "type": "boolean"
     },
     "phone": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     }
    },
    "required": [
     "id",
     "is_default",
     "address"
    ],
    "title": "PublicShippingAddress",
    "type": "object"
   },
   "PublicShippingMethod": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "code"
    ],
    "title": "PublicShippingMethod",
    "type": "object"
   },
   "PublicSupplier": {
    "properties": {
     "active": {
      "title": "Active",
      "type": "boolean"
     },
     "address": {
      "$ref": "#/components/schemas/PublicAddress"
     },
     "approval_expiry": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Approval Expiry"
     },
     "approval_status": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/SupplierApprovalStatus"
       },
       {
        "type": "null"
       }
      ],
      "description": "Computed when read: an approval whose expiry has passed reads as `PENDING`."
     },
     "certification_expires_on": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Certification Expires On"
     },
     "certification_scheme": {
      "anyOf": [
       {
        "enum": [
         "SQF",
         "BRCGS",
         "FSSC22000",
         "IFS",
         "GLOBALGAP",
         "PRIMUSGFS",
         "CANADAGAP",
         "OTHER",
         "NONE"
        ],
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "`NONE` means the supplier holds none; null means not recorded.",
      "title": "Certification Scheme"
     },
     "company": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "contact_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact Name"
     },
     "created_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Created At"
     },
     "email": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "phone": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "supplier_code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Code"
     },
     "updated_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Updated At"
     },
     "website": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "required": [
     "id",
     "active",
     "address"
    ],
    "title": "PublicSupplier",
    "type": "object"
   },
   "PublicTag": {
    "properties": {
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "ref_type": {
      "$ref": "#/components/schemas/TagRefEnum",
      "description": "What this tag can be attached to. Fixed when the tag is created."
     }
    },
    "required": [
     "id",
     "name",
     "ref_type"
    ],
    "title": "PublicTag",
    "type": "object"
   },
   "PublicTaxRate": {
    "properties": {
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "tax_rate1": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 1 percentage, e.g. `5.0` for 5%.",
      "title": "Tax Rate1"
     },
     "tax_rate1_label": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tax Rate1 Label"
     },
     "tax_rate2": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Tax 2 percentage, e.g. `9.975` for 9.975%.",
      "title": "Tax Rate2"
     },
     "tax_rate2_label": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tax Rate2 Label"
     }
    },
    "required": [
     "id"
    ],
    "title": "PublicTaxRate",
    "type": "object"
   },
   "PublicTerritory": {
    "properties": {
     "code": {
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "code"
    ],
    "title": "PublicTerritory",
    "type": "object"
   },
   "PublicUnitOfMeasure": {
    "properties": {
     "code": {
      "description": "Short code, unique within an account.",
      "title": "Code",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "integer"
     },
     "is_global": {
      "description": "True for a shared unit, false for one your account created.",
      "title": "Is Global",
      "type": "boolean"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "read_only": {
      "description": "A NutraSoft-supplied unit your account may use but not change.",
      "title": "Read Only",
      "type": "boolean"
     },
     "weight_in_grams": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Grams per one of this unit; 0 or null for a unit that is not a weight.",
      "title": "Weight In Grams"
     }
    },
    "required": [
     "id",
     "code",
     "read_only",
     "is_global"
    ],
    "title": "PublicUnitOfMeasure",
    "type": "object"
   },
   "PublicWarehouse": {
    "properties": {
     "code": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "id": {
      "description": "The warehouse's location id.",
      "title": "Id",
      "type": "integer"
     },
     "is_active": {
      "title": "Is Active",
      "type": "boolean"
     },
     "name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "required": [
     "id",
     "is_active"
    ],
    "title": "PublicWarehouse",
    "type": "object"
   },
   "PurchaseOrderCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /purchase-orders`.\n\nThe vendor block and ship-to come from the supplier record. The order is\ncreated `OPEN` with no tax applied; taxes are not written through v1.",
    "properties": {
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "lines": {
      "description": "From 1 to 200 lines.",
      "items": {
       "$ref": "#/components/schemas/PurchaseOrderLineRequest"
      },
      "maxItems": 200,
      "minItems": 1,
      "title": "Lines",
      "type": "array"
     },
     "notes": {
      "anyOf": [
       {
        "maxLength": 2000,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "supplier_id": {
      "exclusiveMinimum": 0.0,
      "title": "Supplier Id",
      "type": "integer"
     },
     "supplier_reference": {
      "anyOf": [
       {
        "maxLength": 255,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The supplier's own reference for this order.",
      "title": "Supplier Reference"
     }
    },
    "required": [
     "supplier_id",
     "lines"
    ],
    "title": "PurchaseOrderCreateRequest",
    "type": "object"
   },
   "PurchaseOrderLineRequest": {
    "additionalProperties": false,
    "description": "One line of a purchase order, in the product's purchase unit.\n\nWhere a supplier packaging is recorded for the product, it sets how many\nbase units a purchase unit holds, as in NutraSoft.",
    "properties": {
     "cost": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per purchase unit.",
      "title": "Cost"
     },
     "discount_rate": {
      "anyOf": [
       {
        "maximum": 100.0,
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line, 0 to 100.",
      "title": "Discount Rate"
     },
     "expiration_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expiration Date"
     },
     "lead_time": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "In days.",
      "title": "Lead Time"
     },
     "notes": {
      "anyOf": [
       {
        "maxLength": 2000,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "product_id": {
      "description": "A product in your account.",
      "exclusiveMinimum": 0.0,
      "title": "Product Id",
      "type": "integer"
     },
     "quantity": {
      "description": "In the product's purchase unit.",
      "exclusiveMinimum": 0.0,
      "title": "Quantity",
      "type": "number"
     },
     "supplier_partno": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The supplier's part number.",
      "title": "Supplier Partno"
     }
    },
    "required": [
     "product_id",
     "quantity"
    ],
    "title": "PurchaseOrderLineRequest",
    "type": "object"
   },
   "PurchaseOrderStatus": {
    "enum": [
     "OPEN",
     "SENT",
     "CONFIRMED",
     "CLOSED",
     "BACK_ORDER",
     "CANCELLED",
     "RECEIVED"
    ],
    "title": "PurchaseOrderStatus",
    "type": "string"
   },
   "PurchaseOrderStatusRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /purchase-orders/{purchase_order_id}/status`.",
    "properties": {
     "status": {
      "description": "`RECEIVED` and `BACK_ORDER` are written by receiving in NutraSoft and cannot be set here.",
      "enum": [
       "SENT",
       "CONFIRMED",
       "CANCELLED",
       "CLOSED"
      ],
      "title": "Status",
      "type": "string"
     }
    },
    "required": [
     "status"
    ],
    "title": "PurchaseOrderStatusRequest",
    "type": "object"
   },
   "PurchaseOrderUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /purchase-orders/{purchase_order_id}`.\n\nOmitted fields are left unchanged. Sending `lines` replaces every line on\nthe order.",
    "properties": {
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/PurchaseOrderLineRequest"
        },
        "maxItems": 200,
        "minItems": 1,
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "The complete set of lines, from 1 to 200. They replace every line on the order.",
      "title": "Lines"
     },
     "notes": {
      "anyOf": [
       {
        "maxLength": 2000,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "supplier_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Id"
     },
     "supplier_reference": {
      "anyOf": [
       {
        "maxLength": 255,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Reference"
     }
    },
    "title": "PurchaseOrderUpdateRequest",
    "type": "object"
   },
   "QCInputType": {
    "description": "How an operator answers this checkpoint on the shop floor.",
    "enum": [
     "RANGE",
     "YES_NO",
     "CHECKBOX",
     "RADIO",
     "TEXTAREA",
     "NUMBER"
    ],
    "title": "QCInputType",
    "type": "string"
   },
   "QCPassValue": {
    "description": "Which answer passes a YES_NO checkpoint.",
    "enum": [
     "YES",
     "NO"
    ],
    "title": "QCPassValue",
    "type": "string"
   },
   "SalesOrderCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /sales-orders`.\n\nThe order is created `OPEN`, with its subtotal computed from the lines.\nTaxes are not written through v1.",
    "properties": {
     "billing_address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ],
      "description": "Omit it to use the customer's current address."
     },
     "customer_id": {
      "description": "A customer in your account.",
      "exclusiveMinimum": 0.0,
      "title": "Customer Id",
      "type": "integer"
     },
     "customer_purchase_order_no": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "The customer's own purchase order reference. Free text.",
      "title": "Customer Purchase Order No"
     },
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "lines": {
      "description": "From 1 to 200 lines.",
      "items": {
       "$ref": "#/components/schemas/SalesOrderLineRequest"
      },
      "maxItems": 200,
      "minItems": 1,
      "title": "Lines",
      "type": "array"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "shipping_address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ],
      "description": "Omit it to use the billing address of this order."
     },
     "tracking_number": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tracking Number"
     }
    },
    "required": [
     "customer_id",
     "lines"
    ],
    "title": "SalesOrderCreateRequest",
    "type": "object"
   },
   "SalesOrderLineRequest": {
    "additionalProperties": false,
    "description": "One line of a sales order. The product code and name come from the product.",
    "properties": {
     "discount_rate": {
      "anyOf": [
       {
        "maximum": 100.0,
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Percent off this line, 0 to 100.",
      "title": "Discount Rate"
     },
     "id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "On `PATCH`, the `id` of an existing line to keep and update. Omit it to add a line.",
      "title": "Id"
     },
     "notes": {
      "anyOf": [
       {
        "maxLength": 2000,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Notes"
     },
     "order_qty": {
      "description": "Quantity ordered, in `uom_type` units.",
      "exclusiveMinimum": 0.0,
      "title": "Order Qty",
      "type": "number"
     },
     "price": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Per `uom_type` unit, stored as sent. No price list is applied.",
      "title": "Price"
     },
     "product_id": {
      "description": "A product in your account.",
      "exclusiveMinimum": 0.0,
      "title": "Product Id",
      "type": "integer"
     },
     "tax1": {
      "default": false,
      "description": "Whether tax 1 applies to this line.",
      "title": "Tax1",
      "type": "boolean"
     },
     "tax2": {
      "default": false,
      "description": "Whether tax 2 applies to this line.",
      "title": "Tax2",
      "type": "boolean"
     },
     "uom_type": {
      "$ref": "#/components/schemas/UomType",
      "default": "BASE_UOM",
      "description": "The unit `order_qty` and `price` are in: `BASE_UOM` is the base unit, `INVENTORY_UNIT` holds `uom_qty * uom_base_conversion` base units and `PACKAGING_SIZE` holds `uom_base_conversion`, per the product."
     }
    },
    "required": [
     "product_id",
     "order_qty"
    ],
    "title": "SalesOrderLineRequest",
    "type": "object"
   },
   "SalesOrderStatus": {
    "enum": [
     "OPEN",
     "BACK_ORDER",
     "PREPARING",
     "CANCELLED",
     "CLOSE",
     "SHIPPED"
    ],
    "title": "SalesOrderStatus",
    "type": "string"
   },
   "SalesOrderUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /sales-orders/{sales_order_id}`. Omitted fields are left unchanged.",
    "properties": {
     "billing_address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "customer_id": {
      "anyOf": [
       {
        "exclusiveMinimum": 0.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Id"
     },
     "customer_purchase_order_no": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Purchase Order No"
     },
     "expected_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Expected Date"
     },
     "lines": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/SalesOrderLineRequest"
        },
        "maxItems": 200,
        "minItems": 1,
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "description": "The complete set of lines, from 1 to 200. A line sent with its `id` is updated, a line without one is added, and a line left out is deleted. The subtotal is recomputed. Round trips need `cost:read`, or the prices you send back are empty.",
      "title": "Lines"
     },
     "order_date": {
      "anyOf": [
       {
        "format": "date",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Order Date"
     },
     "shipping_address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "tracking_number": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tracking Number"
     }
    },
    "title": "SalesOrderUpdateRequest",
    "type": "object"
   },
   "ShippingAddressCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /customers/{customer_id}/shipping-addresses`.",
    "properties": {
     "address": {
      "$ref": "#/components/schemas/AddressInput"
     },
     "contact": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "is_default": {
      "default": false,
      "description": "Whether this is the customer's default ship-to. Refused with 409 while another address is the default.",
      "title": "Is Default",
      "type": "boolean"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 30,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     }
    },
    "required": [
     "address"
    ],
    "title": "ShippingAddressCreateRequest",
    "type": "object"
   },
   "ShippingAddressUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /customers/{customer_id}/shipping-addresses/{shipping_address_id}`.",
    "properties": {
     "address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "contact": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact"
     },
     "is_default": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Is Default"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 30,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     }
    },
    "title": "ShippingAddressUpdateRequest",
    "type": "object"
   },
   "SupplierApprovalStatus": {
    "enum": [
     "PENDING",
     "APPROVED",
     "REJECTED",
     "SUSPENDED"
    ],
    "title": "SupplierApprovalStatus",
    "type": "string"
   },
   "SupplierCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /suppliers`. Approval is decided in NutraSoft, not here.",
    "properties": {
     "active": {
      "default": true,
      "description": "An inactive supplier is kept but not offered on new documents.",
      "title": "Active",
      "type": "boolean"
     },
     "address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "company": {
      "description": "Trading name.",
      "maxLength": 100,
      "minLength": 1,
      "title": "Company",
      "type": "string"
     },
     "contact_name": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact Name"
     },
     "email": {
      "anyOf": [
       {
        "maxLength": 254,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "supplier_code": {
      "description": "Your code for this supplier, unique within your account.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Supplier Code",
      "type": "string"
     },
     "website": {
      "anyOf": [
       {
        "maxLength": 255,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "required": [
     "supplier_code",
     "company"
    ],
    "title": "SupplierCreateRequest",
    "type": "object"
   },
   "SupplierUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /suppliers/{supplier_id}`.\n\nOmitted fields are left unchanged. `address` is replaced as a whole.",
    "properties": {
     "active": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Active"
     },
     "address": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/AddressInput"
       },
       {
        "type": "null"
       }
      ]
     },
     "company": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Company"
     },
     "contact_name": {
      "anyOf": [
       {
        "maxLength": 100,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact Name"
     },
     "email": {
      "anyOf": [
       {
        "maxLength": 254,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "phone": {
      "anyOf": [
       {
        "maxLength": 50,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone"
     },
     "supplier_code": {
      "anyOf": [
       {
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Supplier Code"
     },
     "website": {
      "anyOf": [
       {
        "maxLength": 255,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Website"
     }
    },
    "title": "SupplierUpdateRequest",
    "type": "object"
   },
   "TagCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /tags`.",
    "properties": {
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "description": "Unique within your account, per `ref_type`.",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "ref_type": {
      "$ref": "#/components/schemas/TagRefEnum",
      "description": "What this tag can be attached to. Cannot be changed later."
     }
    },
    "required": [
     "name",
     "ref_type"
    ],
    "title": "TagCreateRequest",
    "type": "object"
   },
   "TagRefEnum": {
    "enum": [
     "PRODUCT",
     "CUSTOMER",
     "SUPPLIER"
    ],
    "title": "TagRefEnum",
    "type": "string"
   },
   "TagUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /tags/{tag_id}`. `ref_type` cannot be changed.",
    "properties": {
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "title": "TagUpdateRequest",
    "type": "object"
   },
   "UnitOfMeasureCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /units-of-measure`.",
    "properties": {
     "code": {
      "description": "Short code, unique among your units and the shared ones.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Code",
      "type": "string"
     },
     "name": {
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "weight_in_grams": {
      "description": "Grams per one of this unit. Send `0` for a unit that is not a weight.",
      "minimum": 0.0,
      "title": "Weight In Grams",
      "type": "number"
     }
    },
    "required": [
     "code",
     "name",
     "weight_in_grams"
    ],
    "title": "UnitOfMeasureCreateRequest",
    "type": "object"
   },
   "UnitOfMeasureUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /units-of-measure/{uom_id}`. The `code` cannot be changed.",
    "properties": {
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     },
     "weight_in_grams": {
      "anyOf": [
       {
        "minimum": 0.0,
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Weight In Grams"
     }
    },
    "title": "UnitOfMeasureUpdateRequest",
    "type": "object"
   },
   "UomType": {
    "enum": [
     "INVENTORY_UNIT",
     "PACKAGING_SIZE",
     "BASE_UOM"
    ],
    "title": "UomType",
    "type": "string"
   },
   "ValidationError": {
    "properties": {
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "title": "Location",
      "type": "array"
     },
     "msg": {
      "title": "Message",
      "type": "string"
     },
     "type": {
      "title": "Error Type",
      "type": "string"
     }
    },
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError",
    "type": "object"
   },
   "WarehouseCreateRequest": {
    "additionalProperties": false,
    "description": "Body for `POST /warehouses`. The warehouse is created active.",
    "properties": {
     "code": {
      "description": "Short code, unique among your warehouses.",
      "maxLength": 40,
      "minLength": 1,
      "title": "Code",
      "type": "string"
     },
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     }
    },
    "required": [
     "code",
     "name"
    ],
    "title": "WarehouseCreateRequest",
    "type": "object"
   },
   "WarehouseUpdateRequest": {
    "additionalProperties": false,
    "description": "Body for `PATCH /warehouses/{warehouse_id}`.\n\nOmitted fields are left unchanged, and an explicit null is ignored rather\nthan clearing the field. `is_active` is not settable.",
    "properties": {
     "code": {
      "anyOf": [
       {
        "maxLength": 40,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "description": {
      "anyOf": [
       {
        "maxLength": 500,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "name": {
      "anyOf": [
       {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Name"
     }
    },
    "title": "WarehouseUpdateRequest",
    "type": "object"
   },
   "WebhookEventPayload": {
    "description": "The body POSTed to your endpoint.\n\nVerify `NutraSoft-Signature` before parsing this, over the **raw** request\nbody: re-serialising the JSON first changes the bytes and the signature\nwill not match.\n\nDelivery is at least once and is not ordered. Deduplicate on `id`, and\ntreat a `.updated` that arrives before its `.created` as normal rather than\nas an error.",
    "properties": {
     "api_version": {
      "default": "1.1",
      "description": "Envelope version. Changes within v1 are additive.",
      "title": "Api Version",
      "type": "string"
     },
     "created_at": {
      "description": "When the change happened, UTC, ISO 8601.",
      "examples": [
       "2026-09-16T14:03:11.412Z"
      ],
      "title": "Created At",
      "type": "string"
     },
     "data": {
      "$ref": "#/components/schemas/EventData"
     },
     "id": {
      "description": "Unique event id. Deduplicate on this.",
      "examples": [
       "evt_9f3c2a7b4d1e4f8ca1b2c3d4e5f60718"
      ],
      "title": "Id",
      "type": "string"
     },
     "livemode": {
      "description": "`false` for events from your sandbox account.",
      "title": "Livemode",
      "type": "boolean"
     },
     "source": {
      "$ref": "#/components/schemas/EventSource"
     },
     "type": {
      "description": "The topic, e.g. `sales_order.status_changed`.",
      "examples": [
       "sales_order.status_changed"
      ],
      "title": "Type",
      "type": "string"
     }
    },
    "required": [
     "id",
     "type",
     "created_at",
     "livemode",
     "source",
     "data"
    ],
    "title": "WebhookEventPayload",
    "type": "object"
   }
  },
  "securitySchemes": {
   "ApiKey": {
    "description": "Your API key, sent as `Authorization: Bearer nsk_live_...`. Keys are shown once at creation and stored only as a hash.",
    "scheme": "bearer",
    "type": "http"
   }
  }
 },
 "info": {
  "contact": {
   "email": "support@nutrasoft.ca",
   "name": "NutraSoft developer support",
   "url": "https://www.nutrasoft.ca/developers"
  },
  "description": "The NutraSoft partner API. Authenticate with your account's API key, sent as `Authorization: Bearer nsk_live_...`. A successful response is wrapped in a `data` envelope, an error in an `error` envelope, and every response carries an `X-Request-Id` header.\n\nMoney is in the account's currency, given by `GET /organization`, as JSON numbers: amounts carry up to 4 decimal places, unit prices and costs up to 8, rates and quantities up to 6. Timestamps are UTC.",
  "termsOfService": "https://www.nutrasoft.ca/terms",
  "title": "NutraSoft Public API",
  "version": "1.1"
 },
 "openapi": "3.1.0",
 "paths": {
  "/allergens": {
   "get": {
    "description": "Your account's allergens plus the shared reference rows, marked `is_global`. Use `search` or the named filters, not both.",
    "operationId": "list_allergens",
    "parameters": [
     {
      "description": "Free-text match across name, code, description and regulatory reference.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match across name, code, description and regulatory reference.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on either name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on either name.",
       "title": "Name"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "description",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Description"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "regulatory_reference",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Regulatory Reference"
      }
     },
     {
      "in": "query",
      "name": "is_major_allergen",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "title": "Is Major Allergen"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, is_major_allergen, name, name_fr. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, is_major_allergen, name, name_fr. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicAllergen_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List allergens",
    "tags": [
     "Allergens"
    ]
   },
   "post": {
    "description": "Name and code are unique within your account; a duplicate is a 409.",
    "operationId": "create_allergen",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/AllergenCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicAllergen_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Create an allergen",
    "tags": [
     "Allergens"
    ]
   }
  },
  "/allergens/{allergen_id}": {
   "delete": {
    "description": "Deletes one of your allergens. Refused with 409 while a product declares it. Shared rows are read-only (403).",
    "operationId": "delete_allergen",
    "parameters": [
     {
      "description": "The allergen's `id`.",
      "in": "path",
      "name": "allergen_id",
      "required": true,
      "schema": {
       "description": "The allergen's `id`.",
       "exclusiveMinimum": 0,
       "title": "Allergen Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicAllergen_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Delete an allergen",
    "tags": [
     "Allergens"
    ]
   },
   "get": {
    "operationId": "get_allergen",
    "parameters": [
     {
      "description": "The allergen's `id`.",
      "in": "path",
      "name": "allergen_id",
      "required": true,
      "schema": {
       "description": "The allergen's `id`.",
       "exclusiveMinimum": 0,
       "title": "Allergen Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicAllergen_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve an allergen",
    "tags": [
     "Allergens"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. Shared rows are read-only (403).",
    "operationId": "update_allergen",
    "parameters": [
     {
      "description": "The allergen's `id`.",
      "in": "path",
      "name": "allergen_id",
      "required": true,
      "schema": {
       "description": "The allergen's `id`.",
       "exclusiveMinimum": 0,
       "title": "Allergen Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/AllergenUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicAllergen_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Update an allergen",
    "tags": [
     "Allergens"
    ]
   }
  },
  "/bills": {
   "get": {
    "description": "What suppliers invoiced. Use `search` or the named filters, not both. Money fields require `cost:read`.",
    "operationId": "list_bills",
    "parameters": [
     {
      "in": "query",
      "name": "supplier_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Supplier Id"
      }
     },
     {
      "in": "query",
      "name": "purchase_order_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Purchase Order Id"
      }
     },
     {
      "in": "query",
      "name": "bill_date_from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Bill Date From"
      }
     },
     {
      "in": "query",
      "name": "bill_date_to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Bill Date To"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: bill_date, bill_no, id. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: bill_date, bill_no, id. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicBill_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "List bills",
    "tags": [
     "Bills"
    ]
   },
   "post": {
    "description": "Receives stock. Each line creates a lot, or tops up the lot with that number for that product at that location, and writes one `PURCHASE_ENTRY` stock movement. Unless your account costs manually, product costs are recalculated. `quantity` and `cost` are in the purchase unit; lots are in base units.\n\nIdempotent on `Idempotency-Key`: a retry with the same key returns the bill the first call created, with status 200, and receives nothing twice. Reusing a key with a different body is a 409.\n\nA lot number that exists for the product and location with a different expiry is a 409; with the same expiry the lot is topped up.",
    "operationId": "create_bill",
    "parameters": [
     {
      "description": "Your own unique string for this bill, up to 200 characters. Reusing it returns the bill it created the first time.",
      "in": "header",
      "name": "Idempotency-Key",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "maxLength": 200,
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Your own unique string for this bill, up to 200 characters. Reusing it returns the bill it created the first time.",
       "title": "Idempotency-Key"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/BillCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicBill_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Create a bill",
    "tags": [
     "Bills"
    ]
   }
  },
  "/bills/{bill_id}": {
   "get": {
    "operationId": "get_bill",
    "parameters": [
     {
      "description": "The bill's `id`.",
      "in": "path",
      "name": "bill_id",
      "required": true,
      "schema": {
       "description": "The bill's `id`.",
       "exclusiveMinimum": 0,
       "title": "Bill Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicBill_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "Retrieve a bill",
    "tags": [
     "Bills"
    ]
   }
  },
  "/countries": {
   "get": {
    "description": "The ISO country list, shared by every account.",
    "operationId": "list_countries",
    "parameters": [
     {
      "description": "Free-text match on name or code. Not combinable with the named filters.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on name or code. Not combinable with the named filters.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicCountry_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List countries",
    "tags": [
     "Countries"
    ]
   }
  },
  "/countries/{country_id}": {
   "get": {
    "operationId": "get_country",
    "parameters": [
     {
      "description": "The country's `id`.",
      "in": "path",
      "name": "country_id",
      "required": true,
      "schema": {
       "description": "The country's `id`.",
       "exclusiveMinimum": 0,
       "title": "Country Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCountry_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a country",
    "tags": [
     "Countries"
    ]
   }
  },
  "/customer-types": {
   "get": {
    "description": "The types a customer can be classified under.",
    "operationId": "list_customer_types",
    "parameters": [
     {
      "description": "Free-text match on code, name or description.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, name or description.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicCustomerType_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List customer types",
    "tags": [
     "Customer types"
    ]
   }
  },
  "/customer-types/{customer_type_id}": {
   "get": {
    "operationId": "get_customer_type",
    "parameters": [
     {
      "description": "The customer type's `id`.",
      "in": "path",
      "name": "customer_type_id",
      "required": true,
      "schema": {
       "description": "The customer type's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Type Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCustomerType_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a customer type",
    "tags": [
     "Customer types"
    ]
   }
  },
  "/customers": {
   "get": {
    "operationId": "list_customers",
    "parameters": [
     {
      "description": "Partial match.",
      "in": "query",
      "name": "customer_code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Customer Code"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "company",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Company"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "email",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Email"
      }
     },
     {
      "in": "query",
      "name": "price_list_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Price List Id"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: company, created_at, customer_code, id, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: company, created_at, customer_code, id, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicCustomer_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List customers",
    "tags": [
     "Customers"
    ]
   },
   "post": {
    "description": "`customer_code` is unique within your account; a duplicate is a 409. The price list, customer type, salesperson, territory, shipping method and tax rate must be your account's or shared. Add shipping addresses afterwards.",
    "operationId": "create_customer",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CustomerCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCustomer_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Create a customer",
    "tags": [
     "Customers"
    ]
   }
  },
  "/customers/{customer_id}": {
   "delete": {
    "description": "Deletes the customer and its attached documents. Refused with 409 while an order, an invoice or another record uses the customer: deactivate it instead with `PATCH` and `active: false`.",
    "operationId": "delete_customer",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCustomer_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Delete a customer",
    "tags": [
     "Customers"
    ]
   },
   "get": {
    "operationId": "get_customer",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCustomer_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a customer",
    "tags": [
     "Customers"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. `address` and `tag_ids` are replaced as a whole. Existing orders and invoices keep the address they were raised with.",
    "operationId": "update_customer",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CustomerUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicCustomer_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Update a customer",
    "tags": [
     "Customers"
    ]
   }
  },
  "/customers/{customer_id}/shipping-addresses": {
   "get": {
    "description": "Not paginated: every address of the customer is returned.",
    "operationId": "list_shipping_addresses",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicShippingAddress_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List a customer's shipping addresses",
    "tags": [
     "Customers"
    ]
   },
   "post": {
    "description": "A customer has at most one default address, so `is_default: true` is a 409 while another address holds it.",
    "operationId": "create_shipping_address",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ShippingAddressCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicShippingAddress_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Add a customer shipping address",
    "tags": [
     "Customers"
    ]
   }
  },
  "/customers/{customer_id}/shipping-addresses/{shipping_address_id}": {
   "delete": {
    "description": "Orders already raised keep the address they were stamped with.",
    "operationId": "delete_shipping_address",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     },
     {
      "description": "The address's `id`.",
      "in": "path",
      "name": "shipping_address_id",
      "required": true,
      "schema": {
       "description": "The address's `id`.",
       "exclusiveMinimum": 0,
       "title": "Shipping Address Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicShippingAddress_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Delete a customer shipping address",
    "tags": [
     "Customers"
    ]
   },
   "get": {
    "operationId": "get_shipping_address",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     },
     {
      "description": "The address's `id`.",
      "in": "path",
      "name": "shipping_address_id",
      "required": true,
      "schema": {
       "description": "The address's `id`.",
       "exclusiveMinimum": 0,
       "title": "Shipping Address Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicShippingAddress_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a customer shipping address",
    "tags": [
     "Customers"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. `address` is replaced as a whole.",
    "operationId": "update_shipping_address",
    "parameters": [
     {
      "description": "The customer's `id`.",
      "in": "path",
      "name": "customer_id",
      "required": true,
      "schema": {
       "description": "The customer's `id`.",
       "exclusiveMinimum": 0,
       "title": "Customer Id",
       "type": "integer"
      }
     },
     {
      "description": "The address's `id`.",
      "in": "path",
      "name": "shipping_address_id",
      "required": true,
      "schema": {
       "description": "The address's `id`.",
       "exclusiveMinimum": 0,
       "title": "Shipping Address Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ShippingAddressUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicShippingAddress_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Update a customer shipping address",
    "tags": [
     "Customers"
    ]
   }
  },
  "/employees": {
   "get": {
    "description": "Identity and employee type only.",
    "operationId": "list_employees",
    "parameters": [
     {
      "description": "Free-text match on name or code.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on name or code.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "first_name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "First Name"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "last_name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Last Name"
      }
     },
     {
      "in": "query",
      "name": "is_active",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "title": "Is Active"
      }
     },
     {
      "in": "query",
      "name": "employee_type_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Employee Type Id"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, first_name, id, last_name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, first_name, id, last_name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicEmployee_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "List employees",
    "tags": [
     "Employees"
    ]
   }
  },
  "/employees/{employee_id}": {
   "get": {
    "operationId": "get_employee",
    "parameters": [
     {
      "description": "The employee's `id`.",
      "in": "path",
      "name": "employee_id",
      "required": true,
      "schema": {
       "description": "The employee's `id`.",
       "exclusiveMinimum": 0,
       "title": "Employee Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicEmployee_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "Retrieve an employee",
    "tags": [
     "Employees"
    ]
   }
  },
  "/equipment": {
   "get": {
    "operationId": "list_equipment",
    "parameters": [
     {
      "description": "Free-text match on code or name.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code or name.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Set false for only the equipment available for production.",
      "in": "query",
      "name": "include_out_of_service",
      "required": false,
      "schema": {
       "default": true,
       "description": "Set false for only the equipment available for production.",
       "title": "Include Out Of Service",
       "type": "boolean"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicEquipment_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "List equipment",
    "tags": [
     "Equipment"
    ]
   },
   "post": {
    "description": "`code` is stored trimmed and upper-cased and is unique within your account; a duplicate is a 409.",
    "operationId": "create_equipment",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EquipmentCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicEquipment_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Create a piece of equipment",
    "tags": [
     "Equipment"
    ]
   }
  },
  "/equipment/{equipment_id}": {
   "delete": {
    "description": "Refused with 409 while a production line or run uses the equipment. Otherwise its logs, maintenance schedules and QC tasks are deleted with it; to keep them, set `out_of_service` instead.",
    "operationId": "delete_equipment",
    "parameters": [
     {
      "description": "The equipment's `id`.",
      "in": "path",
      "name": "equipment_id",
      "required": true,
      "schema": {
       "description": "The equipment's `id`.",
       "exclusiveMinimum": 0,
       "title": "Equipment Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicEquipment_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Delete a piece of equipment",
    "tags": [
     "Equipment"
    ]
   },
   "get": {
    "operationId": "get_equipment",
    "parameters": [
     {
      "description": "The equipment's `id`.",
      "in": "path",
      "name": "equipment_id",
      "required": true,
      "schema": {
       "description": "The equipment's `id`.",
       "exclusiveMinimum": 0,
       "title": "Equipment Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicEquipment_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "Retrieve a piece of equipment",
    "tags": [
     "Equipment"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. A null `warehouse_id` clears it.",
    "operationId": "update_equipment",
    "parameters": [
     {
      "description": "The equipment's `id`.",
      "in": "path",
      "name": "equipment_id",
      "required": true,
      "schema": {
       "description": "The equipment's `id`.",
       "exclusiveMinimum": 0,
       "title": "Equipment Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EquipmentUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicEquipment_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Update a piece of equipment",
    "tags": [
     "Equipment"
    ]
   }
  },
  "/foods": {
   "get": {
    "description": "Nutrition sources, yours plus the NutraSoft reference set, marked `is_global`. `nutrients` is null here: retrieve a food for its values.",
    "operationId": "list_foods",
    "parameters": [
     {
      "description": "Free-text match on id, name or French name.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on id, name or French name.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name, name_fr. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name, name_fr. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicFood_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List foods",
    "tags": [
     "Foods"
    ]
   },
   "post": {
    "description": "Creates a nutrition source with no nutrient values: they cannot be written in v1. Not idempotent: a retry creates a second food.",
    "operationId": "create_food",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/FoodCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicFood_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Create a food",
    "tags": [
     "Foods"
    ]
   }
  },
  "/foods/{food_id}": {
   "delete": {
    "description": "Deletes one of your foods and its nutrient values. Refused with 409 while a product uses it as its nutrition source.",
    "operationId": "delete_food",
    "parameters": [
     {
      "description": "The food's `id`.",
      "in": "path",
      "name": "food_id",
      "required": true,
      "schema": {
       "description": "The food's `id`.",
       "exclusiveMinimum": 0,
       "title": "Food Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicFood_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Delete a food",
    "tags": [
     "Foods"
    ]
   },
   "get": {
    "description": "Includes the food's nutrient values.",
    "operationId": "get_food",
    "parameters": [
     {
      "description": "The food's `id`.",
      "in": "path",
      "name": "food_id",
      "required": true,
      "schema": {
       "description": "The food's `id`.",
       "exclusiveMinimum": 0,
       "title": "Food Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicFood_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a food",
    "tags": [
     "Foods"
    ]
   },
   "patch": {
    "description": "Omitted fields and nutrient values are left unchanged. Shared reference foods are read-only (403).",
    "operationId": "update_food",
    "parameters": [
     {
      "description": "The food's `id`.",
      "in": "path",
      "name": "food_id",
      "required": true,
      "schema": {
       "description": "The food's `id`.",
       "exclusiveMinimum": 0,
       "title": "Food Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/FoodUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicFood_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Update a food",
    "tags": [
     "Foods"
    ]
   }
  },
  "/invoices": {
   "get": {
    "description": "Read-only: shipping produces invoices. Use `search` or the named filters, not both. Money fields require `cost:read`.",
    "operationId": "list_invoices",
    "parameters": [
     {
      "in": "query",
      "name": "customer_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Customer Id"
      }
     },
     {
      "in": "query",
      "name": "sales_order_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Sales Order Id"
      }
     },
     {
      "in": "query",
      "name": "invoice_date_from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Invoice Date From"
      }
     },
     {
      "in": "query",
      "name": "invoice_date_to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Invoice Date To"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, id, invoice_no, order_date, ship_date, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, id, invoice_no, order_date, ship_date, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicInvoice_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List invoices",
    "tags": [
     "Invoices"
    ]
   }
  },
  "/invoices/{invoice_id}": {
   "get": {
    "operationId": "get_invoice",
    "parameters": [
     {
      "description": "The invoice's `id`.",
      "in": "path",
      "name": "invoice_id",
      "required": true,
      "schema": {
       "description": "The invoice's `id`.",
       "exclusiveMinimum": 0,
       "title": "Invoice Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicInvoice_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve an invoice",
    "tags": [
     "Invoices"
    ]
   }
  },
  "/nutrients": {
   "get": {
    "description": "The nutrient dictionary, shared by every account. Not paginated: every row is returned, ordered by name.",
    "operationId": "list_nutrients",
    "parameters": [
     {
      "description": "Free-text match on name or label, or the exact unit.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on name or label, or the exact unit.",
       "title": "Search"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicNutrient_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List nutrients",
    "tags": [
     "Nutrients"
    ]
   }
  },
  "/nutrients/{nutrient_id}": {
   "get": {
    "operationId": "get_nutrient",
    "parameters": [
     {
      "description": "The nutrient's `id`.",
      "in": "path",
      "name": "nutrient_id",
      "required": true,
      "schema": {
       "description": "The nutrient's `id`.",
       "exclusiveMinimum": 0,
       "title": "Nutrient Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicNutrient_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a nutrient",
    "tags": [
     "Nutrients"
    ]
   }
  },
  "/operations": {
   "get": {
    "description": "The operations recipe steps reference. `cost` requires `cost:read`.",
    "operationId": "list_operations",
    "parameters": [
     {
      "description": "Free-text match on code or name.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code or name.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicOperation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "List operations",
    "tags": [
     "Operations"
    ]
   },
   "post": {
    "description": "`code` is stored trimmed and upper-cased and is unique within your account; a duplicate is a 409.",
    "operationId": "create_operation",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OperationCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicOperation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Create an operation",
    "tags": [
     "Operations"
    ]
   }
  },
  "/operations/{operation_id}": {
   "delete": {
    "description": "Refused with 409 while a recipe step or a production run uses the operation. A HACCP process step that references it is unlinked.",
    "operationId": "delete_operation",
    "parameters": [
     {
      "description": "The operation's `id`.",
      "in": "path",
      "name": "operation_id",
      "required": true,
      "schema": {
       "description": "The operation's `id`.",
       "exclusiveMinimum": 0,
       "title": "Operation Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicOperation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Delete an operation",
    "tags": [
     "Operations"
    ]
   },
   "get": {
    "operationId": "get_operation",
    "parameters": [
     {
      "description": "The operation's `id`.",
      "in": "path",
      "name": "operation_id",
      "required": true,
      "schema": {
       "description": "The operation's `id`.",
       "exclusiveMinimum": 0,
       "title": "Operation Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicOperation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "Retrieve an operation",
    "tags": [
     "Operations"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged.",
    "operationId": "update_operation",
    "parameters": [
     {
      "description": "The operation's `id`.",
      "in": "path",
      "name": "operation_id",
      "required": true,
      "schema": {
       "description": "The operation's `id`.",
       "exclusiveMinimum": 0,
       "title": "Operation Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OperationUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicOperation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Update an operation",
    "tags": [
     "Operations"
    ]
   }
  },
  "/organization": {
   "get": {
    "description": "The account the key belongs to, its environment and currency, and what the key may do. Needs no scope beyond a valid key.",
    "operationId": "get_organization",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicOrganization_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": []
     }
    ],
    "summary": "Who this key is",
    "tags": [
     "Organization"
    ]
   }
  },
  "/preservations": {
   "get": {
    "description": "Preservation methods, yours plus the shared ones. Read-only.",
    "operationId": "list_preservations",
    "parameters": [
     {
      "description": "Free-text match on code or name.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code or name.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicPreservation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List preservations",
    "tags": [
     "Preservations"
    ]
   }
  },
  "/preservations/{preservation_id}": {
   "get": {
    "operationId": "get_preservation",
    "parameters": [
     {
      "description": "The preservation's `id`.",
      "in": "path",
      "name": "preservation_id",
      "required": true,
      "schema": {
       "description": "The preservation's `id`.",
       "exclusiveMinimum": 0,
       "title": "Preservation Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPreservation_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a preservation",
    "tags": [
     "Preservations"
    ]
   }
  },
  "/price-lists": {
   "get": {
    "description": "`items` is null here: retrieve a price list for its prices.",
    "operationId": "list_price_lists",
    "parameters": [
     {
      "description": "Free-text match on code, name or description.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, name or description.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicPriceList_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List price lists",
    "tags": [
     "Price lists"
    ]
   }
  },
  "/price-lists/{price_list_id}": {
   "get": {
    "description": "Includes the list's products. Prices require `cost:read`.",
    "operationId": "get_price_list",
    "parameters": [
     {
      "description": "The price list's `id`.",
      "in": "path",
      "name": "price_list_id",
      "required": true,
      "schema": {
       "description": "The price list's `id`.",
       "exclusiveMinimum": 0,
       "title": "Price List Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPriceList_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a price list",
    "tags": [
     "Price lists"
    ]
   }
  },
  "/product-lots": {
   "get": {
    "description": "Stock, lot by lot, in each product's base unit. Two quality statuses are sellable: `AVAILABLE` and `RELEASED`.",
    "operationId": "list_product_lots",
    "parameters": [
     {
      "in": "query",
      "name": "product_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Product Id"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "lot_number",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Lot Number"
      }
     },
     {
      "in": "query",
      "name": "location_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Location Id"
      }
     },
     {
      "description": "Lots in this warehouse, plus lots with no location.",
      "in": "query",
      "name": "warehouse_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "description": "Lots in this warehouse, plus lots with no location.",
       "title": "Warehouse Id"
      }
     },
     {
      "description": "Omit for both.",
      "in": "query",
      "name": "archived",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "description": "Omit for both.",
       "title": "Archived"
      }
     },
     {
      "description": "Free-text match on the lot number.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on the lot number.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expiration_date, id, lot_number, product_name, quantity_base, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expiration_date, id, lot_number, product_name, quantity_base, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:read"
      ]
     }
    ],
    "summary": "List product lots",
    "tags": [
     "Product lots"
    ]
   },
   "post": {
    "description": "Puts stock on the books with the `PRODUCT_FORM` stock movement that explains it, in one transaction. `quantity_base` is stored as sent, in the product's base unit. A second lot with the same number at the same location is refused with 409.",
    "operationId": "create_product_lot",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProductLotCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Create a product lot",
    "tags": [
     "Product lots"
    ]
   }
  },
  "/product-lots/{lot_id}": {
   "get": {
    "operationId": "get_product_lot",
    "parameters": [
     {
      "description": "The lot's `id`.",
      "in": "path",
      "name": "lot_id",
      "required": true,
      "schema": {
       "description": "The lot's `id`.",
       "exclusiveMinimum": 0,
       "title": "Lot Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:read"
      ]
     }
    ],
    "summary": "Retrieve a product lot",
    "tags": [
     "Product lots"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. `quantity_base` corrects the lot and writes no stock movement: use it to reconcile a count. Archiving has its own operations, and the quality status is not writable.",
    "operationId": "update_product_lot",
    "parameters": [
     {
      "description": "The lot's `id`.",
      "in": "path",
      "name": "lot_id",
      "required": true,
      "schema": {
       "description": "The lot's `id`.",
       "exclusiveMinimum": 0,
       "title": "Lot Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProductLotUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Update a product lot",
    "tags": [
     "Product lots"
    ]
   }
  },
  "/product-lots/{lot_id}/archive": {
   "post": {
    "description": "Archiving is how a lot is retired: lots are never deleted. Refused with 409 for a lot already archived and for a product's unnumbered lot.",
    "operationId": "archive_product_lot",
    "parameters": [
     {
      "description": "The lot's `id`.",
      "in": "path",
      "name": "lot_id",
      "required": true,
      "schema": {
       "description": "The lot's `id`.",
       "exclusiveMinimum": 0,
       "title": "Lot Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Archive a product lot",
    "tags": [
     "Product lots"
    ]
   }
  },
  "/product-lots/{lot_id}/unarchive": {
   "post": {
    "description": "Returns an archived lot to active stock. Refused with 409 for a lot already active and for a product's unnumbered lot.",
    "operationId": "unarchive_product_lot",
    "parameters": [
     {
      "description": "The lot's `id`.",
      "in": "path",
      "name": "lot_id",
      "required": true,
      "schema": {
       "description": "The lot's `id`.",
       "exclusiveMinimum": 0,
       "title": "Lot Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductLot_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Unarchive a product lot",
    "tags": [
     "Product lots"
    ]
   }
  },
  "/production-lines": {
   "get": {
    "description": "Deleted lines are not returned.",
    "operationId": "list_production_lines",
    "parameters": [
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicProductionLine_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "List production lines",
    "tags": [
     "Production lines"
    ]
   },
   "post": {
    "description": "The name is unique within your account; a duplicate is a 409. Equipment and employees are assigned in NutraSoft.",
    "operationId": "create_production_line",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProductionLineCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductionLine_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Create a production line",
    "tags": [
     "Production lines"
    ]
   }
  },
  "/production-lines/{production_line_id}": {
   "delete": {
    "description": "The line is soft-deleted: runs that reference it keep it, and it leaves the list. Its per-product capacities are removed.",
    "operationId": "delete_production_line",
    "parameters": [
     {
      "description": "The line's `id`.",
      "in": "path",
      "name": "production_line_id",
      "required": true,
      "schema": {
       "description": "The line's `id`.",
       "exclusiveMinimum": 0,
       "title": "Production Line Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductionLine_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Delete a production line",
    "tags": [
     "Production lines"
    ]
   },
   "get": {
    "operationId": "get_production_line",
    "parameters": [
     {
      "description": "The line's `id`.",
      "in": "path",
      "name": "production_line_id",
      "required": true,
      "schema": {
       "description": "The line's `id`.",
       "exclusiveMinimum": 0,
       "title": "Production Line Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductionLine_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "Retrieve a production line",
    "tags": [
     "Production lines"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. A null `description` or `warehouse_id` clears it.",
    "operationId": "update_production_line",
    "parameters": [
     {
      "description": "The line's `id`.",
      "in": "path",
      "name": "production_line_id",
      "required": true,
      "schema": {
       "description": "The line's `id`.",
       "exclusiveMinimum": 0,
       "title": "Production Line Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProductionLineUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProductionLine_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Update a production line",
    "tags": [
     "Production lines"
    ]
   }
  },
  "/productions": {
   "get": {
    "description": "`planned_steps` and `consumed_steps` are null here: retrieve a run for them.",
    "operationId": "list_productions",
    "parameters": [
     {
      "description": "Repeat the parameter to match any of several statuses.",
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "items": {
          "$ref": "#/components/schemas/ProductionStatus"
         },
         "type": "array"
        },
        {
         "type": "null"
        }
       ],
       "description": "Repeat the parameter to match any of several statuses.",
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "product_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Product Id"
      }
     },
     {
      "in": "query",
      "name": "production_line_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Production Line Id"
      }
     },
     {
      "in": "query",
      "name": "lot_number",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Lot Number"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: end_date, id, production_no, start_date, status. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: end_date, id, production_no, start_date, status. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicProduction_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "List production runs",
    "tags": [
     "Productions"
    ]
   }
  },
  "/productions/{production_id}": {
   "get": {
    "description": "Includes `planned_steps`, what the run intends to consume, and `consumed_steps`, what it consumed lot by lot, both in base units.",
    "operationId": "get_production",
    "parameters": [
     {
      "description": "The run's `id`.",
      "in": "path",
      "name": "production_id",
      "required": true,
      "schema": {
       "description": "The run's `id`.",
       "exclusiveMinimum": 0,
       "title": "Production Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProduction_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:read"
      ]
     }
    ],
    "summary": "Retrieve a production run",
    "tags": [
     "Productions"
    ]
   }
  },
  "/productions/{production_id}/status": {
   "post": {
    "description": "Moves a run between `PLANNED`, `ON_HOLD`, `QUARANTINE` and `CANCELLED`. Starting and completing a run happen on the production floor, so `IN_PROGRESS`, `IN_PROGRESS_TRANSFORMATION` and `COMPLETED` are refused with 409, as are runs already `COMPLETED` or `CANCELLED` and signed, locked records. The response carries no steps.",
    "operationId": "change_production_status",
    "parameters": [
     {
      "description": "The run's `id`.",
      "in": "path",
      "name": "production_id",
      "required": true,
      "schema": {
       "description": "The run's `id`.",
       "exclusiveMinimum": 0,
       "title": "Production Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProductionStatusChangeRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProduction_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "manufacturing:write"
      ]
     }
    ],
    "summary": "Change a production run's status",
    "tags": [
     "Productions"
    ]
   }
  },
  "/products": {
   "get": {
    "description": "One table, two families: every row carries `kind`, `material` or `recipe`. `allergens`, `tag_ids`, `material` and `recipe` are null here: retrieve a product for them.",
    "operationId": "list_products",
    "parameters": [
     {
      "description": "Partial match.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Name"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "product_code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Product Code"
      }
     },
     {
      "description": "Repeat the parameter to match any of several types.",
      "in": "query",
      "name": "product_types",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "items": {
          "$ref": "#/components/schemas/ProductType"
         },
         "type": "array"
        },
        {
         "type": "null"
        }
       ],
       "description": "Repeat the parameter to match any of several types.",
       "title": "Product Types"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, id, name, product_code, product_type, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, id, name, product_code, product_type, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicProduct_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List products",
    "tags": [
     "Products"
    ]
   }
  },
  "/products/{product_id}": {
   "get": {
    "description": "Exactly one of `material` and `recipe` is populated, as `kind` says. The bill of materials is not published in v1.",
    "operationId": "get_product",
    "parameters": [
     {
      "description": "The product's `id`.",
      "in": "path",
      "name": "product_id",
      "required": true,
      "schema": {
       "description": "The product's `id`.",
       "exclusiveMinimum": 0,
       "title": "Product Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicProduct_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a product",
    "tags": [
     "Products"
    ]
   }
  },
  "/purchase-orders": {
   "get": {
    "description": "Intent to buy: a purchase order never moves stock. Use `search` or the named filters, not both. Money fields require `cost:read`.",
    "operationId": "list_purchase_orders",
    "parameters": [
     {
      "in": "query",
      "name": "supplier_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Supplier Id"
      }
     },
     {
      "description": "Repeat the parameter to match any of several statuses.",
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "items": {
          "$ref": "#/components/schemas/PurchaseOrderStatus"
         },
         "type": "array"
        },
        {
         "type": "null"
        }
       ],
       "description": "Repeat the parameter to match any of several statuses.",
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "order_date_from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Order Date From"
      }
     },
     {
      "in": "query",
      "name": "order_date_to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Order Date To"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expected_date, id, order_date, purchase_order_no, status, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expected_date, id, order_date, purchase_order_no, status, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicPurchaseOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "List purchase orders",
    "tags": [
     "Purchase orders"
    ]
   },
   "post": {
    "description": "Raises an `OPEN` order: no stock moves and no cost changes. The vendor block and ship-to are copied from the supplier, and the subtotal is computed from the lines.\n\nIdempotent on `Idempotency-Key`: a retry with the same key returns the order the first call created, with status 200. Reusing a key with a different body is a 409.\n\nRefused with 409 when your account blocks unapproved suppliers and this one is suspended or rejected.",
    "operationId": "create_purchase_order",
    "parameters": [
     {
      "description": "Your own unique string for this order, up to 200 characters. Reusing it returns the order it created the first time.",
      "in": "header",
      "name": "Idempotency-Key",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "maxLength": 200,
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Your own unique string for this order, up to 200 characters. Reusing it returns the order it created the first time.",
       "title": "Idempotency-Key"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PurchaseOrderCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPurchaseOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Create a purchase order",
    "tags": [
     "Purchase orders"
    ]
   }
  },
  "/purchase-orders/{purchase_order_id}": {
   "get": {
    "operationId": "get_purchase_order",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "purchase_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Purchase Order Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPurchaseOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "Retrieve a purchase order",
    "tags": [
     "Purchase orders"
    ]
   },
   "patch": {
    "description": "Only `OPEN` and `SENT` orders are editable; anything else is a 409. Omitted fields are left unchanged.\n\nSending `lines` replaces every line and recomputes the subtotal. Changing `supplier_id` copies the vendor block and ship-to from the new supplier. Not idempotent.",
    "operationId": "update_purchase_order",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "purchase_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Purchase Order Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PurchaseOrderUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPurchaseOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Update a purchase order",
    "tags": [
     "Purchase orders"
    ]
   }
  },
  "/purchase-orders/{purchase_order_id}/status": {
   "post": {
    "description": "`OPEN` may move to `SENT`, `CONFIRMED` or `CANCELLED`; `SENT` to `CONFIRMED` or `CANCELLED`; `CONFIRMED` to `CANCELLED`; `RECEIVED` and `BACK_ORDER` to `CLOSED`. Any other move is a 409, and a closed order is final.",
    "operationId": "set_purchase_order_status",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "purchase_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Purchase Order Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PurchaseOrderStatusRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicPurchaseOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Change a purchase order's status",
    "tags": [
     "Purchase orders"
    ]
   }
  },
  "/qc-checkpoints": {
   "get": {
    "description": "The checkpoints your quality plans are built from.",
    "operationId": "list_qc_checkpoints",
    "parameters": [
     {
      "description": "Free-text match. Not combinable with the named filters.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match. Not combinable with the named filters.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the code.",
      "in": "query",
      "name": "code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the code.",
       "title": "Code"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "in": "query",
      "name": "input_type",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "$ref": "#/components/schemas/QCInputType"
        },
        {
         "type": "null"
        }
       ],
       "title": "Input Type"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicQCCheckpoint_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List quality checkpoints",
    "tags": [
     "QC checkpoints"
    ]
   }
  },
  "/qc-checkpoints/{qc_id}": {
   "get": {
    "operationId": "get_qc_checkpoint",
    "parameters": [
     {
      "description": "The checkpoint's `id`.",
      "in": "path",
      "name": "qc_id",
      "required": true,
      "schema": {
       "description": "The checkpoint's `id`.",
       "exclusiveMinimum": 0,
       "title": "Qc Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicQCCheckpoint_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a quality checkpoint",
    "tags": [
     "QC checkpoints"
    ]
   }
  },
  "/qc-units-of-measure": {
   "get": {
    "description": "Units quality checkpoint results are recorded in, separate from the inventory units of measure.",
    "operationId": "list_qc_units_of_measure",
    "parameters": [
     {
      "description": "Free-text match on name or code.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on name or code.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicQCUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List QC units of measure",
    "tags": [
     "QC units of measure"
    ]
   }
  },
  "/qc-units-of-measure/{qc_uom_id}": {
   "get": {
    "operationId": "get_qc_unit_of_measure",
    "parameters": [
     {
      "description": "The QC unit's `id`.",
      "in": "path",
      "name": "qc_uom_id",
      "required": true,
      "schema": {
       "description": "The QC unit's `id`.",
       "exclusiveMinimum": 0,
       "title": "Qc Uom Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicQCUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a QC unit of measure",
    "tags": [
     "QC units of measure"
    ]
   }
  },
  "/sales-orders": {
   "get": {
    "description": "Money fields require `cost:read`. Addresses are those the order was raised with.",
    "operationId": "list_sales_orders",
    "parameters": [
     {
      "in": "query",
      "name": "customer_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "exclusiveMinimum": 0,
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Customer Id"
      }
     },
     {
      "description": "Repeat the parameter to match any of several statuses.",
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "items": {
          "$ref": "#/components/schemas/SalesOrderStatus"
         },
         "type": "array"
        },
        {
         "type": "null"
        }
       ],
       "description": "Repeat the parameter to match any of several statuses.",
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "order_date_from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Order Date From"
      }
     },
     {
      "in": "query",
      "name": "order_date_to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Order Date To"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expected_date, id, order_date, sales_order_no, status, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: created_at, expected_date, id, order_date, sales_order_no, status, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicSalesOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List sales orders",
    "tags": [
     "Sales orders"
    ]
   },
   "post": {
    "description": "Creates an `OPEN` order with its lines. Each `order_qty` is in its line's `uom_type` unit and is stored in base units, and the subtotal is computed from the lines. Not idempotent: a retry creates a second order.",
    "operationId": "create_sales_order",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SalesOrderCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSalesOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Create a sales order",
    "tags": [
     "Sales orders"
    ]
   }
  },
  "/sales-orders/{sales_order_id}": {
   "get": {
    "operationId": "get_sales_order",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "sales_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Sales Order Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSalesOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a sales order",
    "tags": [
     "Sales orders"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. Sending `lines` replaces the order's lines and recomputes its subtotal.\n\nRefused with 409 for an order that is not `OPEN` and for one placed and paid through the storefront.",
    "operationId": "update_sales_order",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "sales_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Sales Order Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SalesOrderUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSalesOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Update a sales order",
    "tags": [
     "Sales orders"
    ]
   }
  },
  "/sales-orders/{sales_order_id}/cancel": {
   "post": {
    "description": "Cancels the order and writes off every unshipped quantity. An order that already shipped something becomes `CLOSE` rather than `CANCELLED`, so read `status` on the response.\n\nOnly `OPEN`, `BACK_ORDER`, `PREPARING` and `SHIPPED` orders can be cancelled; anything else is a 409. An order paid through the storefront is also a 409: cancel it in NutraSoft, where the payment can be refunded.",
    "operationId": "cancel_sales_order",
    "parameters": [
     {
      "description": "The order's `id`.",
      "in": "path",
      "name": "sales_order_id",
      "required": true,
      "schema": {
       "description": "The order's `id`.",
       "exclusiveMinimum": 0,
       "title": "Sales Order Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSalesOrder_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:write"
      ]
     }
    ],
    "summary": "Cancel a sales order",
    "tags": [
     "Sales orders"
    ]
   }
  },
  "/salespersons": {
   "get": {
    "operationId": "list_salespersons",
    "parameters": [
     {
      "description": "Free-text match on code, names or email.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, names or email.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "first_name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "First Name"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "last_name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Last Name"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "email",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Email"
      }
     },
     {
      "in": "query",
      "name": "active",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "title": "Active"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, first_name, id, last_name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, first_name, id, last_name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicSalesperson_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List salespersons",
    "tags": [
     "Salespersons"
    ]
   }
  },
  "/salespersons/{salesperson_id}": {
   "get": {
    "operationId": "get_salesperson",
    "parameters": [
     {
      "description": "The salesperson's `id`.",
      "in": "path",
      "name": "salesperson_id",
      "required": true,
      "schema": {
       "description": "The salesperson's `id`.",
       "exclusiveMinimum": 0,
       "title": "Salesperson Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSalesperson_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a salesperson",
    "tags": [
     "Salespersons"
    ]
   }
  },
  "/shipping-methods": {
   "get": {
    "operationId": "list_shipping_methods",
    "parameters": [
     {
      "description": "Free-text match on code, name or description.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, name or description.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicShippingMethod_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List shipping methods",
    "tags": [
     "Shipping methods"
    ]
   }
  },
  "/shipping-methods/{shipping_method_id}": {
   "get": {
    "operationId": "get_shipping_method",
    "parameters": [
     {
      "description": "The shipping method's `id`.",
      "in": "path",
      "name": "shipping_method_id",
      "required": true,
      "schema": {
       "description": "The shipping method's `id`.",
       "exclusiveMinimum": 0,
       "title": "Shipping Method Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicShippingMethod_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a shipping method",
    "tags": [
     "Shipping methods"
    ]
   }
  },
  "/suppliers": {
   "get": {
    "description": "`approval_status` is computed when read, so an expired approval never reads as `APPROVED`. Use `search` or the named filters, not both.",
    "operationId": "list_suppliers",
    "parameters": [
     {
      "description": "Partial match.",
      "in": "query",
      "name": "supplier_code",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Supplier Code"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "company",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Company"
      }
     },
     {
      "description": "Partial match.",
      "in": "query",
      "name": "email",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match.",
       "title": "Email"
      }
     },
     {
      "in": "query",
      "name": "active",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "title": "Active"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: company, created_at, id, supplier_code, updated_at. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: company, created_at, id, supplier_code, updated_at. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
      "in": "query",
      "name": "updated_since",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only rows changed after this instant, as an ISO 8601 timestamp; without an offset it is read as UTC. Tracks the record itself, not its child rows, and deletions are not reported, so reconcile by re-listing from time to time.",
       "title": "Updated Since"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicSupplier_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "List suppliers",
    "tags": [
     "Suppliers"
    ]
   },
   "post": {
    "description": "`supplier_code` is unique within your account; a duplicate is a 409. A new supplier starts `PENDING` approval, which is decided in NutraSoft. Not idempotent.",
    "operationId": "create_supplier",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SupplierCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSupplier_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Create a supplier",
    "tags": [
     "Suppliers"
    ]
   }
  },
  "/suppliers/{supplier_id}": {
   "delete": {
    "description": "A supplier that was ever ordered from or billed is deactivated, not deleted: `active` becomes false and its documents and stock are kept. Only a supplier with no purchasing history is removed. Check `active` on the response to see which happened.",
    "operationId": "delete_supplier",
    "parameters": [
     {
      "description": "The supplier's `id`.",
      "in": "path",
      "name": "supplier_id",
      "required": true,
      "schema": {
       "description": "The supplier's `id`.",
       "exclusiveMinimum": 0,
       "title": "Supplier Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSupplier_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Delete a supplier",
    "tags": [
     "Suppliers"
    ]
   },
   "get": {
    "operationId": "get_supplier",
    "parameters": [
     {
      "description": "The supplier's `id`.",
      "in": "path",
      "name": "supplier_id",
      "required": true,
      "schema": {
       "description": "The supplier's `id`.",
       "exclusiveMinimum": 0,
       "title": "Supplier Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSupplier_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:read"
      ]
     }
    ],
    "summary": "Retrieve a supplier",
    "tags": [
     "Suppliers"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. `address` is replaced as a whole. Approval and certification are not writable.",
    "operationId": "update_supplier",
    "parameters": [
     {
      "description": "The supplier's `id`.",
      "in": "path",
      "name": "supplier_id",
      "required": true,
      "schema": {
       "description": "The supplier's `id`.",
       "exclusiveMinimum": 0,
       "title": "Supplier Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SupplierUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicSupplier_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "purchasing:write"
      ]
     }
    ],
    "summary": "Update a supplier",
    "tags": [
     "Suppliers"
    ]
   }
  },
  "/tags": {
   "get": {
    "description": "Tags for one target type; `ref_type` is required.",
    "operationId": "list_tags",
    "parameters": [
     {
      "description": "Which target type's tags to return.",
      "in": "query",
      "name": "ref_type",
      "required": true,
      "schema": {
       "$ref": "#/components/schemas/TagRefEnum",
       "description": "Which target type's tags to return."
      }
     },
     {
      "description": "Free-text match on the name.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on the name.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicTag_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List tags",
    "tags": [
     "Tags"
    ]
   },
   "post": {
    "description": "A tag's name is unique per `ref_type` within your account, and `ref_type` cannot be changed later. A duplicate is a 409.",
    "operationId": "create_tag",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/TagCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTag_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Create a tag",
    "tags": [
     "Tags"
    ]
   }
  },
  "/tags/{tag_id}": {
   "delete": {
    "description": "Refused with 409 while the tag is attached to a product, customer, supplier or HACCP plan.",
    "operationId": "delete_tag",
    "parameters": [
     {
      "description": "The tag's `id`.",
      "in": "path",
      "name": "tag_id",
      "required": true,
      "schema": {
       "description": "The tag's `id`.",
       "exclusiveMinimum": 0,
       "title": "Tag Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTag_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Delete a tag",
    "tags": [
     "Tags"
    ]
   },
   "get": {
    "operationId": "get_tag",
    "parameters": [
     {
      "description": "The tag's `id`.",
      "in": "path",
      "name": "tag_id",
      "required": true,
      "schema": {
       "description": "The tag's `id`.",
       "exclusiveMinimum": 0,
       "title": "Tag Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTag_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a tag",
    "tags": [
     "Tags"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged. `ref_type` cannot be changed.",
    "operationId": "update_tag",
    "parameters": [
     {
      "description": "The tag's `id`.",
      "in": "path",
      "name": "tag_id",
      "required": true,
      "schema": {
       "description": "The tag's `id`.",
       "exclusiveMinimum": 0,
       "title": "Tag Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/TagUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTag_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Update a tag",
    "tags": [
     "Tags"
    ]
   }
  },
  "/tax-rates": {
   "get": {
    "description": "The tax rates customers and documents are charged under.",
    "operationId": "list_tax_rates",
    "parameters": [
     {
      "description": "Free-text match on code, name or description.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, name or description.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicTaxRate_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List tax rates",
    "tags": [
     "Tax rates"
    ]
   }
  },
  "/tax-rates/{tax_rate_id}": {
   "get": {
    "operationId": "get_tax_rate",
    "parameters": [
     {
      "description": "The tax rate's `id`.",
      "in": "path",
      "name": "tax_rate_id",
      "required": true,
      "schema": {
       "description": "The tax rate's `id`.",
       "exclusiveMinimum": 0,
       "title": "Tax Rate Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTaxRate_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a tax rate",
    "tags": [
     "Tax rates"
    ]
   }
  },
  "/territories": {
   "get": {
    "operationId": "list_territories",
    "parameters": [
     {
      "description": "Free-text match on code, name or description.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on code, name or description.",
       "title": "Search"
      }
     },
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicTerritory_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "List territories",
    "tags": [
     "Territories"
    ]
   }
  },
  "/territories/{territory_id}": {
   "get": {
    "operationId": "get_territory",
    "parameters": [
     {
      "description": "The territory's `id`.",
      "in": "path",
      "name": "territory_id",
      "required": true,
      "schema": {
       "description": "The territory's `id`.",
       "exclusiveMinimum": 0,
       "title": "Territory Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicTerritory_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "sales:read"
      ]
     }
    ],
    "summary": "Retrieve a territory",
    "tags": [
     "Territories"
    ]
   }
  },
  "/units-of-measure": {
   "get": {
    "description": "Your units plus the shared ones, marked `is_global`. Units with `read_only` true cannot be changed or deleted.",
    "operationId": "list_units_of_measure",
    "parameters": [
     {
      "description": "Free-text match on name or code.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match on name or code.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "List units of measure",
    "tags": [
     "Units of measure"
    ]
   },
   "post": {
    "description": "The code must not already be used by one of your units or a shared one; a duplicate is a 409.",
    "operationId": "create_unit_of_measure",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UnitOfMeasureCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Create a unit of measure",
    "tags": [
     "Units of measure"
    ]
   }
  },
  "/units-of-measure/{uom_id}": {
   "delete": {
    "description": "Refused with 409 while a product, lot or document uses the unit. Shared and `read_only` units are read-only (403).",
    "operationId": "delete_unit_of_measure",
    "parameters": [
     {
      "description": "The unit's `id`.",
      "in": "path",
      "name": "uom_id",
      "required": true,
      "schema": {
       "description": "The unit's `id`.",
       "exclusiveMinimum": 0,
       "title": "Uom Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Delete a unit of measure",
    "tags": [
     "Units of measure"
    ]
   },
   "get": {
    "operationId": "get_unit_of_measure",
    "parameters": [
     {
      "description": "The unit's `id`.",
      "in": "path",
      "name": "uom_id",
      "required": true,
      "schema": {
       "description": "The unit's `id`.",
       "exclusiveMinimum": 0,
       "title": "Uom Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:read"
      ]
     }
    ],
    "summary": "Retrieve a unit of measure",
    "tags": [
     "Units of measure"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged and the `code` cannot be changed. Shared and `read_only` units are read-only (403).",
    "operationId": "update_unit_of_measure",
    "parameters": [
     {
      "description": "The unit's `id`.",
      "in": "path",
      "name": "uom_id",
      "required": true,
      "schema": {
       "description": "The unit's `id`.",
       "exclusiveMinimum": 0,
       "title": "Uom Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UnitOfMeasureUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicUnitOfMeasure_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "catalog:write"
      ]
     }
    ],
    "summary": "Update a unit of measure",
    "tags": [
     "Units of measure"
    ]
   }
  },
  "/warehouses": {
   "get": {
    "description": "Your storage sites. Floor plans are not published.",
    "operationId": "list_warehouses",
    "parameters": [
     {
      "description": "Partial match on the name.",
      "in": "query",
      "name": "name",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Partial match on the name.",
       "title": "Name"
      }
     },
     {
      "description": "Free-text match.",
      "in": "query",
      "name": "search",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Free-text match.",
       "title": "Search"
      }
     },
     {
      "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Comma-separated `field:direction` pairs, e.g. `id:desc`. Sortable: code, id, name. `id` is always added last, so paging is stable.",
       "title": "Sort"
      }
     },
     {
      "description": "Rows to return. Maximum 200.",
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "description": "Rows to return. Maximum 200.",
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     },
     {
      "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "description": "Rows to skip. Maximum 10000: to read further, narrow the filters or page with `updated_since`.",
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ListResponse_PublicWarehouse_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:read"
      ]
     }
    ],
    "summary": "List warehouses",
    "tags": [
     "Warehouses"
    ]
   },
   "post": {
    "description": "Creates an active storage site with the default floor plan, ready to use in NutraSoft. `code` is unique among your warehouses; a duplicate is a 409.",
    "operationId": "create_warehouse",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WarehouseCreateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicWarehouse_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Create a warehouse",
    "tags": [
     "Warehouses"
    ]
   }
  },
  "/warehouses/{warehouse_id}": {
   "delete": {
    "description": "Deletes the site and every location under it. Refused with 409 while an inventory count is running there or any of its locations is still used by stock, movements, productions or counts.",
    "operationId": "delete_warehouse",
    "parameters": [
     {
      "description": "The warehouse's `id`.",
      "in": "path",
      "name": "warehouse_id",
      "required": true,
      "schema": {
       "description": "The warehouse's `id`.",
       "exclusiveMinimum": 0,
       "title": "Warehouse Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicWarehouse_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Delete a warehouse",
    "tags": [
     "Warehouses"
    ]
   },
   "get": {
    "operationId": "get_warehouse",
    "parameters": [
     {
      "description": "The warehouse's `id`.",
      "in": "path",
      "name": "warehouse_id",
      "required": true,
      "schema": {
       "description": "The warehouse's `id`.",
       "exclusiveMinimum": 0,
       "title": "Warehouse Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicWarehouse_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:read"
      ]
     }
    ],
    "summary": "Retrieve a warehouse",
    "tags": [
     "Warehouses"
    ]
   },
   "patch": {
    "description": "Omitted fields are left unchanged, and a null is ignored rather than clearing the field. Changing `code` also moves the site's location path.",
    "operationId": "update_warehouse",
    "parameters": [
     {
      "description": "The warehouse's `id`.",
      "in": "path",
      "name": "warehouse_id",
      "required": true,
      "schema": {
       "description": "The warehouse's `id`.",
       "exclusiveMinimum": 0,
       "title": "Warehouse Id",
       "type": "integer"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WarehouseUpdateRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ItemResponse_PublicWarehouse_"
        }
       }
      },
      "description": "Successful Response"
     },
     "400": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_REQUEST",
          "message": "The request could not be understood.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Invalid request"
     },
     "401": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INVALID_API_KEY",
          "message": "The API key is missing, malformed or revoked.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Missing or invalid API key"
     },
     "403": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INSUFFICIENT_SCOPE",
          "message": "This key does not carry the required scope.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Not entitled, missing scope, or read-only data"
     },
     "404": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "NOT_FOUND",
          "message": "No such resource in this account.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "No such resource in this account"
     },
     "409": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "CONFLICT",
          "message": "The request conflicts with the current state.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Conflicts with current state: a duplicate, a state that forbids the change, or a record still in use"
     },
     "422": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "UNPROCESSABLE",
          "message": "The request was understood but cannot be applied.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Reserved. Validation failures are reported as 400."
     },
     "429": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "RATE_LIMITED",
          "message": "Rate limit exceeded.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Rate limit exceeded"
     },
     "500": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "INTERNAL_ERROR",
          "message": "Internal server error",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Internal error. Quote request_id in a support ticket."
     },
     "503": {
      "content": {
       "application/json": {
        "example": {
         "error": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "The service is busy. Retry shortly.",
          "request_id": "req_01HXY7Z8Q0000000000000000"
         }
        },
        "schema": {
         "$ref": "#/components/schemas/PublicError"
        }
       }
      },
      "description": "Temporarily unavailable. Retry after the Retry-After seconds."
     }
    },
    "security": [
     {
      "ApiKey": [
       "inventory:write"
      ]
     }
    ],
    "summary": "Update a warehouse",
    "tags": [
     "Warehouses"
    ]
   }
  }
 },
 "servers": [
  {
   "url": "https://public-api.nutrasoft.ca/v1"
  }
 ],
 "webhooks": {
  "allergen.created": {
   "post": {
    "description": "An allergen is created.",
    "operationId": "allergen_createdallergen_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "allergen.created"
   }
  },
  "allergen.deleted": {
   "post": {
    "description": "An allergen is deleted.",
    "operationId": "allergen_deletedallergen_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "allergen.deleted"
   }
  },
  "allergen.updated": {
   "post": {
    "description": "An allergen changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "allergen_updatedallergen_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "allergen.updated"
   }
  },
  "bill.cancelled": {
   "post": {
    "description": "A bill is cancelled.",
    "operationId": "bill_cancelledbill_cancelled_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "bill.cancelled"
   }
  },
  "bill.created": {
   "post": {
    "description": "A bill is created.",
    "operationId": "bill_createdbill_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "bill.created"
   }
  },
  "bill.deleted": {
   "post": {
    "description": "A bill is deleted.",
    "operationId": "bill_deletedbill_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "bill.deleted"
   }
  },
  "bill.updated": {
   "post": {
    "description": "A bill, or one of its lines, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "bill_updatedbill_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "bill.updated"
   }
  },
  "customer.created": {
   "post": {
    "description": "A customer is created.",
    "operationId": "customer_createdcustomer_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "customer.created"
   }
  },
  "customer.deleted": {
   "post": {
    "description": "A customer is deleted.",
    "operationId": "customer_deletedcustomer_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "customer.deleted"
   }
  },
  "customer.updated": {
   "post": {
    "description": "A customer, or one of its shipping addresses, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "customer_updatedcustomer_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "customer.updated"
   }
  },
  "equipment.created": {
   "post": {
    "description": "A piece of equipment is created.",
    "operationId": "equipment_createdequipment_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "equipment.created"
   }
  },
  "equipment.deleted": {
   "post": {
    "description": "A piece of equipment is deleted.",
    "operationId": "equipment_deletedequipment_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "equipment.deleted"
   }
  },
  "equipment.updated": {
   "post": {
    "description": "A piece of equipment changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "equipment_updatedequipment_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "equipment.updated"
   }
  },
  "food.created": {
   "post": {
    "description": "A food is created.",
    "operationId": "food_createdfood_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "food.created"
   }
  },
  "food.deleted": {
   "post": {
    "description": "A food is deleted.",
    "operationId": "food_deletedfood_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "food.deleted"
   }
  },
  "food.updated": {
   "post": {
    "description": "A food changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "food_updatedfood_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "food.updated"
   }
  },
  "invoice.cancelled": {
   "post": {
    "description": "An invoice is cancelled.",
    "operationId": "invoice_cancelledinvoice_cancelled_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "invoice.cancelled"
   }
  },
  "invoice.created": {
   "post": {
    "description": "An invoice is created, including by shipping an order.",
    "operationId": "invoice_createdinvoice_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "invoice.created"
   }
  },
  "invoice.deleted": {
   "post": {
    "description": "An invoice is deleted.",
    "operationId": "invoice_deletedinvoice_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "invoice.deleted"
   }
  },
  "invoice.updated": {
   "post": {
    "description": "An invoice, or one of its lines, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "invoice_updatedinvoice_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "invoice.updated"
   }
  },
  "operation.created": {
   "post": {
    "description": "An operation is created.",
    "operationId": "operation_createdoperation_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "operation.created"
   }
  },
  "operation.deleted": {
   "post": {
    "description": "An operation is deleted.",
    "operationId": "operation_deletedoperation_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "operation.deleted"
   }
  },
  "operation.updated": {
   "post": {
    "description": "An operation changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "operation_updatedoperation_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "operation.updated"
   }
  },
  "ping": {
   "post": {
    "description": "Sent by the **Send test** button in NutraSoft, never by a real change. Use it to check your endpoint, signature verification and TLS.",
    "operationId": "pingping_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PingPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "ping"
   }
  },
  "product.created": {
   "post": {
    "description": "A product is created.",
    "operationId": "product_createdproduct_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product.created"
   }
  },
  "product.deleted": {
   "post": {
    "description": "A product is deleted.",
    "operationId": "product_deletedproduct_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product.deleted"
   }
  },
  "product.updated": {
   "post": {
    "description": "A product changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "product_updatedproduct_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product.updated"
   }
  },
  "product_lot.archived": {
   "post": {
    "description": "A lot is archived.",
    "operationId": "product_lot_archivedproduct_lot_archived_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product_lot.archived"
   }
  },
  "product_lot.created": {
   "post": {
    "description": "A lot is created.",
    "operationId": "product_lot_createdproduct_lot_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product_lot.created"
   }
  },
  "product_lot.deleted": {
   "post": {
    "description": "A lot is deleted.",
    "operationId": "product_lot_deletedproduct_lot_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product_lot.deleted"
   }
  },
  "product_lot.updated": {
   "post": {
    "description": "A lot changes, including its quantity. High volume: a single production run can emit hundreds of these, so subscribe deliberately. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "product_lot_updatedproduct_lot_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "product_lot.updated"
   }
  },
  "production.cancelled": {
   "post": {
    "description": "A production run is cancelled.",
    "operationId": "production_cancelledproduction_cancelled_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production.cancelled"
   }
  },
  "production.created": {
   "post": {
    "description": "A production run is created.",
    "operationId": "production_createdproduction_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production.created"
   }
  },
  "production.deleted": {
   "post": {
    "description": "A production run is deleted.",
    "operationId": "production_deletedproduction_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production.deleted"
   }
  },
  "production.status_changed": {
   "post": {
    "description": "A production run moves between statuses.",
    "operationId": "production_status_changedproduction_status_changed_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production.status_changed"
   }
  },
  "production.updated": {
   "post": {
    "description": "A production run, or one of its lines, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "production_updatedproduction_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production.updated"
   }
  },
  "production_line.created": {
   "post": {
    "description": "A production line is created.",
    "operationId": "production_line_createdproduction_line_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production_line.created"
   }
  },
  "production_line.deleted": {
   "post": {
    "description": "A production line is deleted.",
    "operationId": "production_line_deletedproduction_line_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production_line.deleted"
   }
  },
  "production_line.updated": {
   "post": {
    "description": "A production line changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "production_line_updatedproduction_line_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "production_line.updated"
   }
  },
  "purchase_order.cancelled": {
   "post": {
    "description": "A purchase order is cancelled.",
    "operationId": "purchase_order_cancelledpurchase_order_cancelled_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "purchase_order.cancelled"
   }
  },
  "purchase_order.created": {
   "post": {
    "description": "A purchase order is created.",
    "operationId": "purchase_order_createdpurchase_order_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "purchase_order.created"
   }
  },
  "purchase_order.deleted": {
   "post": {
    "description": "A purchase order is deleted.",
    "operationId": "purchase_order_deletedpurchase_order_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "purchase_order.deleted"
   }
  },
  "purchase_order.status_changed": {
   "post": {
    "description": "A purchase order moves between statuses.",
    "operationId": "purchase_order_status_changedpurchase_order_status_changed_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "purchase_order.status_changed"
   }
  },
  "purchase_order.updated": {
   "post": {
    "description": "A purchase order, or one of its lines, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "purchase_order_updatedpurchase_order_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "purchase_order.updated"
   }
  },
  "sales_order.cancelled": {
   "post": {
    "description": "A sales order is cancelled.",
    "operationId": "sales_order_cancelledsales_order_cancelled_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "sales_order.cancelled"
   }
  },
  "sales_order.created": {
   "post": {
    "description": "A sales order is created.",
    "operationId": "sales_order_createdsales_order_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "sales_order.created"
   }
  },
  "sales_order.deleted": {
   "post": {
    "description": "A sales order is deleted.",
    "operationId": "sales_order_deletedsales_order_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "sales_order.deleted"
   }
  },
  "sales_order.status_changed": {
   "post": {
    "description": "A sales order moves between statuses.",
    "operationId": "sales_order_status_changedsales_order_status_changed_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "sales_order.status_changed"
   }
  },
  "sales_order.updated": {
   "post": {
    "description": "A sales order, or one of its lines, changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "sales_order_updatedsales_order_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "sales_order.updated"
   }
  },
  "supplier.created": {
   "post": {
    "description": "A supplier is created.",
    "operationId": "supplier_createdsupplier_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "supplier.created"
   }
  },
  "supplier.deleted": {
   "post": {
    "description": "A supplier is deleted.",
    "operationId": "supplier_deletedsupplier_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "supplier.deleted"
   }
  },
  "supplier.updated": {
   "post": {
    "description": "A supplier changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "supplier_updatedsupplier_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "supplier.updated"
   }
  },
  "tag.created": {
   "post": {
    "description": "A tag is created.",
    "operationId": "tag_createdtag_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "tag.created"
   }
  },
  "tag.deleted": {
   "post": {
    "description": "A tag is deleted.",
    "operationId": "tag_deletedtag_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "tag.deleted"
   }
  },
  "tag.updated": {
   "post": {
    "description": "A tag changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "tag_updatedtag_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "tag.updated"
   }
  },
  "unit_of_measure.created": {
   "post": {
    "description": "A unit of measure is created.",
    "operationId": "unit_of_measure_createdunit_of_measure_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "unit_of_measure.created"
   }
  },
  "unit_of_measure.deleted": {
   "post": {
    "description": "A unit of measure is deleted.",
    "operationId": "unit_of_measure_deletedunit_of_measure_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "unit_of_measure.deleted"
   }
  },
  "unit_of_measure.updated": {
   "post": {
    "description": "A unit of measure changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "unit_of_measure_updatedunit_of_measure_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "unit_of_measure.updated"
   }
  },
  "warehouse.created": {
   "post": {
    "description": "A warehouse is created.",
    "operationId": "warehouse_createdwarehouse_created_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "warehouse.created"
   }
  },
  "warehouse.deleted": {
   "post": {
    "description": "A warehouse is deleted.",
    "operationId": "warehouse_deletedwarehouse_deleted_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "warehouse.deleted"
   }
  },
  "warehouse.updated": {
   "post": {
    "description": "A warehouse changes. Also fires when one of the record's own lines changes, carrying the parent's id.",
    "operationId": "warehouse_updatedwarehouse_updated_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookEventPayload"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "warehouse.updated"
   }
  }
 }
}
