{
  "openapi": "3.0.1",
  "info": {
    "title": "Specification API — Public v2 (Preview)",
    "description": "Operations that are not in the API reference yet. Each one carries a badge:\n\n- **Limited**: in production and available by agreement; contact Trace One to use it. It may still change.\n- **Designed**: planned; it may change before release.\n\nAn operation moves to the Specification API reference once it is validated for customers.",
    "version": "2.0-preview",
    "x-metadata": {
      "group": "PLM"
    }
  },
  "x-tagGroups": [
    {
      "name": "Specifications",
      "tags": [
        "specifications",
        "food-specifications",
        "food-specification-chapters",
        "food-specification-questionnaires",
        "food-specification-requirements",
        "packaging-specifications",
        "packaging-specification-chapters",
        "folders",
        "specification-templates"
      ]
    },
    {
      "name": "Library",
      "tags": [
        "library-food-chapters",
        "library-testing-chapters",
        "library-materials",
        "library-packaging-components",
        "library-packaging-systems",
        "questionnaire-templates",
        "questionnaires"
      ]
    }
  ],
  "security": [
    {
      "oauth2": [
        "t1_api"
      ]
    }
  ],
  "tags": [
    {
      "name": "specifications",
      "description": "Search specifications across all template types"
    },
    {
      "name": "food-specifications",
      "description": "Food specification — create, read, contacts, share, folder move, versions, modification requests, history"
    },
    {
      "name": "food-specification-chapters",
      "description": "Food specification chapters — read, create or replace, link library chapters, custom chapters"
    },
    {
      "name": "food-specification-questionnaires",
      "description": "Questionnaires linked to a food specification — read questions and answers, link"
    },
    {
      "name": "food-specification-requirements",
      "description": "Requirements linked to a food specification"
    },
    {
      "name": "packaging-specifications",
      "description": "Packaging specification — create, read, modification requests, history"
    },
    {
      "name": "packaging-specification-chapters",
      "description": "Packaging specification chapters — general, attestation, testing, packaging system"
    },
    {
      "name": "library-testing-chapters",
      "description": "Library testing chapters — one chapter object for every template type (food, packaging), the template type in the path; created, updated and shared at their own address"
    },
    {
      "name": "folders",
      "description": "Folders — create, share (the share includes the folder's specifications)"
    },
    {
      "name": "specification-templates",
      "description": "Specification template structure and custom-fields schemas (design-time)"
    },
    {
      "name": "library-food-chapters",
      "description": "Library food chapters (production, finished product) — created, updated and shared at their own address"
    },
    {
      "name": "library-materials",
      "description": "Library materials (six material types) — create (published), share"
    },
    {
      "name": "library-packaging-components",
      "description": "Library packaging components — one physical part (a bottle, a cap, a label) with its material, dimensions and characteristics; create, replace, read"
    },
    {
      "name": "library-packaging-systems",
      "description": "Library packaging systems — an assembly of components, what a packaging specification links to; create, replace, share, new version, read. Import order - components, then the system, then the specification link"
    },
    {
      "name": "questionnaire-templates",
      "description": "Questionnaire templates — questions and answers schema (design-time)"
    },
    {
      "name": "questionnaires",
      "description": "Questionnaire instances — create, read, write answers"
    }
  ],
  "paths": {
    "/v2/specifications/search": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "specifications"
        ],
        "operationId": "Specifications_Search",
        "summary": "Search specifications",
        "description": "Searches specifications across template types with filters and sorting.\nReturns a paginated list of specification summaries (chapter-agnostic).\nUse the template-specific endpoints to fetch chapter content.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpecificationSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a paginated list of specifications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpecificationSearchResult"
                }
              }
            }
          },
          "400": {
            "description": "The search criteria are invalid"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_Create",
        "summary": "Create food specification",
        "description": "Creates a specification in one call: identity, folder placement, its\ncomposition chapters (general/labelling — no identity outside the\nspec) inline, and REFERENCES to its library chapters. **Atomic** —\neverything this call creates exists after it, or nothing does (any\nfailure returns 422 and no resource is created).\n\nLibrary-chapter slots (`productionChapter`, `testingChapter`,\n`finishedProductChapter`) take a `{ \"chapterId\": ... }` reference to\na chapter created beforehand at its own address\n(`POST /v2/public/library/food/{type}-chapters` — born published).\nThe referenced chapter must be a **published, active version** owned\nby your company — anything else is a 422.\n\n`requirements` are likewise REFERENCES to pre-created objects (ids\nonly).\n\n**Questionnaires are automatic**, not part of this payload: at\ncreation the server instantiates one questionnaire per published\nquestionnaire template matching the specification (template type +\nthe trade item's brand and categories) and attaches it to its\nchapter. Referencing pre-created questionnaire instances is not\naccepted: the member is refused (400), never dropped.\n\nLate additions: general/labelling chapters omitted here arrive via\ntheir spec-scoped `PUT` (upsert). Library chapters are attached or\nswapped later via the `.../link` endpoints. The created\nspecification is private until it is shared: `POST .../share`, or\nthe share of the folder it is placed in, hands it over.\n\n**Scope: product specifications only.** The specification type is\nserver-fixed (ProductSpecification) — assortment specifications\n(which carry N production chapters) are out of scope. Packaging\nspecifications have their own create\n(`POST /v2/public/packaging/specifications`).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodSpecificationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The specification and all its chapters were created. It is private until `POST .../share`, or the share of its folder, hands it over to the supplier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodSpecificationCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "The document was rejected as a whole — nothing was created. Causes:\nfield validation failure in the general/labelling chapters (incl.\ncustomFields vs template schema); a referenced library chapter that\nis unknown, not a published active version, or not owned by your\ncompany; an unknown requirement id, or the\nsame requirement under two different chapter types.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_GetById",
        "summary": "Get food specification",
        "description": "Returns specification identity, status, and chapter references.\n`include` adds content in the same response\n(FoodSpecificationWithChapters): `chapters` for every chapter, or a\nlist of the chapters and sub-resources wanted, e.g.\n`include=general,labelling` or `include=chapters,questionnaires`.\nWithout `include`, no content is returned. A property is present only\nwhen its value is included; a chapter the specification does not\nhave reads null.\n\nThe full document carries no ETags. A chapter write (If-Match) uses\nthe ETag of that chapter's own GET, which stays the address for\nreading one chapter. Content is composed by the same read mappers as\nthe chapter GETs, so both answer the same.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "description": "Comma-separated. `chapters` = general, labelling, production,\ntesting, finishedProduct and customChapters. An unknown value is\na 400.\n",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "chapters",
                  "general",
                  "labelling",
                  "production",
                  "testing",
                  "finishedProduct",
                  "customChapters",
                  "questionnaires",
                  "requirements"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the food specification, with the content `include` asked for",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodSpecificationWithChapters"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/collection": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_Collection",
        "summary": "Get food specifications by IDs",
        "description": "Returns multiple food specifications (identity + chapter refs) in\na single call. Maximum 50 IDs per request. All or nothing: one\nunknown id, or an id that is not a food specification, answers 404;\none specification you cannot read answers 403.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpecificationCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the requested food specifications",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FoodSpecification"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request parameters are invalid"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions on at least one requested specification"
          },
          "404": {
            "description": "At least one requested id is not a known food specification"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/versions": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_Versions",
        "summary": "Get food specification versions",
        "description": "Returns all versions of the same logical specification.\nGiven any version's ID, the server resolves the version chain and\nreturns all sibling versions sorted by version number descending.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns all versions of the specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpecificationVersion"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/general-chapter": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_GeneralChapter",
        "summary": "Get general chapter",
        "description": "Returns typed general information: version info, product identity\n(derived from the trade item), retailer and supplier companies and\ncontacts, custom fields, and references to the chapter's\nrequirements, documents and questionnaires.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the general chapter",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodGeneralChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_PutGeneralChapter",
        "summary": "Replace general chapter",
        "description": "Writes the writable part of the general chapter\n(FoodGeneralChapterWrite). A section that is null or absent keeps\nwhat it holds; a party's additionalContacts, when sent, replaces that\nparty's list in full. The general chapter belongs to this\nspecification only (never a library chapter).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodGeneralChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was written. Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the specification changed since the chapter was read"
          },
          "422": {
            "description": "Field validation failed (incl. customFields vs template schema; fields owned by the counterpart company in the payload; data for a section the template disables) — or the resource's state refuses the write, the chapter is locked (specification signature in progress) (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/production-chapter": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_ProductionChapter",
        "summary": "Get production chapter",
        "description": "Returns the production chapters linked to the specification, one entry\nper linked library chapter, each with its sites, recipe, nutrition\ntable and allergens, plus the specification's requirements and\ndocuments for the production chapter type. Read-only projection: the\nchapter content is written at the chapter's own address\n(PUT /library/food/production-chapters/{chapterId}).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the production chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodProductionChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/labelling-chapter": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_LabellingChapter",
        "summary": "Get labelling chapter",
        "description": "Returns the labelling chapter: product information, business name and\naddress, ingredient declaration and nutritional information (one entry\nper linked production chapter), Nutri-Score, claims, additional\nmarketing information, consumer instructions, sorting instructions,\nGMO risk analysis, custom fields, and the chapter's requirements and\ndocuments as references.\n\nThe response carries the labelling inputs, which\nFoodSpecifications_PutLabellingChapter writes, and the content the\nplatform derives (marked readOnly). Derived content comes from the\ntrade item, the production chapters, the finished-product chapter, the\nlabelling-information and claim libraries and the questionnaire\nanswers, and is written there. A section the specification's template\ndisables is null.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the labelling chapter",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodLabellingChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_PutLabellingChapter",
        "summary": "Create or replace labelling chapter",
        "description": "Full chapter replace (upsert). The labelling chapter belongs to this\nspecification only (never a library chapter).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodLabellingChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced. Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the specification changed since the chapter was read"
          },
          "422": {
            "description": "Field validation failed (incl. customFields vs template schema; fields owned by the counterpart company in the payload; data for a section the template disables) — or the resource's state refuses the write, the chapter is locked (specification signature in progress) (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/testing-chapter": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_TestingChapter",
        "summary": "Get testing chapter",
        "description": "Returns the testing chapter with characteristics and control plans.\nThe testing chapter is a library chapter linked to this specification;\nthis endpoint is its read-only projection in document context.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the testing chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodTestingChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/finished-product-chapter": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_FinishedProductChapter",
        "summary": "Get finished product chapter",
        "description": "Returns the finished product chapter content including product photos,\nshelf life, storage conditions, preservation methods, and traceability.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the finished product chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodFinishedProductChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/contacts": {
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_PutContacts",
        "summary": "Replace specification contacts",
        "description": "Full replace of YOUR company's contacts on the specification (works on\npublished specifications): the retailer's contacts when you are the\nretailer, the supplier's when you are the supplier. Contacts are plain\nuser references addressed by userId; users are discoverable through\nthe CUMD public API. Each contact carries its signatory flag\n(isSignatory), as in the UI; signature history is not writable.\n\nOnly your company's direct contacts are replaced. Left untouched:\nthe other party's contacts, contacts that come from a collaboration\n(supplier invitations, pending or accepted), and translator contacts.\nThe specification owner stays a contact whether or not it is sent.\n\nThe response lists exactly that scope, so sending it back unchanged\nis a no-op (200, nothing written). The full contact list of both\nparties is on the specification read.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactListWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your company's direct contacts on the specification, as stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListWrite"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "A contact userId is unknown or not a user of your company (paramName contacts), or the owner contact's isSignatory differs from the stored flag (paramName contacts[i].isSignatory) — or the specification's state refuses the change (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/custom-chapters/{chapterType}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_CustomChapter",
        "summary": "Get custom chapter",
        "description": "Returns a retailer-defined custom chapter of this specification.\nThe chapterType is the retailer-defined type code, communicated\nwith the template at onboarding.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/CustomChapterType"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the custom chapter",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The specification was not found, or the template defines no such custom chapter"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_PutCustomChapter",
        "summary": "Create or replace custom chapter",
        "description": "Writes the custom chapter's content, which is custom fields only\n(CustomFields rules: an entry replaces its component's values; a\ncomponent the payload does not carry keeps what it holds). Custom\nchapters belong to this specification only (never library chapters).\nEither party may write them.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/CustomChapterType"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced. Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The specification was not found, or the template defines no such custom chapter"
          },
          "412": {
            "description": "If-Match precondition failed — the specification changed since the chapter was read"
          },
          "422": {
            "description": "Field validation failed (customFields vs template schema) — or the resource's state refuses the write, the chapter is locked (specification signature in progress) (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_Share",
        "summary": "Share specification with the counterpart company",
        "description": "Explicit business action: hands the document to the counterpart\ncompany and opens the collaboration phase. Chapter share/publish\nmechanics run internally. Idempotent: sharing an already shared\nspecification changes nothing and answers 204, so a retried call\nis always safe.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "204": {
            "description": "The specification is shared with the counterpart company (already shared included)"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/production-chapter/link": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_LinkProductionChapter",
        "summary": "Link production chapter",
        "description": "Attaches an existing library production chapter to this specification\n(replaces the currently linked one, if any). Content updates happen at\nthe chapter's own address (PUT /library/food/production-chapters/{id}).\nAlso the way a specification ADOPTS a new version of its chapter —\nnew versions never propagate automatically.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "The chapter is unknown, not a published active version, or not owned by your company — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/testing-chapter/link": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_LinkTestingChapter",
        "summary": "Link testing chapter",
        "description": "Attaches an existing library testing chapter to this specification\n(replaces the currently linked one, if any). Also the way a\nspecification ADOPTS a new version of its chapter — new versions\nnever propagate automatically.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "The chapter is unknown, not a published active version, or not owned by your company — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/finished-product-chapter/link": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_LinkFinishedProductChapter",
        "summary": "Link finished product chapter",
        "description": "Attaches an existing library finished product chapter to this\nspecification (replaces the currently linked one, if any). Also the\nway a specification ADOPTS a new version of its chapter — new\nversions never propagate automatically.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "The chapter is unknown, not a published active version, or not owned by your company — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/folder": {
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_MoveToFolder",
        "summary": "Move specification to a folder",
        "description": "Moves the specification to another folder after creation. Placement\nAT creation rides in the create payload (folderId) — this endpoint\nexists only for reorganisation. The target folder must be in\npreparation (not yet shared) and of the same template family.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderAssignment"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The specification was moved"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The specification was not found"
          },
          "422": {
            "description": "Validation failed, naming `folderId` (e.g. unknown folder, folder of another template family, or a folder already shared — its specification set is sealed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/folders": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "folders"
        ],
        "operationId": "Folders_Create",
        "summary": "Create folder",
        "description": "Creates a folder in preparation, private until it is shared. Folders\nare flat (no\nhierarchy) and hold food-family specifications only.\nSpecifications are placed in it via the create payload's folderId or\nthe move endpoint while it is in preparation; sharing the folder\n(`POST .../share`) starts it and hands it over — after that its\nspecification set is sealed.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The folder was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Validation failed (e.g. unknown templateId, packaging template, target date in the past)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/folders/{folderId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "folders"
        ],
        "operationId": "Folders_Share",
        "summary": "Share folder and its specifications",
        "description": "Hands the folder over. No payload: the folder is started (its\npreparation ends) and shared with its owner company, and every\nspecification it holds is shared with its own owner company and\nsupplier — which is what opens the collaboration. After the handover\nthe folder's specification set is sealed: specifications can no longer\nbe added to or moved into it. Idempotent: a folder already in progress\nreturns 204, and re-sharing its specifications changes nothing.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/FolderId"
          }
        ],
        "responses": {
          "204": {
            "description": "The folder and its specifications were shared (or already were)"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The folder was not found"
          },
          "422": {
            "description": "The folder cannot be started or shared in its current state (e.g. completed, or its target date has passed since creation) — errorCode INVALID_RESOURCE_STATE, no paramName",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/production-chapters": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_CreateProduction",
        "summary": "Create library production chapter",
        "description": "Creates a production chapter owned by the calling company, born as a\nPUBLISHED active version (drafts stay internal). This is where library\nchapters come to exist — specification creates reference them\n({ chapterId } slots) and link endpoints attach them later.\nEither party may own library chapters (chapters.create permission,\nprovisioned at onboarding). Visible to nobody until shared\n(POST .../{chapterId}/share).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodProductionChapterCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The chapter was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryChapterCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/production-chapters/{chapterId}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_GetProduction",
        "summary": "Get library production chapter",
        "description": "Reads the chapter at its own address — the owner never needs to know\nwhich specifications link it. The response carries every section the\nPUT writes, under the same names, plus server-derived values marked\nreadOnly. Returns the ETag used by If-Match on the PUT\n(read-modify-write: PUT is a full replace).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the production chapter (active version)",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryFoodProductionChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The chapter was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_PutProduction",
        "summary": "Replace library production chapter",
        "description": "Full replace of the chapter's active published version, IN PLACE —\nno new version is created. Every linked specification reads this same\nversion, so all of them see the update immediately. The caller must\nbe the chapter's owner company. When the chapter is locked (a linked\nspecification entered signature) content can no longer change in\nplace — the write returns 422 `INVALID_RESOURCE_STATE` with no\n`paramName`, since nothing in the payload is at fault; adopting a NEW\nversion created in the product is per-spec, via the .../link\nendpoints.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodProductionChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced in place (active version). Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the chapter changed since it was read"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields) — or the resource's state refuses the write, the chapter is locked (a linked specification is in signature) — content can no longer change in place (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/production-chapters/{chapterId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_ShareProduction",
        "summary": "Share production chapter (library)",
        "description": "Grants access to this production chapter.\n\nAlways grants access to the company that owns the chapter, taken from the\nchapter itself, never from the caller. A library chapter created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryChapterShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found (incl. a library chapter of another type)"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/{templateType}/testing-chapters": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-testing-chapters"
        ],
        "operationId": "LibraryChapters_CreateTesting",
        "summary": "Create library testing chapter",
        "description": "Creates a standalone testing chapter owned by the calling company,\nborn as a PUBLISHED active version (drafts stay internal). Visible to\nnobody until shared (POST .../{chapterId}/share).\n\nOne testing chapter object for every template type (same content,\ndecision D-09). The template type in the path is the family of\nspecifications that can link the chapter: a packaging specification\nlinks only a packaging chapter, a food specification only a food one.\nA new template type is a new value of `templateType`, not a new route.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateType"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodTestingChapterWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The chapter was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryChapterCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The template type was not found (a value outside the list)"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/{templateType}/testing-chapters/{chapterId}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "library-testing-chapters"
        ],
        "operationId": "LibraryChapters_GetTesting",
        "summary": "Get library testing chapter",
        "description": "Reads the chapter at its own address — the owner never needs to know\nwhich specifications link it. Same content as the spec-scoped\nprojection (same read mapper). Returns the ETag used by If-Match\non the PUT (read-modify-write: PUT is a full replace).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateType"
          },
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the testing chapter (active version)",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodTestingChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The chapter was not found (incl. a chapter of another template type than the path)"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "library-testing-chapters"
        ],
        "operationId": "LibraryChapters_PutTesting",
        "summary": "Replace library testing chapter",
        "description": "Full replace of the chapter's active published version, IN PLACE —\nno new version is created. Every linked specification reads this same\nversion, so all of them see the update immediately. The caller must\nbe the chapter's owner company. When the chapter is locked (a linked\nspecification entered signature) content can no longer change in\nplace — the write returns 422 `INVALID_RESOURCE_STATE` with no\n`paramName`, since nothing in the payload is at fault; adopting a NEW\nversion created in the product is per-spec, via the .../link\nendpoints.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateType"
          },
          {
            "$ref": "#/components/parameters/ChapterId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodTestingChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced in place (active version). Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found (incl. a chapter of another template type than the path)"
          },
          "412": {
            "description": "If-Match precondition failed — the chapter changed since it was read"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields) — or the resource's state refuses the write, the chapter is locked (a linked specification is in signature) — content can no longer change in place (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/{templateType}/testing-chapters/{chapterId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-testing-chapters"
        ],
        "operationId": "LibraryChapters_ShareTesting",
        "summary": "Share testing chapter (library)",
        "description": "Grants access to this testing chapter.\n\nAlways grants access to the company that owns the chapter, taken from the\nchapter itself, never from the caller. A library chapter created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateType"
          },
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryChapterShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found (incl. a library chapter of another type, or of another template type than the path)"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/finished-product-chapters": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_CreateFinishedProduct",
        "summary": "Create library finished product chapter",
        "description": "Creates a standalone finished product chapter owned by the calling\ncompany, born as a PUBLISHED active version (drafts stay internal).\nVisible to nobody until shared (POST .../{chapterId}/share).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodFinishedProductChapterWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The chapter was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryChapterCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/finished-product-chapters/{chapterId}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_GetFinishedProduct",
        "summary": "Get library finished product chapter",
        "description": "Reads the chapter at its own address — the owner never needs to know\nwhich specifications link it. Same content as the spec-scoped\nprojection (same read mapper). Returns the ETag used by If-Match\non the PUT (read-modify-write: PUT is a full replace).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the finished product chapter (active version)",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoodFinishedProductChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The chapter was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_PutFinishedProduct",
        "summary": "Replace library finished product chapter",
        "description": "Full replace of the chapter's active published version, IN PLACE —\nno new version is created. Every linked specification reads this same\nversion, so all of them see the update immediately. The caller must\nbe the chapter's owner company. When the chapter is locked (a linked\nspecification entered signature) content can no longer change in\nplace — the write returns 422 `INVALID_RESOURCE_STATE` with no\n`paramName`, since nothing in the payload is at fault; adopting a NEW\nversion created in the product is per-spec, via the .../link\nendpoints.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoodFinishedProductChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced in place (active version). Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the chapter changed since it was read"
          },
          "422": {
            "description": "Field validation failed (incl. name already used by another library chapter of the owner company, errorCode NAME_ALREADY_USED; library chapters carry no customFields) — or the resource's state refuses the write, the chapter is locked (a linked specification is in signature) — content can no longer change in place (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/food/finished-product-chapters/{chapterId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-food-chapters"
        ],
        "operationId": "LibraryFoodChapters_ShareFinishedProduct",
        "summary": "Share finished product chapter (library)",
        "description": "Grants access to this finished product chapter.\n\nAlways grants access to the company that owns the chapter, taken from the\nchapter itself, never from the caller. A library chapter created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChapterId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryChapterShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not the chapter's owner company"
          },
          "404": {
            "description": "The chapter was not found (incl. a library chapter of another type)"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/raw-materials": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateRawMaterial",
        "summary": "Create library raw material",
        "description": "Creates a raw material owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name and\ncommercialName).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RawMaterialCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The raw material was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/raw-materials/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareRawMaterial",
        "summary": "Share raw material",
        "description": "Grants access to this raw material.\n\nAlways grants access to the company that owns the raw material, taken from the\nraw material itself, never from the caller. A raw material created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The raw material was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The raw material was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/additives": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateAdditive",
        "summary": "Create library additive",
        "description": "Creates a additive owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name only).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdditiveCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The additive was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/additives/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareAdditive",
        "summary": "Share additive",
        "description": "Grants access to this additive.\n\nAlways grants access to the company that owns the additive, taken from the\nadditive itself, never from the caller. An additive created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The additive was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The additive was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/processing-aids": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateProcessingAid",
        "summary": "Create library processing aid",
        "description": "Creates a processing aid owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name only).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessingAidCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The processing aid was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/processing-aids/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareProcessingAid",
        "summary": "Share processing aid",
        "description": "Grants access to this processing aid.\n\nAlways grants access to the company that owns the processing aid, taken from the\nprocessing aid itself, never from the caller. A processing aid created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The processing aid was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The processing aid was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/flavors": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateFlavor",
        "summary": "Create library flavor",
        "description": "Creates a flavor owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name,\ncommercialName and flavorType).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlavorCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The flavor was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/flavors/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareFlavor",
        "summary": "Share flavor",
        "description": "Grants access to this flavor.\n\nAlways grants access to the company that owns the flavor, taken from the\nflavor itself, never from the caller. A flavor created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The flavor was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The flavor was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/bought-composites": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateBoughtComposite",
        "summary": "Create library bought composite",
        "description": "Creates a bought composite owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name and\ncommercialName).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoughtCompositeCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The bought composite was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/bought-composites/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareBoughtComposite",
        "summary": "Share bought composite",
        "description": "Grants access to this bought composite.\n\nAlways grants access to the company that owns the bought composite, taken from the\nbought composite itself, never from the caller. A bought composite created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The bought composite was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The bought composite was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/made-composites": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_CreateMadeComposite",
        "summary": "Create library made composite",
        "description": "Creates a made composite owned by the calling company, born as a\npublished library item — immediately referenceable from recipes\nand composites. Minimal payloads are accepted (name and\ncommercialName).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MadeCompositeCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The made composite was created and published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "Field validation failure (incl. a duplicate name for the owning company - errorCode NAME_ALREADY_USED, or an unknown referenced id). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/materials/made-composites/{materialId}/share": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-materials"
        ],
        "operationId": "LibraryMaterials_ShareMadeComposite",
        "summary": "Share made composite",
        "description": "Grants access to this made composite.\n\nAlways grants access to the company that owns the made composite, taken from the\nmade composite itself, never from the caller. A made composite created through this\nAPI is visible to nobody until it is shared, so this is how its owner\nfirst sees it.\n\nList companyIds to grant access to other companies as well, typically\na retailer. No body and an empty list both grant the owner only.\n\nIdempotent: a company that already has access is left as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/MaterialId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaterialShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The made composite was shared"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The made composite was not found"
          },
          "422": {
            "description": "Field validation failure (incl. an unknown companyId). The response names the field at fault.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-components": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-components"
        ],
        "operationId": "LibraryPackagingComponents_Create",
        "summary": "Create a packaging component",
        "description": "Creates a packaging component owned by your company, born published and in progress\n(status inProgress): it can be referenced by a packaging system right away. Atomic: a\nrefused value rejects the whole component and nothing is created.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingComponentWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The component was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingComponentCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "A value is refused (paramName names it), e.g. an unknown reference-list item or substance, a name already used by another component of your company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-components/{packagingComponentId}": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "library-packaging-components"
        ],
        "operationId": "LibraryPackagingComponents_GetById",
        "summary": "Get a packaging component",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingComponentId"
          }
        ],
        "responses": {
          "200": {
            "description": "The packaging component",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingComponent"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging component was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-components"
        ],
        "operationId": "LibraryPackagingComponents_Put",
        "summary": "Replace a packaging component",
        "description": "Full replace of the component's active version: what you send is what the component\nholds afterwards (a member that is null or absent is cleared). Owner company only.\nEvery packaging system that references the component sees the change.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingComponentId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingComponentWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The component was replaced. Read it back from the GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The component is visible to you but owned by another company"
          },
          "404": {
            "description": "The packaging component was not found"
          },
          "422": {
            "description": "A value is refused (paramName names it) - or the component is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-components/collection": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-packaging-components"
        ],
        "operationId": "LibraryPackagingComponents_Collection",
        "summary": "Get packaging components by ids",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The packaging components",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PackagingComponent"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "One of the packaging components was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-systems": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_Create",
        "summary": "Create a packaging system",
        "description": "Creates a packaging system owned by your company from existing, published packaging\ncomponents, born published as version 1, active: a packaging specification can link it\nright away. Atomic: nothing is created when a value is refused.\n\nThe component fields keep the names the Packaging application uses (componentId,\ncomponentRecyclabilityId).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingSystemWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The system was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSystemCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "A value is refused (paramName names it): a name already used by another packaging\nsystem of your company, a component that is unknown, not visible to you or still a\ndraft, a quantity below 1, a link to a component that is not part of the system, a\ncomponent linked to two main components, two main components linked together.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-systems/{packagingSystemId}": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_GetById",
        "summary": "Get a packaging system",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingSystemId"
          }
        ],
        "responses": {
          "200": {
            "description": "The packaging system",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSystem"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging system was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_Put",
        "summary": "Replace a packaging system",
        "description": "Full replace of the system's active version: name and components (quantities, main\ncomponent, recyclability, links). Owner company only. Every packaging specification that\nlinks the system sees the change. A system locked by a specification in signature is\nrefused; it changes through a new version (LibraryPackagingSystems_NewVersion).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingSystemId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingSystemWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The system was replaced. Read it back from the GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The system is visible to you but owned by another company"
          },
          "404": {
            "description": "The packaging system was not found"
          },
          "422": {
            "description": "A value is refused (paramName names it, same rules as the create) - or the system is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-systems/{packagingSystemId}/share": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_Share",
        "summary": "Share a packaging system",
        "description": "Shares the system with the companies listed, together with its components. Additive:\ncompanies it is already shared with stay. Sharing with a company it is already shared\nwith changes nothing (204). Owner company only.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingSystemId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The system is shared with the companies listed"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The system is visible to you but owned by another company"
          },
          "404": {
            "description": "The packaging system was not found"
          },
          "422": {
            "description": "A company id is unknown (paramName companyIds)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-systems/{packagingSystemId}/new-version": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_NewVersion",
        "summary": "Create a new version of a packaging system",
        "description": "Not implemented yet. Creates the next version of a locked system, born published and\nactive, with the content of the previous version. Specifications that link the previous\nversion keep it; a specification adopts the new version by linking it again.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PackagingSystemId"
          }
        ],
        "responses": {
          "201": {
            "description": "The new version was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSystemVersionCreated"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The system is visible to you but owned by another company"
          },
          "404": {
            "description": "The packaging system was not found"
          },
          "422": {
            "description": "The system is not locked, or it is not its last version (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/library/packaging-systems/collection": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "library-packaging-systems"
        ],
        "operationId": "LibraryPackagingSystems_Collection",
        "summary": "Get packaging systems by ids",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The packaging systems",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PackagingSystem"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "One of the packaging systems was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/templates/{templateId}/chapters/{chapterType}/custom-fields-schema": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "specification-templates"
        ],
        "operationId": "Templates_CustomFieldsSchema",
        "summary": "Get custom-fields schema for a chapter type",
        "description": "Returns the custom components the template places in one chapter\ntype, each with its JSON Schema. Fetched once at design/integration\ntime: the customFields entries of chapter writes are keyed by these\ncomponentIds and their values validated against these schemas. A\npublished component and a published template never change, so the\nanswer for a template never changes either. Only non-library\nchapters can carry custom fields: library chapters — production,\ntesting, finished product — cannot be customized, hence the\nrestricted chapterType values.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateId"
          },
          {
            "name": "chapterType",
            "in": "path",
            "required": true,
            "description": "`general`, `labelling`, `attestation` (packaging), or a\nretailer-defined custom chapter type code — the values of TemplateStructure.chapters[].chapterType.\nLibrary chapter types are a 404 (they cannot carry custom fields).\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of componentName, sectionName and the field titles.\nDefaults to English; a label missing in the requested language\nfalls back to English (en-US).\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template's custom components for this chapter type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldsSchema"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The template or chapter type was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/templates/{templateId}/structure": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "specification-templates"
        ],
        "operationId": "Templates_Structure",
        "summary": "Get template structure (chapters, sections, flags)",
        "description": "Design-time discovery of the retailer template: which chapters exist,\nwhich sections each carries, which sections the retailer disabled\n(absent from reads, rejected on writes), which payload property\ncarries each section, and where custom fields sit. Field-level\nrules (types, mandatory fields) come from the custom-fields schema\nand the chapter write schemas. Fetched once per template at\nintegration time — not per call.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateId"
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of chapter and section names. Defaults to English; a\nname missing in the requested language falls back to English\n(en-US).\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the template structure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateStructure"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The template was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/questionnaire-templates/{questionnaireTemplateId}": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "questionnaire-templates"
        ],
        "operationId": "QuestionnaireTemplates_GetById",
        "summary": "Get questionnaire template (questions)",
        "description": "Design-time view of a published questionnaire template: its\nquestions, their codes, value types, options and dependencies.\nTemplates are created by Professional Services through the\napplication. Fetched once per template at integration time — the\nquestion codes are the keys of the answers document.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/QuestionnaireTemplateId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the questionnaire template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireTemplateView"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The questionnaire template was not found, or is not published"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/questionnaire-templates/{questionnaireTemplateId}/answers-schema": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "questionnaire-templates"
        ],
        "operationId": "QuestionnaireTemplates_AnswersSchema",
        "summary": "Get the answers schema (design time)",
        "description": "Returns the JSON Schema that answer documents for this template\nmust satisfy. This is the design-time contract for the answers\nwrite: fetch it once per template, bake the mapping into the\nintegration, and send answer documents that validate against it.\nOne schema per template — hundreds of templates scale without\nper-template DTOs. A published template never changes, so neither\ndoes its schema.\n\nThe schema is a JSON Schema draft-07 document projected from the\nstored one:\n  * properties are keyed by question code (QuestionnaireQuestion.code:\n    generated names question1, question2, … stable for the published\n    template — map them through questionId or text of the template\n    GET, not by guessing);\n  * a question other questions depend on sits with its dependants in\n    a condition object (condition1, …) whose draft-07 dependencies /\n    oneOf branches carry the dependants per parent answer;\n  * a choice question carries enum of its option codes (items.enum\n    for multi-choice);\n  * the root has additionalProperties false: a key that is not a\n    question or condition code is refused;\n  * the schema declares no required keyword: which questions must be\n    answered for the questionnaire to validate is\n    QuestionnaireQuestion.required (and dependsOn) of the template\n    GET. Mandatory answers are not checked on write;\n  * internal keywords of the stored schema are not exposed.\nThe dialect stays draft-07 (dependencies is a draft-07 keyword); a\nnewer dialect would only ever be offered as an opt-in.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/QuestionnaireTemplateId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the JSON Schema for this template's answers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A JSON Schema document (draft-07)",
                  "example": {
                    "$schema": "http://json-schema.org/draft-07/schema#",
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "question1": {
                        "type": "string",
                        "enum": [
                          "weekly",
                          "monthly"
                        ]
                      },
                      "condition1": {
                        "type": "object",
                        "properties": {
                          "question2": {
                            "type": "boolean"
                          }
                        },
                        "dependencies": {
                          "question2": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "question2": {
                                    "enum": [
                                      true
                                    ]
                                  },
                                  "question3": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "question2": {
                                    "enum": [
                                      false
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The questionnaire template was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/questionnaires": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "questionnaires"
        ],
        "operationId": "Questionnaires_Create",
        "summary": "Create questionnaire instance",
        "description": "Creates a questionnaire instance from a published template. The\ninstance is owned by the template's owner company and is\nINDEPENDENT of any specification until it is linked\n(`POST .../food/specifications/{specificationId}/questionnaires/link`).\nAnswers are written once it is linked.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionnaireInstanceCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The questionnaire instance was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireInstanceCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "The questionnaire template was not found or is not published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/questionnaires/{questionnaireId}": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "questionnaires"
        ],
        "operationId": "Questionnaires_GetById",
        "summary": "Get questionnaire instance (questions & answers)",
        "description": "Reads one questionnaire instance at its own address: its questions\n(stable id, text, description, type, options) and the current\nanswers. Symmetric with `PUT .../answers`. Template-type agnostic —\nalso serves packaging questionnaires, whose ids are exposed by the\npackaging chapter reads. Unanswered questions carry a null answer;\na value is never fabricated.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/QuestionnaireId"
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Language for question texts, descriptions and option labels.\nDefaults to the questionnaire's own language.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the questionnaire with its answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireView"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have access to this questionnaire"
          },
          "404": {
            "description": "The questionnaire instance was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/questionnaires": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specification-questionnaires"
        ],
        "operationId": "FoodSpecifications_GetQuestionnaires",
        "summary": "Get specification questionnaires (questions & answers)",
        "description": "Every questionnaire instance linked to this specification, with its\nchapter placement (general, production, finishedProduct, labelling —\nderived from the questionnaire's template), its questions (stable\nid, text, description, type, options) and the current answers.\n\nRead-only projection — answers are written through\n`PUT .../food/specifications/{specificationId}/questionnaires/{questionnaireId}/answers`.\nUnanswered questions carry a null answer; a value is never\nfabricated. Chapter reads expose these instances as references only.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Language for question texts, descriptions and option labels.\nDefaults to each questionnaire's own language.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the specification's questionnaires with answers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QuestionnaireView"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not a participant of this specification"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/questionnaires/{questionnaireId}/answers": {
      "put": {
        "x-t1-stage": "limited",
        "tags": [
          "food-specification-questionnaires"
        ],
        "operationId": "FoodSpecifications_PutQuestionnaireAnswers",
        "summary": "Write questionnaire answers",
        "description": "Full replace of the answers document of a questionnaire linked to\nthis specification. Questionnaires are attached when the\nspecification is created; list them, with their question codes,\nthrough `GET .../food/specifications/{specificationId}/questionnaires`.\n\nAfter the write, the questionnaires of the same chapter return to\n\"not validated\", and automatic labelling claims are recomputed from\nthe answers: claims the answers produce are added, automatically\nadded claims the answers no longer produce are removed, and claims\nadded by a user are kept.\n\nA locked questionnaire refuses the write.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/QuestionnaireId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionnaireAnswers"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The answers were written"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found, or the questionnaire is not linked to it"
          },
          "422": {
            "description": "The answers were refused (paramName `answers`), or the\nquestionnaire is locked\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/questionnaires/link": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-questionnaires"
        ],
        "operationId": "FoodSpecifications_LinkQuestionnaire",
        "summary": "Link questionnaire to specification",
        "description": "Attaches an existing questionnaire instance to this specification.\nChapter placement is derived server-side from the questionnaire's\ntemplate. Idempotent for an already-linked instance. At creation\ntime, prefer the `questionnaires` reference array of the\nspecification create.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionnaireReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The questionnaire was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The specification was not found"
          },
          "422": {
            "description": "The questionnaire instance was not found, or the specification\nalready carries an instance of the same specification-type\ntemplate.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/requirements": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-requirements"
        ],
        "operationId": "FoodSpecifications_Requirements",
        "summary": "Get linked requirements",
        "description": "Returns the requirements linked to this specification, one entry per\nchapter attachment, with their validation state on this\nspecification.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the requirements linked to the specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpecificationRequirement"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/chapters/{chapterType}/requirements": {
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-requirements"
        ],
        "operationId": "FoodSpecifications_PutChapterRequirements",
        "summary": "Replace a chapter's requirements",
        "description": "Full replace of the requirements attached to one chapter of the\nspecification. Requirements are PRE-CREATED library objects of the\nspecification's owner company, referenced by id. An id the list does\nnot carry is detached; an id it carries that is not attached yet is\nattached; [] detaches them all. Removals are applied before additions,\nso replacing a requirement by its new version works in one call.\n\nOnly a retailer contact of the specification may change its\nrequirements; anyone else is a 403.\n\nRefused with a 422 naming requirementIds: an unknown id; a requirement\nof another company; a requirement that is not its active version; a\nrequirement already attached to another chapter of the specification\n(detach it there first); the same requirement twice; a requirement sent\nfor a chapterType the specification does not have. A locked\nspecification is a 422 INVALID_RESOURCE_STATE with no paramName.\n\nNothing to change is a no-op (204): the list the chapter already\ncarries, also on a locked specification, and [] for a chapterType the\nspecification does not have.\n\nRead the result back on FoodSpecifications_Requirements.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/ChapterType"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterRequirementsWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter's requirements were replaced"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller is not a retailer contact of the specification"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "A requirement is refused (paramName requirementIds) — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/chapters/{chapterType}/documents": {
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specification-chapters"
        ],
        "operationId": "FoodSpecifications_PutChapterDocuments",
        "summary": "Replace a chapter's documents",
        "description": "Full replace of the documents attached to one chapter of the\nspecification. Files are uploaded beforehand through the document\nAPI and referenced by id. An id the list does not carry is detached\n(the file itself stays in the document API); an id it carries that is\nnot attached yet is attached; [] detaches them all.\n\nAnyone who can update the specification may change its documents, on\nthe retailer side or the supplier side.\n\nRefused with a 422 naming fileIds: an unknown file; a file owned by a\ncompany other than the specification's owner or supplier; a file type\nthe chapter does not accept; a file already attached to another\nchapter of the specification (detach it there first); the same file\ntwice; a file sent for a chapterType the specification does not have.\nA locked specification is a 422 INVALID_RESOURCE_STATE with no\nparamName.\n\nNothing to change is a no-op (204): the list the chapter already\ncarries, also on a locked specification, and [] for a chapterType the\nspecification does not have.\n\nRead the result back on the chapter's documents.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/ChapterType"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterDocumentsWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter's documents were replaced"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "422": {
            "description": "A file is refused (paramName fileIds) — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/modification-requests": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_ModificationRequests",
        "summary": "Get modification requests",
        "description": "Returns the modification requests (RFM) on this specification that\nare shared with your company; a draft is visible only to the user\nwho wrote it. Filter by status and chapter type.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by RFM status",
            "schema": {
              "type": "string",
              "enum": [
                "Draft",
                "InProgress",
                "Performed",
                "Declined",
                "Completed",
                "Archived"
              ]
            }
          },
          {
            "name": "chapterType",
            "in": "query",
            "required": false,
            "description": "Filter by template chapter code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of sectionName and fieldName. Defaults to English.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the modification requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModificationRequestPagedList"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/food/specifications/{specificationId}/history": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "food-specifications"
        ],
        "operationId": "FoodSpecifications_History",
        "summary": "Get specification history",
        "description": "Returns the change log of this specification, newest first: field\nand document changes, section validations and requirement\nvalidations.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "fromDateUtc",
            "in": "query",
            "required": false,
            "description": "Only changes made at or after this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDateUtc",
            "in": "query",
            "required": false,
            "description": "Only changes made at or before this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of names and values. Defaults to English.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the specification history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpecificationHistoryPagedList"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The food specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_Create",
        "summary": "Create packaging specification",
        "description": "Creates a packaging specification in one call: identity plus\nREFERENCES to library items created beforehand. **Atomic** —\neverything this call creates exists after it, or nothing does (any\nfailure returns 422 and no resource is created).\n\nDifferences from the food create:\n`name` is required (packaging is the one type whose name is\ncaller-chosen rather than derived from a trade item); there is NO\n`tradeItemId` (packaging specifications carry no trade item), NO\n`folderId` (packaging specifications cannot be placed in folders)\nand NO `requirements` (packaging chapters have no requirement\nsections). Sending any of them is a 400, not a silent drop.\n\nLibrary-chapter slots: `testingChapter` takes a\n`{ \"chapterId\": ... }` reference to a published, active library\nchapter. `packagingSystemChapter` references a packaging system and\nis not accepted yet: the member is refused (400), never dropped.\n\nQuestionnaires are attached AUTOMATICALLY at creation (one\ninstance per matching published template), same as the food\ncreate; explicit `questionnaires` references are refused (400).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingSpecificationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The specification was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSpecificationCreated"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "422": {
            "description": "The document was rejected as a whole — nothing was created.\nCauses: an unknown template; a referenced testing chapter that\nis not a published active version of the packaging type.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_GetById",
        "summary": "Get packaging specification",
        "description": "Returns specification identity, status, and chapter references.\n`include` adds chapter content in the same response\n(PackagingSpecificationWithChapters): `chapters` for every chapter, or\na list, e.g. `include=general,attestation`. Without `include`, no\ncontent is returned. Same rules as FoodSpecifications_GetById: a\nproperty is present only when included, a chapter the specification\ndoes not have reads null, and the full document carries no ETags\n(a chapter write uses the ETag of that chapter's own GET).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "description": "Comma-separated. `chapters` = general, attestation, testing and\npackagingSystem. An unknown value is a 400.\n",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "chapters",
                  "general",
                  "attestation",
                  "testing",
                  "packagingSystem"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the packaging specification, with the content `include` asked for",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSpecificationWithChapters"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/versions": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_Versions",
        "summary": "Get packaging specification versions",
        "description": "Returns all versions of the same logical specification.\nGiven any version's ID, the server resolves the version chain and\nreturns all sibling versions sorted by version number descending.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns all versions of the specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpecificationVersion"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/share": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_Share",
        "summary": "Share specification with the counterpart company",
        "description": "Same behaviour as FoodSpecifications_Share. Explicit business action:\nhands the document to the counterpart company and opens the\ncollaboration phase. Idempotent: sharing an already shared\nspecification changes nothing and answers 204, so a retried call is\nalways safe.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "204": {
            "description": "The specification is shared with the counterpart company (already shared included)"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/contacts": {
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_PutContacts",
        "summary": "Replace specification contacts",
        "description": "Same behaviour as FoodSpecifications_PutContacts, signatory flag\nincluded. Full replace of\nYOUR company's direct contacts on the specification: the retailer's\ncontacts when you are the retailer, the supplier's when you are the\nsupplier. Left untouched: the other party's contacts, contacts that\ncome from a collaboration, and translator contacts. The\nspecification owner stays a contact whether or not it is sent. The\nresponse lists exactly that scope, so sending it back unchanged is a\nno-op (200, nothing written).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactListWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your company's direct contacts on the specification, as stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListWrite"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "422": {
            "description": "A contact userId is unknown or not a user of your company (paramName contacts), or the owner contact's isSignatory differs from the stored flag (paramName contacts[i].isSignatory) — or the specification's state refuses the change (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/collection": {
      "post": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_Collection",
        "summary": "Get packaging specifications by IDs",
        "description": "Returns multiple packaging specifications (identity + chapter refs) in\na single call. Maximum 50 IDs per request.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpecificationCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the requested packaging specifications",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PackagingSpecification"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request parameters are invalid"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/general-chapter": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_GeneralChapter",
        "summary": "Get general chapter",
        "description": "Returns typed general information: version info, retailer and\nsupplier companies and contacts, custom fields, and references to\nthe chapter's documents and questionnaires.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the general chapter",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingGeneralChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_PutGeneralChapter",
        "summary": "Replace general chapter",
        "description": "Writes the writable part of the general chapter\n(PackagingGeneralChapterWrite). The general chapter belongs to this\nspecification only (never a library chapter).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingGeneralChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was written. Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the specification changed since the chapter was read"
          },
          "422": {
            "description": "Field validation failed (incl. fields owned by the counterpart company in the payload; data for a section the template disables) — or the chapter is locked (specification signature in progress) (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/attestation-chapter": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_AttestationChapter",
        "summary": "Get attestation chapter",
        "description": "Returns typed attestation data including Extended Producer Responsibility,\nenvironment compliance declarations, and ESC (circular economy) standards.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the attestation chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingAttestationChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      },
      "put": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_PutAttestationChapter",
        "summary": "Replace attestation chapter",
        "description": "Full replace of the attestation chapter (PackagingAttestationChapterWrite).\nThe attestation chapter belongs to this specification only (never a\nlibrary chapter). Either party may write it.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingAttestationChapterWrite"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was replaced. Read it back, with its new ETag, from the chapter GET."
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "412": {
            "description": "If-Match precondition failed — the specification changed since the chapter was read"
          },
          "422": {
            "description": "The specification's template has no attestation chapter (paramName attestationChapter); data for a section the template disables (paramName the section) — or the chapter is locked (specification signature in progress) (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/testing-chapter": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_TestingChapter",
        "summary": "Get testing chapter",
        "description": "Returns the testing chapter reference (linked from the library),\nwith associated requirements and documents.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the testing chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingTestingChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/testing-chapter/link": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_LinkTestingChapter",
        "summary": "Link testing chapter",
        "description": "Same behaviour as FoodSpecifications_LinkTestingChapter. Attaches an\nexisting library testing chapter of the PACKAGING type (created with\nLibraryChapters_CreateTesting, templateType packaging) to this specification,\nreplacing the currently linked one, if any. Also the way a\nspecification adopts a new version of its chapter. Linking the\nchapter already linked changes nothing (204).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChapterReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The chapter was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "422": {
            "description": "The chapter is unknown, not of the packaging type, not a published active version, or not owned by your company (paramName chapterId) — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/packaging-system-chapter": {
      "get": {
        "x-t1-stage": "limited",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_PackagingSystemChapter",
        "summary": "Get packaging system chapter",
        "description": "Returns the packaging systems associated with this specification,\nincluding full component details (materials, dimensions, suppliers,\ncharacteristics). Data is aggregated from the Packaging microservice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the packaging system chapter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagingSystemChapter"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Limited",
            "color": "orange",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/packaging-system/link": {
      "post": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specification-chapters"
        ],
        "operationId": "PackagingSpecifications_LinkPackagingSystem",
        "summary": "Link packaging system",
        "description": "Attaches an existing packaging system (created with\nLibraryPackagingSystems_Create, or in the Packaging application) as\nthe specification's packaging-system chapter,\nreplacing the currently linked one, if any. The system must be owned\nby your company, not a draft, and its active version. Once linked,\nthe system is shared with the specification's owner company. Linking\nthe system already linked changes nothing (204).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackagingSystemReference"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The packaging system was linked"
          },
          "400": {
            "description": "The request is malformed"
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "422": {
            "description": "The packaging system is unknown, a draft, not its active version, or not owned by your company (paramName packagingSystemId) — or the specification is locked (errorCode INVALID_RESOURCE_STATE, no paramName)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/modification-requests": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_ModificationRequests",
        "summary": "Get modification requests",
        "description": "Returns the modification requests (RFM) on this specification that\nare shared with your company; a draft is visible only to the user\nwho wrote it. Filter by status and chapter type.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by RFM status",
            "schema": {
              "type": "string",
              "enum": [
                "Draft",
                "InProgress",
                "Performed",
                "Declined",
                "Completed",
                "Archived"
              ]
            }
          },
          {
            "name": "chapterType",
            "in": "query",
            "required": false,
            "description": "Filter by template chapter code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of sectionName and fieldName. Defaults to English.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the modification requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModificationRequestPagedList"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    },
    "/v2/packaging/specifications/{specificationId}/history": {
      "get": {
        "x-t1-stage": "designed",
        "tags": [
          "packaging-specifications"
        ],
        "operationId": "PackagingSpecifications_History",
        "summary": "Get specification history",
        "description": "Returns the change log of this specification, newest first: field\nand document changes, section validations and requirement\nvalidations.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SpecificationId"
          },
          {
            "name": "fromDateUtc",
            "in": "query",
            "required": false,
            "description": "Only changes made at or after this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDateUtc",
            "in": "query",
            "required": false,
            "description": "Only changes made at or before this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "required": false,
            "description": "Language of names and values. Defaults to English.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the specification history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpecificationHistoryPagedList"
                }
              }
            }
          },
          "401": {
            "description": "The authentication credentials are invalid"
          },
          "403": {
            "description": "The caller does not have permissions"
          },
          "404": {
            "description": "The packaging specification was not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "x-badges": [
          {
            "name": "Designed",
            "color": "grey",
            "position": "before"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 client credentials issued by Trace One. Request a token from the token URL with your\nclient id and secret for the scope t1_api, then send it in the Authorization header as a\nBearer token. Authentication and authorisation failures answer 401 and 403.\n",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://ws-users.traceone.com/default/connect/token",
            "scopes": {
              "t1_api": "Access to the Trace One public APIs"
            }
          }
        }
      }
    },
    "responses": {
      "TooManyRequests": {
        "description": "Too many requests. The gateway limits the number of requests each client sends; retry\nlater, with backoff.\n"
      }
    },
    "parameters": {
      "SpecificationId": {
        "name": "specificationId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the specification",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "FolderId": {
        "name": "folderId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the folder",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "TemplateType": {
        "name": "templateType",
        "in": "path",
        "required": true,
        "description": "The template type of the library chapter: the family of specifications\nthat can link it. A value outside the list is a 404; so is a chapter of\nanother template type.\n",
        "schema": {
          "type": "string",
          "enum": [
            "food",
            "packaging"
          ]
        }
      },
      "ChapterId": {
        "name": "chapterId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the library chapter",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "TemplateId": {
        "name": "templateId",
        "in": "path",
        "required": true,
        "description": "The template identifier (communicated at onboarding)",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "MaterialId": {
        "name": "materialId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the material",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "QuestionnaireTemplateId": {
        "name": "questionnaireTemplateId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the questionnaire template",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "QuestionnaireId": {
        "name": "questionnaireId",
        "in": "path",
        "required": true,
        "description": "The unique identifier of the questionnaire instance",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ChapterType": {
        "name": "chapterType",
        "in": "path",
        "required": true,
        "description": "Chapter type code of a chapter of the specification, as\nTemplateStructureChapter.chapterType lists it: general, labelling,\nproduction, testing, finishedProduct, or a retailer-defined custom\nchapter code.\n",
        "schema": {
          "type": "string"
        }
      },
      "CustomChapterType": {
        "name": "chapterType",
        "in": "path",
        "required": true,
        "description": "Retailer-defined custom chapter type code (communicated with the\ntemplate at onboarding). Standard chapters have their own routes;\nlibrary chapter types are rejected (they cannot be customized).\n",
        "schema": {
          "type": "string"
        }
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": false,
        "description": "Optional optimistic concurrency: the ETag returned by the chapter GET.\nWhen provided, the write is rejected with 412 if the specification\nchanged since the chapter was read (anything on it: another chapter,\na contact, a share), or, for a library chapter, if the chapter\nchanged. Guards against concurrent writers within the same\nowner company (cross-company overwrite is already impossible — the\nchapter is the ownership boundary).\n",
        "schema": {
          "type": "string"
        }
      },
      "PackagingComponentId": {
        "name": "packagingComponentId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "PackagingSystemId": {
        "name": "packagingSystemId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Not active yet. A unique key per create: a retried call with the same key will answer\nthe result of the first call instead of creating again. Until it is active, check\nwhether the item exists before retrying a create.\n",
        "schema": {
          "type": "string",
          "maxLength": 255
        }
      }
    },
    "headers": {
      "ETag": {
        "description": "Version tag of the chapter as stored. Pass it back in If-Match on the\nnext write for optimistic concurrency.\n",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "ValidationErrorResponse": {
        "type": "object",
        "description": "Returned when a write is rejected (422): the payload cannot be processed, or the\nresource's current state does not allow the write. One entry per problem. Read `errors[]`\n- `message` is only a human-readable summary and its wording changes with the number of\nerrors. `errorCode` tells which kind: `UNPROCESSABLE_CONTENT` (a value in the payload is\nrefused; `paramName` names it), `NAME_ALREADY_USED` (the `name` of a library object is\nalready used by another object of the owner company; `paramName` is `name` - pick another\nname and retry) or `INVALID_RESOURCE_STATE` (the resource is locked, completed or otherwise\nnot in a state that allows this write; `paramName` is null - fix the resource, not the\nrequest). This API does not use 409; concurrency is 412 (If-Match).\n",
        "properties": {
          "message": {
            "type": "string",
            "description": "Summary for humans and logs. Do not branch on this value.",
            "example": "Errors have occured"
          },
          "traceId": {
            "type": "string",
            "description": "Correlation id. Quote it when reporting a problem to Trace One."
          },
          "errors": {
            "type": "array",
            "description": "One entry per rejected value.",
            "items": {
              "type": "object",
              "properties": {
                "errorCode": {
                  "type": "string",
                  "description": "Stable machine-readable code. `UNPROCESSABLE_CONTENT` (payload value refused), `NAME_ALREADY_USED` (library object name taken by the owner company) or `INVALID_RESOURCE_STATE` (resource state refuses the write).",
                  "example": "UNPROCESSABLE_CONTENT"
                },
                "errorMessage": {
                  "type": "string",
                  "description": "What is wrong with this value.",
                  "example": "Unknown product type."
                },
                "paramName": {
                  "type": "string",
                  "nullable": true,
                  "description": "The field the error concerns, named as it appears in the request.\nNull when the error is not about one specific field.\n",
                  "example": "productTypeId"
                },
                "legacyErrorCode": {
                  "type": "string",
                  "nullable": true,
                  "description": "Legacy identifier. Usually null; do not depend on it."
                }
              }
            }
          }
        }
      },
      "SpecificationCollectionRequest": {
        "type": "object",
        "required": [
          "specificationIds"
        ],
        "properties": {
          "specificationIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 50
          }
        }
      },
      "SpecificationSearchRequest": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "type": "string",
            "nullable": true,
            "description": "Free-text search (matches specification name; also GTIN and trade item name for product specs)",
            "example": "organic yogurt"
          },
          "templateTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Food",
                "PetFood",
                "Packaging",
                "FruitsAndVegetable",
                "Formula",
                "BabyFood",
                "FoodSupplement"
              ]
            },
            "nullable": true,
            "description": "Filter by template types (omit for all)"
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Draft",
                "InProgress",
                "Validated",
                "Signed",
                "Revised",
                "Cancelled"
              ]
            },
            "nullable": true
          },
          "supplierIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "ownerCompanyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "categoryItemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "tradeItemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Filter by trade item ID (food templates only)"
          },
          "gtin": {
            "type": "string",
            "nullable": true,
            "description": "Filter by product GTIN barcode (food templates only)",
            "example": "3270190207924"
          },
          "latest": {
            "type": "boolean",
            "nullable": true,
            "description": "If true, return only the latest version per logical specification"
          },
          "active": {
            "type": "boolean",
            "nullable": true,
            "description": "If true, return only the active (current production) version"
          },
          "orderBy": {
            "type": "string",
            "enum": [
              "CreationDateUtc",
              "LastUpdateDateUtc",
              "Name",
              "Status"
            ],
            "default": "CreationDateUtc"
          },
          "orderByDescending": {
            "type": "boolean",
            "default": true
          },
          "pageNumber": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 50
          }
        },
        "additionalProperties": false
      },
      "ObjectVersion": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "activeVersion": {
            "type": "boolean",
            "description": "True if this is the currently active (production) version"
          },
          "lastVersion": {
            "type": "boolean",
            "description": "True if this is the latest created version"
          }
        },
        "additionalProperties": false
      },
      "SpecificationVersion": {
        "type": "object",
        "readOnly": true,
        "description": "One version of a specification. Signature details are on the specification read of that version.",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/SpecificationStatus"
          },
          "version": {
            "$ref": "#/components/schemas/ObjectVersion"
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "supplierCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SpecificationSignatures": {
        "type": "object",
        "readOnly": true,
        "description": "The signature of this specification version. Absent (null) until a signature process starts.",
        "properties": {
          "signedFileId": {
            "type": "string",
            "format": "uuid",
            "description": "The signed PDF of the specification (file id)"
          },
          "retailerSignature": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SignatureInfo"
              }
            ],
            "nullable": true,
            "description": "Null until the retailer has signed"
          },
          "supplierSignature": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SignatureInfo"
              }
            ],
            "nullable": true,
            "description": "Null until the supplier has signed"
          }
        },
        "additionalProperties": false
      },
      "SignatureInfo": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "signedDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date the signature of the specification completed (both parties signed). Same value on both parties; null until completion."
          },
          "signedByUserId": {
            "type": "string",
            "format": "uuid",
            "description": "The user who signed for this party"
          }
        },
        "additionalProperties": false
      },
      "LinkedChapter": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "chapterType": {
            "type": "string",
            "description": "Template chapter code of the linked library chapter: production,\ntesting or finishedProduct on food specifications; testing on\npackaging specifications.\n",
            "example": "production"
          },
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "description": "The linked library chapter version"
          }
        },
        "additionalProperties": false
      },
      "SpecificationCompany": {
        "type": "object",
        "description": "Company and contacts for a specification party (retailer or supplier).\nNo name enrichment — IDs only. Resolve via the CUMD public API.\n",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The party's company. Set by the specification; not writable in the chapter."
          },
          "subsidiaryCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "signatoryContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecificationContact"
            },
            "nullable": true,
            "readOnly": true,
            "description": "The party's contacts on the specification, each flagged\nisSignatory. Written with the contacts endpoint, not the chapter.\n"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalContact"
            },
            "nullable": true,
            "description": "The party's additional contacts. Written through the chapter\nwrite's retailer.additionalContacts / supplier.additionalContacts.\n"
          },
          "validations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationInfo"
            },
            "readOnly": true,
            "description": "Validations of this section. A caller that is not the\nspecification owner sees only the owner's validations and its own.\nEmpty when the section is not validated.\n"
          }
        },
        "additionalProperties": false
      },
      "SpecificationContact": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "isSignatory": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether this contact signs the specification for the party"
          }
        },
        "additionalProperties": false
      },
      "AdditionalContact": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "NetContent": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "nullable": true
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Requirement": {
        "type": "object",
        "description": "A requirement attached to the chapter (reference). Attached at\nspecification creation (FoodSpecificationCreateRequest.requirements);\nnever written through a chapter payload.\n",
        "properties": {
          "requirementId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "requirementType": {
            "type": "string",
            "enum": [
              "Text",
              "Document"
            ],
            "readOnly": true
          },
          "validated": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChapterRequirementsWrite": {
        "type": "object",
        "required": [
          "requirementIds"
        ],
        "properties": {
          "requirementIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The requirements the chapter carries after the call; [] detaches them all."
          }
        },
        "additionalProperties": false
      },
      "ChapterDocumentsWrite": {
        "type": "object",
        "required": [
          "fileIds"
        ],
        "properties": {
          "fileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The files the chapter carries after the call; [] detaches them all."
          }
        },
        "additionalProperties": false
      },
      "DocumentSection": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentItem"
            },
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter; null when none"
          }
        },
        "additionalProperties": false
      },
      "DocumentItem": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "Measurement": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VersionInfo": {
        "type": "object",
        "nullable": true,
        "description": "Version section of the packaging general chapter, the read twin of\nPackagingVersionWrite. null when the chapter has no version section.\n",
        "properties": {
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true,
            "description": "Reason for the current specification version/revision"
          },
          "impactOnLabeling": {
            "type": "boolean",
            "description": "Whether this version has impact on labeling"
          }
        },
        "additionalProperties": false
      },
      "FoodProduct": {
        "type": "object",
        "description": "Product identity for food specifications (READ side). Packaging specs have no direct\nproduct link. Every field here is derived from the trade item the specification points\nat and is refused in a write payload: change the specification's tradeItemId instead.\n",
        "properties": {
          "tradeItemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true
          },
          "gtin": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "example": "3270190207924"
          },
          "productBrandId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true
          },
          "productCategoryIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "readOnly": true
          },
          "netContents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetContent"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "SpecificationSearchResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecificationListItem"
            }
          },
          "totalCount": {
            "type": "integer"
          },
          "pageNumber": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SpecificationListItem": {
        "type": "object",
        "description": "Chapter-agnostic specification summary. Same shape regardless of template type.\nNo enrichment — IDs only. Resolve company/product names via other APIs.\n",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Organic Strawberry Yogurt 150g"
          },
          "templateType": {
            "type": "string",
            "example": "Food"
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "supplierCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "productTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "InProgress",
              "Validated",
              "Signed",
              "Revised",
              "Cancelled"
            ]
          },
          "sharedWithCompanyIds": {
            "type": "array",
            "readOnly": true,
            "description": "Companies with access — the owner always; the supplier once shared.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "version": {
            "$ref": "#/components/schemas/ObjectVersion"
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdateDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FoodSpecification": {
        "type": "object",
        "description": "Food specification identity, status, version, contacts and chapter\nreferences. IDs only, no enrichment. Every member the create accepts\nreads back here under the same name, except the chapters\n(include=chapters, libraryLinkedChapters) and requirements\n(GET .../requirements).\n",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "Derived from the trade item",
            "example": "Organic Strawberry Yogurt 150g"
          },
          "templateType": {
            "type": "string",
            "readOnly": true,
            "example": "Food"
          },
          "templateId": {
            "type": "string",
            "format": "uuid"
          },
          "tradeItemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "description": "The user of the owner company who owns the specification"
          },
          "supplierCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "languageCode": {
            "type": "string",
            "nullable": true,
            "example": "en-US"
          },
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The folder the specification is placed in; null when it is in none"
          },
          "status": {
            "$ref": "#/components/schemas/SpecificationStatus"
          },
          "sharedWithCompanyIds": {
            "type": "array",
            "readOnly": true,
            "description": "Companies with access to the specification: the owner always,\nthe supplier once the specification has been shared\n(POST .../share or the share of its folder).\n",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "contacts": {
            "type": "array",
            "readOnly": true,
            "description": "Contacts of both parties",
            "items": {
              "$ref": "#/components/schemas/SpecificationPartyContact"
            }
          },
          "version": {
            "$ref": "#/components/schemas/ObjectVersion"
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "lastUpdateDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "signatures": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpecificationSignatures"
              }
            ],
            "nullable": true
          },
          "libraryLinkedChapters": {
            "type": "array",
            "readOnly": true,
            "description": "Library chapters linked to the specification (empty when none)",
            "items": {
              "$ref": "#/components/schemas/LinkedChapter"
            }
          }
        }
      },
      "FoodGeneralChapter": {
        "type": "object",
        "description": "Read shape of the general chapter. Written through\nFoodGeneralChapterWrite: each party's subsidiaryCompanyId and\nadditionalContacts, and customFields. Party contacts (and their\nsignatory flag) are written through PUT .../contacts. The product block is derived\nfrom the specification's trade item. Requirements, documents and\nquestionnaires are references, attached at the specification level.\n",
        "properties": {
          "versionInfo": {
            "$ref": "#/components/schemas/FoodVersionInfo"
          },
          "product": {
            "$ref": "#/components/schemas/FoodProduct"
          },
          "retailer": {
            "$ref": "#/components/schemas/SpecificationCompany"
          },
          "supplier": {
            "$ref": "#/components/schemas/SpecificationCompany"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true
          },
          "documents": {
            "$ref": "#/components/schemas/DocumentSection"
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Questionnaire"
            },
            "nullable": true,
            "description": "Questionnaire instances attached to this chapter (references;\ncontent at GET /questionnaires/{questionnaireId}).\n"
          }
        },
        "additionalProperties": false
      },
      "ProductionSite": {
        "type": "object",
        "properties": {
          "siteId": {
            "type": "string",
            "format": "uuid",
            "description": "Resolve via Sites API for full site details"
          }
        },
        "required": [
          "siteId"
        ],
        "additionalProperties": false
      },
      "FoodProductionChapter": {
        "type": "object",
        "description": "Spec-scoped read of the production chapter: the library production\nchapters linked to the specification (one entry each), and the\nspecification's own requirements and documents for this chapter type.\nRead-only projection; chapter content is written at the chapter's own\naddress.\n",
        "properties": {
          "productionChapters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionSubChapter"
            },
            "nullable": true,
            "description": "One entry per linked library production chapter. Empty when no\nchapter is linked. An assortment specification links several.\n"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true
          },
          "documents": {
            "$ref": "#/components/schemas/DocumentSection"
          }
        },
        "additionalProperties": false
      },
      "ProductionSubChapter": {
        "type": "object",
        "description": "One library production chapter as linked to the specification: the\nchapter's content (same names as LibraryFoodProductionChapter) plus\nwhat the specification adds to it (linkedChapterId, commercialName,\npercentage).\n",
        "properties": {
          "linkedChapterId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "The linked library chapter; read and write it at /library/food/production-chapters/{chapterId}."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "Library display name of the linked chapter."
          },
          "commercialName": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "example": "Strawberry variant",
            "description": "Name of this chapter within an assortment specification. null for a product specification."
          },
          "percentage": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "description": "Share of this chapter within an assortment specification (greater than 0, 2 decimals). null for a product specification."
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionSite"
            },
            "nullable": true
          },
          "recipe": {
            "$ref": "#/components/schemas/RecipeRead"
          },
          "nutrition": {
            "$ref": "#/components/schemas/NutritionalInformation"
          },
          "allergens": {
            "$ref": "#/components/schemas/AllergenDeclarationRead"
          }
        },
        "additionalProperties": false
      },
      "RecipeRead": {
        "type": "object",
        "description": "The chapter's recipe: its own composite, the ingredients read through\nit, and the chapter's own manufacturing detail.\n",
        "properties": {
          "compositeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The chapter's own composite material, created with the chapter.\nIt never changes: the recipe is written into it (RecipeWrite), the\nchapter is never pointed at another composite.\n"
          },
          "ingredients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ingredient"
            },
            "nullable": true,
            "readOnly": true,
            "description": "Read through the chapter's composite. Written through\nRecipeWrite.ingredients on the chapter update.\n"
          },
          "totalPercentage": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true
          },
          "manufacturingDiagramFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "calculationOfYield": {
            "$ref": "#/components/schemas/CalculationOfYield"
          },
          "recycledProductQuantity": {
            "$ref": "#/components/schemas/RecycledProductQuantity"
          }
        },
        "required": [
          "compositeId"
        ],
        "additionalProperties": false
      },
      "RecipeWrite": {
        "type": "object",
        "description": "The chapter's recipe, written on the chapter update only (not on the\ncreate - see FoodProductionChapterCreateRequest). The ingredients go\ninto the chapter's OWN composite, the one created with the chapter; the\nchapter cannot be pointed at another composite, so compositeId is\nread-only (RecipeRead). Writing the ingredients re-derives the allergen\nsections. The three other blocks belong to the chapter itself.\n",
        "properties": {
          "ingredients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaterialIngredientWrite"
            },
            "nullable": true,
            "description": "Replaces the recipe's ingredient list in full. null or absent\nleaves it unchanged; send [] to clear it. Each ingredient references\nan existing library material the caller can see (leaf-first import\norder); an ingredient the recipe refuses is a 422 naming\ningredients[i]. Each materialId appears at most once - the update\nmatches the stored ingredients by materialId - so a duplicate is a\n422 naming ingredients[i].materialId.\n"
          },
          "manufacturingDiagramFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "Replaces the current list in full. null or absent leaves it\nunchanged; send [] to clear it.\n"
          },
          "calculationOfYield": {
            "$ref": "#/components/schemas/CalculationOfYield"
          },
          "recycledProductQuantity": {
            "$ref": "#/components/schemas/RecycledProductQuantity"
          }
        },
        "additionalProperties": false
      },
      "CalculationOfYield": {
        "type": "object",
        "properties": {
          "percentage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RecycledProductQuantity": {
        "type": "object",
        "properties": {
          "minimumValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "targetValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "maximumValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Reference list \"unit of measure\", restricted to volume, mass and\npercentage units.\n"
          }
        },
        "additionalProperties": false
      },
      "Ingredient": {
        "type": "object",
        "description": "One ingredient of the chapter's recipe, read through the chapter's\ncomposite. Top-level entries are the ones written\n(MaterialIngredientWrite), under the same names; subIngredients are\nthe ingredients of a composite ingredient, read only.\n",
        "properties": {
          "ingredientId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "materialId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The referenced material. null for an ingredient a bought sub-composite declares by name."
          },
          "ingredientName": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "example": "Organic Strawberry Puree",
            "description": "Taken from the referenced material."
          },
          "percentage": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Share of the recipe, in percent, under the ingredient's parent."
          },
          "minPercentage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "maxPercentage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "functionId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Technological function of the ingredient in the recipe (reference list)."
          },
          "subIngredients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ingredient"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "FoodLabellingChapter": {
        "type": "object",
        "description": "Read shape of the labelling chapter. Every field of\nFoodLabellingChapterWrite comes back under the same name; fields the\nplatform derives are readOnly. A section the specification's template\ndisables is null. Requirements and documents are read-only references.\n",
        "properties": {
          "productInformation": {
            "$ref": "#/components/schemas/LabellingProductInformationRead"
          },
          "nutriScore": {
            "$ref": "#/components/schemas/NutriScoreRead"
          },
          "consumerInstructions": {
            "$ref": "#/components/schemas/ConsumerInstructionsRead"
          },
          "sortingInstructions": {
            "$ref": "#/components/schemas/SortingInstructions"
          },
          "gmoRiskAnalysis": {
            "$ref": "#/components/schemas/GmoRiskAnalysisRead"
          },
          "additionalMarketingInformation": {
            "$ref": "#/components/schemas/MarketingInformation"
          },
          "businessNameAndAddress": {
            "$ref": "#/components/schemas/BusinessNameAndAddressRead"
          },
          "ingredientDeclaration": {
            "$ref": "#/components/schemas/IngredientDeclarationRead"
          },
          "nutritionalInformation": {
            "$ref": "#/components/schemas/NutritionDeclarationRead"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabellingClaimRead"
            },
            "nullable": true,
            "description": "Every claim the chapter carries, manual and automatic alike;\nautomaticallyAdded says which is which. Only the manual ones are\nwritable — see FoodLabellingChapterWrite.claims.\n"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true
          },
          "documents": {
            "$ref": "#/components/schemas/DocumentSection"
          }
        },
        "additionalProperties": false
      },
      "IngredientDeclarationRead": {
        "type": "object",
        "description": "Read shape of section pack_ingredient_list: one ingredient list per\nproduction chapter linked to the specification. The list text is\ngenerated from the production chapter's recipe and the declaration\nrows; overrideText is the text printed instead of it when set. A\nrecipe change regenerates generatedText and leaves overrideText as it\nstands.\n",
        "properties": {
          "languageCode": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "example": "en"
          },
          "entries": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "null on the single merged list of a specification in merged (assortment) mode."
                },
                "generatedText": {
                  "type": "string",
                  "nullable": true,
                  "readOnly": true,
                  "example": "Milk, sugar, strawberry puree (8%), modified starch, natural flavouring"
                },
                "overrideText": {
                  "type": "string",
                  "nullable": true
                },
                "printedText": {
                  "type": "string",
                  "nullable": true,
                  "readOnly": true,
                  "description": "overrideText when set, generatedText otherwise."
                },
                "displayOnPack": {
                  "type": "boolean"
                },
                "declareAllergens": {
                  "type": "boolean",
                  "nullable": true
                },
                "characteristicIngredients": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CharacteristicIngredient"
                  }
                },
                "rows": {
                  "type": "array",
                  "description": "The declaration rows of the list, in recipe order: one per\nrecipe ingredient, plus the groups. parentId builds the tree.\n",
                  "items": {
                    "$ref": "#/components/schemas/IngredientDeclarationRowRead"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "CharacteristicIngredient": {
        "type": "object",
        "required": [
          "materialId"
        ],
        "properties": {
          "materialId": {
            "type": "string",
            "format": "uuid",
            "description": "The material of the recipe ingredient, or the bought (B3P)\ncomposite that holds it when ingredientId is set.\n"
          },
          "ingredientId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The ingredient inside a bought composite; null otherwise."
          }
        },
        "additionalProperties": false
      },
      "IngredientDeclarationRowRead": {
        "type": "object",
        "properties": {
          "rowId": {
            "type": "string",
            "format": "uuid"
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ingredientType": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "Composite",
              "RawMaterial",
              "Additive",
              "ProcessingAid",
              "Flavor",
              "Group"
            ]
          },
          "materialId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true
          },
          "ingredientId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true
          },
          "percentage": {
            "type": "number",
            "nullable": true,
            "readOnly": true
          },
          "allergenIds": {
            "type": "array",
            "nullable": true,
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "declarationType": {
            "$ref": "#/components/schemas/IngredientDeclarationType"
          },
          "declareAs": {
            "type": "string",
            "nullable": true
          },
          "quid": {
            "type": "number",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IngredientDeclarationType": {
        "type": "string",
        "enum": [
          "DoNotDeclare",
          "NotApplicable",
          "DeclareAsSingle",
          "DeclareAsComposite"
        ]
      },
      "IngredientDeclarationWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section pack_ingredient_list — INPUTS ONLY, keyed by production\nchapter. The list text is generated from each production chapter's\nrecipe and from the declaration rows below, and is read-only\n(IngredientDeclarationRead generatedText). The rows themselves come\nfrom the recipe: they are addressed, never created or removed, except\nthe groups.\n\nAn entry addresses a production chapter linked to the specification\n(on a create: referenced by this same create). A productionChapterId\nthat is not linked is a 422 naming the entry; the same\nproductionChapterId twice is a 422 naming the second occurrence.\nEntries are not created or removed here: a linked chapter the array\ndoes not carry keeps what it holds.\n\nWithin an entry:\n  * overrideText: null or absent removes the override (the generated\n    text is printed).\n  * displayOnPack: null or absent is true.\n  * declareAllergens: null or absent keeps the current value.\n  * characteristicIngredients: replaces the list in full; null or\n    absent keeps it, [] clears it. An item that is not an ingredient\n    of the production chapter's recipe is a 422 naming the section.\n  * rows: sets the declaration of the rows it names (by rowId, as\n    read on IngredientDeclarationRead); a row it does not name keeps\n    its declaration. Within a row, a null or absent field keeps its\n    value. Refused with a 422 naming the item: a rowId that is not on\n    the list; a declarationType not allowed for the row's ingredient\n    type; any change to a row whose declarationType is NotApplicable;\n    a quid on a row declared DoNotDeclare or NotApplicable.\n  * groups: replaces the groups in full; null or absent keeps them,\n    [] removes them all. A group carrying a groupId already on the\n    list is kept (its name, declarationType and members are updated);\n    a group without groupId is created; a group on the list the array\n    does not carry is removed, its members go back to their parent.\n    Refused with a 422 naming the item: a memberRowId that is not on\n    the list; members with different parents; a member declared\n    DoNotDeclare or NotApplicable; a group declarationType other than\n    DeclareAsSingle or DeclareAsComposite.\n\nRows are applied before groups; the list text is regenerated once,\nafter the entry is applied.\n\nMerged (assortment) mode is out of scope: on a specification in merged\nmode the section is refused with a 422 naming the section.\n",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "productionChapterId"
              ],
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "overrideText": {
                  "type": "string",
                  "nullable": true,
                  "description": "Text printed instead of the generated list. null = no override."
                },
                "displayOnPack": {
                  "type": "boolean",
                  "nullable": true,
                  "default": true
                },
                "declareAllergens": {
                  "type": "boolean",
                  "nullable": true
                },
                "characteristicIngredients": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "$ref": "#/components/schemas/CharacteristicIngredient"
                  }
                },
                "rows": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "required": [
                      "rowId"
                    ],
                    "properties": {
                      "rowId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "declarationType": {
                        "$ref": "#/components/schemas/IngredientDeclarationType"
                      },
                      "declareAs": {
                        "type": "string",
                        "nullable": true,
                        "description": "Name printed for the row instead of the ingredient name."
                      },
                      "quid": {
                        "type": "number",
                        "nullable": true,
                        "description": "Quantitative ingredient declaration, in percent; > 0 and <= 100, step 0.01."
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "groups": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "required": [
                      "name",
                      "declarationType",
                      "memberRowIds"
                    ],
                    "properties": {
                      "groupId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "A group already on the list (its rowId); null or absent = a new group."
                      },
                      "name": {
                        "type": "string"
                      },
                      "declarationType": {
                        "$ref": "#/components/schemas/IngredientDeclarationType"
                      },
                      "memberRowIds": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "NutritionDeclarationRead": {
        "type": "object",
        "description": "Read shape of section pack_nutrition: one nutrition declaration per\nproduction chapter linked to the specification. The per-100 g values,\ntheir units and the default serving are copied from the production\nchapter's nutrition table (written there, see\nFoodProductionChapterWrite.nutrition). The additional servings, the\nmanual per-serving values, displayToConsumer and the analysis files\nare labelling inputs (NutritionDeclarationWrite).\n",
        "properties": {
          "entries": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "null on the single merged declaration of a specification in merged (assortment) mode."
                },
                "servings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "servingId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string",
                        "nullable": true
                      },
                      "defaultServing": {
                        "type": "boolean",
                        "readOnly": true
                      },
                      "value": {
                        "type": "number",
                        "nullable": true
                      },
                      "massUnitId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "volumeUnitId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                      },
                      "servingTypeCode": {
                        "type": "string",
                        "nullable": true
                      },
                      "automaticCalculation": {
                        "type": "boolean"
                      },
                      "ratio": {
                        "type": "number",
                        "readOnly": true
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "nutrients": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "nutrientId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "unitId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "readOnly": true
                      },
                      "unroundedValue": {
                        "type": "number",
                        "nullable": true,
                        "readOnly": true,
                        "description": "Per reference quantity (100 g / 100 ml), copied from the production chapter."
                      },
                      "displayToConsumer": {
                        "type": "boolean"
                      },
                      "perServing": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "servingId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "unroundedValue": {
                              "type": "number",
                              "nullable": true
                            },
                            "unroundedDailyIntake": {
                              "type": "number",
                              "nullable": true
                            },
                            "roundedValue": {
                              "type": "number",
                              "nullable": true
                            },
                            "roundedValueText": {
                              "type": "string",
                              "nullable": true,
                              "readOnly": true,
                              "example": "372 kJ / 89 kcal"
                            },
                            "roundedDailyIntake": {
                              "type": "number",
                              "nullable": true
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "nutritionalAnalysisFileIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "NutritionDeclarationWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section pack_nutrition — INPUTS ONLY, keyed by production chapter. The\nper-100 g values, their units and the default serving come from the\nproduction chapter's nutrition table and are read-only here: they are\nwritten on the production chapter (FoodProductionChapterWrite.nutrition).\nPer-serving values are computed for a serving whose\nautomaticCalculation is true, and entered by the caller for a serving\nwhose automaticCalculation is false.\n\nAn entry addresses a production chapter linked to the specification\n(on a create: referenced by this same create). A productionChapterId\nthat is not linked is a 422 naming the entry; the same\nproductionChapterId twice is a 422 naming the second occurrence.\nEntries are not created or removed here: a linked chapter the array\ndoes not carry keeps what it holds.\n\nWithin an entry:\n  * servings: replaces the ADDITIONAL servings in full (the default\n    serving is read-only); null or absent keeps them, [] removes them\n    all. A servingId already on the table updates that serving; a\n    servingId not on the table adds a serving with that id; a\n    serving on the table the array does not carry is removed with its\n    per-serving values. The default serving's id is a 422 naming the\n    item; the same servingId twice is a 422 naming the second\n    occurrence.\n  * nutrients: sets what it names; a nutrient it does not name keeps\n    what it holds. A nutrientId absent from the production chapter's\n    nutrition table is a 422 naming the item. displayToConsumer null\n    or absent keeps the flag. perServing carries the manual values of\n    a serving whose automaticCalculation is false (after the servings\n    above are applied); a servingId of a serving whose\n    automaticCalculation is true, or that is not on the table, is a\n    422 naming the item. Within a perServing item, null or absent\n    keeps the value.\n  * nutritionalAnalysisFileIds: replaces the analysis files in full;\n    null or absent keeps them, [] clears them. A file that does not\n    exist or is not a nutritional-analysis file is a 422 naming the\n    section.\n\nMerged (assortment) mode is out of scope: on a specification in merged\nmode the section is refused with a 422 naming the section.\n",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "productionChapterId"
              ],
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "servings": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "required": [
                      "servingId",
                      "name",
                      "value",
                      "automaticCalculation"
                    ],
                    "properties": {
                      "servingId": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Chosen by the caller for a new serving; stable afterwards."
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "value": {
                        "type": "number",
                        "description": "Portion size, > 0, step 0.00001."
                      },
                      "massUnitId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "Mass unit of the portion (Units of measure list, mass type); null = the default serving's."
                      },
                      "volumeUnitId": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "Volume unit of the portion (Units of measure list, volume type); null = the default serving's."
                      },
                      "servingTypeCode": {
                        "type": "string",
                        "nullable": true,
                        "description": "Code from the ServingTypes list."
                      },
                      "automaticCalculation": {
                        "type": "boolean",
                        "description": "true = per-serving values computed from the per-100 g values; false = entered in nutrients[].perServing."
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "nutrients": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "required": [
                      "nutrientId"
                    ],
                    "properties": {
                      "nutrientId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "displayToConsumer": {
                        "type": "boolean",
                        "nullable": true
                      },
                      "perServing": {
                        "type": "array",
                        "nullable": true,
                        "items": {
                          "type": "object",
                          "required": [
                            "servingId"
                          ],
                          "properties": {
                            "servingId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "unroundedValue": {
                              "type": "number",
                              "nullable": true,
                              "description": ">= 0, step 0.00001."
                            },
                            "unroundedDailyIntake": {
                              "type": "number",
                              "nullable": true,
                              "description": "Reference intake percentage, >= 0, step 0.00001."
                            },
                            "roundedValue": {
                              "type": "number",
                              "nullable": true,
                              "description": ">= 0, step 0.00001."
                            },
                            "roundedDailyIntake": {
                              "type": "number",
                              "nullable": true,
                              "description": ">= 0, step 0.00001."
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "nutritionalAnalysisFileIds": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "NutritionalInformation": {
        "type": "object",
        "description": "READ shape of the production chapter's nutrition table, the\ncounterpart of NutritionalInformationWrite: the nutrient values per\nreference quantity (100 g / 100 ml), the two automatic switches and\nthe default serving portion. Rounded, per-serving and\nreference-intake values and the nutri-score are labelling data\n(NutritionDeclarationRead, labelling chapter).\n",
        "properties": {
          "nutrients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Nutrient"
            },
            "nullable": true
          },
          "servingSize": {
            "$ref": "#/components/schemas/ServingSizeRead"
          },
          "automaticCalculation": {
            "type": "boolean",
            "nullable": true,
            "description": "When true, the server computes the energy values from the other nutrients."
          },
          "automaticConversion": {
            "type": "boolean",
            "nullable": true,
            "description": "When true, the server converts nutrient values between units."
          }
        },
        "additionalProperties": false
      },
      "Nutrient": {
        "type": "object",
        "description": "One row of the nutrition table, under the names of NutrientWrite.\nWith automaticCalculation the energy rows hold the computed value;\nwith automaticConversion a value may be converted to the row's unit.\n",
        "properties": {
          "nutrientId": {
            "type": "string",
            "format": "uuid"
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Unit of measure of the value. Filled with the nutrient's default unit when written empty."
          },
          "unroundedValue": {
            "type": "number",
            "nullable": true,
            "description": "Value per reference quantity (100 g / 100 ml), unrounded."
          }
        },
        "required": [
          "nutrientId"
        ],
        "additionalProperties": false
      },
      "NutritionalInformationWrite": {
        "type": "object",
        "description": "WRITE shape of the nutrition section. Writes carry the INPUTS only:\nthe nutrient values as entered, the serving size and the two automatic flags. The\nrendered and computed values of NutritionalInformation (per100g / perServing strings,\nreferenceIntakePercentage, nutriScore) are read-only and computed server-side from\nthese inputs. On the update, full replace within the section: an omitted nutrient\nis removed, and omitting a mandatory nutrient is a 422 naming nutrition. On the\ncreate, the sent nutrients are added to the mandatory ones (see\nFoodProductionChapterCreateRequest.nutrition).\n",
        "properties": {
          "nutrients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NutrientWrite"
            },
            "nullable": true
          },
          "servingSize": {
            "$ref": "#/components/schemas/ServingSizeWrite"
          },
          "automaticCalculation": {
            "type": "boolean",
            "nullable": true,
            "description": "Let the server compute the derived nutrient values (default true)."
          },
          "automaticConversion": {
            "type": "boolean",
            "nullable": true,
            "description": "Let the server convert between mass and volume units (default true)."
          }
        },
        "additionalProperties": false
      },
      "NutrientWrite": {
        "type": "object",
        "required": [
          "nutrientId"
        ],
        "properties": {
          "nutrientId": {
            "type": "string",
            "format": "uuid",
            "description": "Nutrient reference (Nutrients reference list). Unknown id = 422 naming the entry."
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Unit of measure of the value; null = the nutrient's default unit."
          },
          "unroundedValue": {
            "type": "number",
            "nullable": true,
            "description": "The value as entered, per reference quantity (100 g / 100 ml), unrounded (decimal).\nRounding, per-serving values and reference-intake percentages are computed server-side.\n"
          }
        },
        "additionalProperties": false
      },
      "ServingSizeWrite": {
        "type": "object",
        "description": "Default serving portion the per-serving values are computed from.",
        "properties": {
          "value": {
            "type": "number",
            "nullable": true,
            "description": "Portion size (default 100)."
          },
          "massUnitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Mass unit of the portion (default gram)."
          },
          "volumeUnitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Volume unit of the portion (default millilitre)."
          },
          "servingTypeCode": {
            "type": "string",
            "nullable": true
          },
          "servingTypeDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AllergenDeclarationRead": {
        "type": "object",
        "description": "The three allergen blocks of the production chapter. Raw-material\nentries come from the recipe composite's PRESENT declarations.\nCross-contamination entries come from the composite's\nUNINTENTIONALLY PRESENT declarations and from the allergens the\nchapter's sites handle; an entry with neither is dropped. Free-from\nentries are the chapter's own list.\n",
        "properties": {
          "rawMaterialAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RawMaterialAllergenRead"
            },
            "nullable": true,
            "readOnly": true
          },
          "crossContaminationAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrossContaminationAllergenRead"
            },
            "nullable": true
          },
          "freeFromAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FreeFromAllergenRead"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RawMaterialAllergenRead": {
        "type": "object",
        "description": "An allergen the composite declares as PRESENT, with the ingredients it\ncomes from. Entirely derived - there is no write counterpart.\n",
        "properties": {
          "allergenId": {
            "type": "string",
            "format": "uuid"
          },
          "ingredientIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "required": [
          "allergenId"
        ],
        "additionalProperties": false
      },
      "CrossContaminationAllergenRead": {
        "type": "object",
        "description": "A cross-contamination risk: the recipe ingredients and the production\nsites it comes from, and whether it is controlled (the only input,\nsee CrossContaminationAllergenWrite).\n",
        "properties": {
          "allergenId": {
            "type": "string",
            "format": "uuid"
          },
          "ingredientIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "readOnly": true
          },
          "siteIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "readOnly": true
          },
          "controlledRisk": {
            "type": "boolean"
          }
        },
        "required": [
          "allergenId"
        ],
        "additionalProperties": false
      },
      "FreeFromAllergenRead": {
        "type": "object",
        "description": "An allergen the chapter declares itself free from, with its proof.",
        "properties": {
          "allergenId": {
            "type": "string",
            "format": "uuid"
          },
          "proofFileId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "allergenId"
        ],
        "additionalProperties": false
      },
      "AllergenDeclarationWrite": {
        "type": "object",
        "description": "Qualifies allergens the chapter already carries. The allergen SET is\nnot writable: an allergenId that the derived list does not contain is a\n422 naming the entry, because there is nothing to qualify.\nrawMaterialAllergens has no write shape at all - it is pure derivation.\n\nThe cross-contamination entries come from two sources: the recipe's\ncomposite, and the allergens the chapter's SITES declare; an entry\nleft with no ingredient behind it is dropped. The set is the union\nof the two, recomputed on each write to either section - which is\nwhy a caller can qualify an entry but never create or remove one.\n",
        "properties": {
          "crossContaminationAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrossContaminationAllergenWrite"
            },
            "nullable": true,
            "description": "Qualifies the derived cross-contamination entries. An entry absent\nfrom the array keeps what it holds - this is NOT a full replace,\nbecause the list is not the caller's to replace. null or absent\nchanges nothing.\n"
          },
          "freeFromAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FreeFromAllergenWrite"
            },
            "nullable": true,
            "description": "Same rule: qualifies derived entries, never adds or removes them.\n"
          }
        },
        "additionalProperties": false
      },
      "CrossContaminationAllergenWrite": {
        "type": "object",
        "description": "controlledRisk is the only thing a caller decides about a\ncross-contamination entry, and this shape carries nothing else.\n\nThe sites an entry applies to are derived: a site declares which\nallergens it handles, and the entry lists the sites that handle this\none. They are rebuilt from the chapter's sites on every write to the\nsites section, while controlledRisk is kept.\n",
        "properties": {
          "allergenId": {
            "type": "string",
            "format": "uuid",
            "description": "Must be one of the entries the chapter already carries (see\nAllergenDeclarationWrite for where they come from). An allergenId\nwith no entry is a 422 naming this entry - there is nothing to\nqualify.\n"
          },
          "controlledRisk": {
            "type": "boolean",
            "nullable": true
          }
        },
        "required": [
          "allergenId"
        ],
        "additionalProperties": false
      },
      "FreeFromAllergenWrite": {
        "type": "object",
        "properties": {
          "allergenId": {
            "type": "string",
            "format": "uuid",
            "description": "Must be one of the allergens the composite left free-from."
          },
          "proofFileId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "allergenId"
        ],
        "additionalProperties": false
      },
      "LabellingClaimRead": {
        "type": "object",
        "description": "A claim carried by the labelling chapter, with its origin.\n",
        "properties": {
          "claimId": {
            "type": "string",
            "format": "uuid"
          },
          "claimType": {
            "type": "string",
            "enum": [
              "Marketing",
              "Health",
              "Nutrition"
            ]
          },
          "claimText": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "The claim's sentence in the specification's language, copied from\nthe library item (placeholders filled in for marketing claims).\n"
          },
          "automaticallyAdded": {
            "type": "boolean",
            "readOnly": true,
            "description": "True when the platform added this claim from questionnaire\nanswers. Such a claim is server-managed: it is not part of the\ncaller's replace scope, and sending it back in a write neither\nadopts it nor removes it (see LabellingClaimWrite).\n"
          }
        },
        "required": [
          "claimId",
          "claimType",
          "automaticallyAdded"
        ],
        "additionalProperties": false
      },
      "LabellingClaimWrite": {
        "type": "object",
        "description": "A manual claim to carry on the labelling chapter, by reference.\n\nclaimText is NOT accepted: the chapter copies the sentence from the\nlibrary item, and a caller-supplied one would be silently overwritten.\nIt is returned on the read side.\n",
        "properties": {
          "claimId": {
            "type": "string",
            "format": "uuid",
            "description": "A claim of your company's library, a claim shared with it, or a\nsystem-provided one.\n"
          },
          "claimType": {
            "type": "string",
            "enum": [
              "Marketing",
              "Health",
              "Nutrition"
            ],
            "description": "The library item's own type. The chapter keeps claims in three\ntyped lists, so the write has to say which list the id joins.\n\nThe caller states the type; the platform does not infer it from\nthe id.\n\nA wrong type is not silently accepted: the id is then absent from\nthat type's library, and the write is refused with the same answer\nan unknown id gets.\n"
          }
        },
        "required": [
          "claimId",
          "claimType"
        ],
        "additionalProperties": false
      },
      "FoodTestingChapter": {
        "type": "object",
        "description": "Read shape of the testing chapter, at its own library address and in\na specification. Its content is what FoodTestingChapterWrite writes,\nunder the same names and shapes, so a read can be sent back as a PUT.\n",
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The library chapter this content belongs to."
          },
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, as written on its create or replace."
          },
          "characteristics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Characteristic"
            },
            "nullable": true,
            "description": "The characteristics table, in table order. A characteristic with\nno photos reads with empty acceptedPhotoFileIds and\nrejectedPhotoFileIds lists.\n"
          },
          "controlPlans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ControlPlan"
            },
            "nullable": true,
            "description": "The control plans table, one row per controlled characteristic, in\nthe order of the characteristics table.\n"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true,
            "readOnly": true,
            "description": "Requirements attached to this chapter by the specification. A\nspecification-level value: null when the chapter is read at its\nlibrary address.\n"
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter by the specification. A\nspecification-level value: null when the chapter is read at its\nlibrary address.\n"
          }
        },
        "additionalProperties": false
      },
      "Characteristic": {
        "type": "object",
        "description": "One row of the characteristics table. Targets and tolerances are\nstrings, not numbers - they carry things like\n\"4.0 - 4.5\" and \"< 10 ppm\" - with an optional numeric quantity and\nunit alongside for the cases that are measurable.\n",
        "properties": {
          "characteristicId": {
            "type": "string",
            "format": "uuid",
            "description": "Row identity. Server-assigned when omitted; send it back to update\nthat row, omit it to add one. A characteristic that a control plan\nrefers to must carry one.\n"
          },
          "libraryCharacteristicId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The library characteristic this row was taken from, when it was."
          },
          "typeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Reference list \"characteristic type\". Required."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000,
            "example": "pH level"
          },
          "controlPhaseId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Reference list \"control phase\"."
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "nullable": true,
            "example": "Every batch"
          },
          "legalCriteria": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true,
            "example": "4.0 - 4.5"
          },
          "tolerance": {
            "type": "string",
            "nullable": true
          },
          "lowerTarget": {
            "type": "string",
            "nullable": true
          },
          "upperTarget": {
            "type": "string",
            "nullable": true
          },
          "lowerTolerance": {
            "type": "string",
            "nullable": true
          },
          "upperTolerance": {
            "type": "string",
            "nullable": true
          },
          "precision": {
            "type": "string",
            "nullable": true
          },
          "nonConformity": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0
          },
          "unitOfMeasureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Reference list \"unit of measure\"."
          },
          "acceptedPhotoFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "Files of type \"characteristic photo\". Replaces the row's list in\nfull; null or absent leaves it unchanged.\n"
          },
          "rejectedPhotoFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "Same rule as acceptedPhotoFileIds."
          },
          "hasControlPlans": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether the characteristic is marked as controlled: true when it is\nlisted in controlPlans. A control plan row exists for it only when\nit also carries a controlPhaseId.\n"
          }
        },
        "additionalProperties": false
      },
      "ControlPlan": {
        "type": "object",
        "description": "One row of the control plans table, one per controlled\ncharacteristic. A row exists when the characteristic is listed in\ncontrolPlans and carries a controlPhaseId. Its identity, library\nreference, type, name, control phase, target and tolerance are copied\nfrom the characteristic and are read-only here; send them on the\ncharacteristic.\n",
        "properties": {
          "controlPlanId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Row identity, assigned by the server."
          },
          "characteristicId": {
            "type": "string",
            "format": "uuid",
            "description": "The characteristics-table row this plan controls."
          },
          "libraryCharacteristicId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic."
          },
          "characteristicTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic. Reference list \"characteristic type\"."
          },
          "characteristicName": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic."
          },
          "controlPhaseId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic. Reference list \"control phase\"."
          },
          "controlType": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "madeBy": {
            "type": "string",
            "nullable": true,
            "description": "Who performs the control. Free text, not an enum.\n"
          },
          "frequency": {
            "type": "string",
            "nullable": true,
            "example": "Every batch"
          },
          "batchLotSize": {
            "type": "string",
            "nullable": true
          },
          "sampleSize": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic."
          },
          "tolerance": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the characteristic."
          },
          "criticity": {
            "type": "string",
            "nullable": true
          },
          "precision": {
            "type": "string",
            "nullable": true
          },
          "release": {
            "type": "boolean"
          },
          "registered": {
            "type": "boolean"
          }
        },
        "required": [
          "characteristicId"
        ],
        "additionalProperties": false
      },
      "FoodFinishedProductChapter": {
        "type": "object",
        "description": "Read shape of the finished product chapter, at its own library\naddress and in a specification. Its content is what\nFoodFinishedProductChapterWrite writes, under the same names and\nshapes, so a read can be sent back as a PUT. Every section is\nreturned; a section never written reads with null members and empty\nlists.\n",
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The library chapter this content belongs to."
          },
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, as written on its create or replace."
          },
          "productPhotos": {
            "$ref": "#/components/schemas/ProductPhotos"
          },
          "shelfLife": {
            "$ref": "#/components/schemas/FinishedProductShelfLife"
          },
          "consumerShelfLife": {
            "$ref": "#/components/schemas/FinishedProductConsumerShelfLife"
          },
          "storageConditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageCondition"
            },
            "nullable": true
          },
          "preservationMethodIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "PreservationMethod reference list."
          },
          "traceability": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Traceability"
              }
            ],
            "description": "sampleStorage is present exactly when sample storage is accepted\nand absent otherwise, never null - the same rule as on the write,\nso sending the read back keeps the acceptance as it is. Accepted\nwith no conditions entered, it reads as an object whose members\nare null.\n"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true,
            "readOnly": true,
            "description": "Requirements attached to this chapter by the specification. A\nspecification-level value: null when the chapter is read at its\nlibrary address.\n"
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter by the specification. A\nspecification-level value: null when the chapter is read at its\nlibrary address.\n"
          }
        },
        "additionalProperties": false
      },
      "ProductPhotos": {
        "type": "object",
        "description": "The product photos of the finished product chapter. Three separate lists\nof file ids - packaged, sectioned, unpackaged - the category is the\nlist an id is in, not a property of the photo. There is no per-photo name or description\nto write: the file name comes from the file itself.\n\nEach list replaces the stored one in full; null or absent leaves that\nlist unchanged, [] clears it. Every id must be a file of type\n\"product picture\" owned by your company.\n",
        "properties": {
          "packaged": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "sectioned": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "unpackaged": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StorageCondition": {
        "type": "object",
        "description": "One row of the storage-condition list, keyed by conditionId - the\nstorage CONTEXT the row is about. Each row carries its own temperature, humidity and\nlight rule. Replaced in full at the chapter level, keyed on conditionId.\n",
        "required": [
          "conditionId"
        ],
        "properties": {
          "conditionId": {
            "type": "string",
            "format": "uuid",
            "description": "Row identity, and the context itself: StorageConditionContext\nreference list. An unknown id is refused by the platform's list\nrule with a 422 naming the section.\n"
          },
          "storageId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "StorageConditionTemperature reference list."
          },
          "temperature": {
            "type": "object",
            "nullable": true,
            "properties": {
              "unitId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "UnitOfMeasure reference list, International System temperature units."
              },
              "minimumValue": {
                "type": "number",
                "nullable": true,
                "multipleOf": 0.1
              },
              "maximumValue": {
                "type": "number",
                "nullable": true,
                "multipleOf": 0.1,
                "description": "Must be greater than minimumValue."
              }
            },
            "additionalProperties": false
          },
          "humidity": {
            "type": "object",
            "nullable": true,
            "description": "Relative humidity, in percent.",
            "properties": {
              "minimumValue": {
                "type": "integer",
                "nullable": true,
                "minimum": 0,
                "maximum": 100
              },
              "maximumValue": {
                "type": "integer",
                "nullable": true,
                "minimum": 0,
                "maximum": 100,
                "description": "Must be greater than minimumValue."
              }
            },
            "additionalProperties": false
          },
          "keepAwayFromLight": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FinishedProductShelfLife": {
        "type": "object",
        "description": "Section shelf_life, first block. This chapter is\nwhere shelf life is DECLARED; the labelling chapter's copy of it is\nderived. The five durations are independent: the guaranteed shelf life\nof the product, and how long it keeps at each stage.\n\nguaranteedShelfLife.duration exists only while indicationId is set -\nclearing the id deletes the duration.\nA payload carrying a duration with no indicationId is therefore refused\nwith a 422 naming guaranteedShelfLife.indicationId, rather than\nanswering 200 having dropped it.\n",
        "properties": {
          "guaranteedShelfLife": {
            "type": "object",
            "nullable": true,
            "properties": {
              "indicationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "GuaranteedShelfLife reference list."
              },
              "duration": {
                "$ref": "#/components/schemas/ShelfLifeDuration"
              }
            },
            "additionalProperties": false
          },
          "production": {
            "$ref": "#/components/schemas/ShelfLifeDuration"
          },
          "packaging": {
            "$ref": "#/components/schemas/ShelfLifeDuration"
          },
          "shipping": {
            "$ref": "#/components/schemas/ShelfLifeDuration"
          },
          "delivery": {
            "$ref": "#/components/schemas/ShelfLifeDuration"
          },
          "protocolFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "Files of type \"shelf life protocol\", uploaded through the document\nAPI and referenced here by id. Replaces the list in full; null or\nabsent leaves it unchanged, [] clears it.\n"
          }
        },
        "additionalProperties": false
      },
      "FinishedProductConsumerShelfLife": {
        "type": "object",
        "description": "Section shelf_life, second block - the shelf life as the consumer\nsees it.\n",
        "properties": {
          "beforeOpeningIndicationId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "ConsumerShelfLife reference list."
          },
          "afterOpening": {
            "type": "object",
            "nullable": true,
            "properties": {
              "value": {
                "type": "integer",
                "nullable": true,
                "minimum": 0,
                "maximum": 100
              },
              "unitId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "UnitOfMeasure reference list, International System time units."
              }
            },
            "additionalProperties": false
          },
          "shelfLifeTesting": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Traceability": {
        "type": "object",
        "description": "Section traceability: the batch/lot formatting, the batch size, the\nsample-storage policy and the procedure files.\n\nsampleStorage follows the materials' sample-storage rule: sending\nthe object turns sample-storage acceptance on,\nomitting it leaves the chapter with none. Turning acceptance off\ndeletes the block, so there is no\nacceptSampleStorage flag to write - the object's presence is the flag.\nIts shape is the materials' one without size and duration.\n",
        "properties": {
          "batchLotNumberFormatting": {
            "type": "string",
            "nullable": true,
            "maxLength": 792
          },
          "productionBatchSize": {
            "type": "string",
            "nullable": true,
            "maxLength": 264
          },
          "samplesKeptPerBatch": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 1000
          },
          "sampleRetentionTime": {
            "type": "object",
            "nullable": true,
            "properties": {
              "value": {
                "type": "integer",
                "nullable": true,
                "minimum": 0,
                "maximum": 100
              },
              "unitId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "UnitOfMeasure reference list, International System time units."
              }
            },
            "additionalProperties": false
          },
          "sampleStorage": {
            "$ref": "#/components/schemas/FinishedProductSampleStorageWrite"
          },
          "procedureFileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "Files of type \"traceability procedure\". Replaces the list in full;\nnull or absent leaves it unchanged, [] clears it.\n"
          }
        },
        "additionalProperties": false
      },
      "SpecificationRequirement": {
        "type": "object",
        "readOnly": true,
        "description": "A requirement linked to the specification, one entry per chapter\nattachment. Grouping the entries by chapterType gives back the\ncreate's requirements member.\n",
        "properties": {
          "chapterType": {
            "type": "string",
            "description": "Template chapter code the requirement is attached to (same value as on the create)"
          },
          "requirementId": {
            "type": "string",
            "format": "uuid",
            "description": "The linked requirement version"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "requirementType": {
            "type": "string",
            "enum": [
              "Text",
              "Document"
            ]
          },
          "validated": {
            "type": "boolean",
            "description": "True when the retailer has validated the requirement on this specification"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "Published",
              "Locked"
            ],
            "description": "Library status of the requirement version"
          },
          "version": {
            "$ref": "#/components/schemas/ObjectVersion"
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ModificationRequest": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "modificationRequestId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "InProgress",
              "Performed",
              "Declined",
              "Completed",
              "Archived"
            ]
          },
          "statusReason": {
            "type": "string",
            "enum": [
              "ChapterUnlinked"
            ],
            "nullable": true,
            "description": "Why the request reached its status, when the platform set it (ChapterUnlinked — the chapter was unlinked from the specification)"
          },
          "chapterType": {
            "type": "string",
            "description": "Template chapter code the request targets"
          },
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The targeted library chapter version; null for a chapter that is not a library chapter"
          },
          "sectionName": {
            "type": "string",
            "nullable": true,
            "description": "Display name of the targeted section, in the requested language"
          },
          "fieldName": {
            "type": "string",
            "nullable": true,
            "description": "Display name of the targeted field (or document file name), in the requested language"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "description": "Company that raised the request"
          },
          "createdByUserId": {
            "type": "string",
            "format": "uuid"
          },
          "recipientCompanyId": {
            "type": "string",
            "format": "uuid",
            "description": "Company asked to perform the modification"
          },
          "createdDateUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedDateUtc": {
            "type": "string",
            "format": "date-time"
          },
          "completedDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SpecificationHistoryPagedList": {
        "type": "object",
        "readOnly": true,
        "description": "Newest first. Paging counts change records: one record can produce\nseveral entries, so a page may hold more than pageSize entries and\ntotalCount counts records, not entries.\n",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryEntry"
            }
          },
          "totalCount": {
            "type": "integer"
          },
          "pageNumber": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "HistoryEntry": {
        "type": "object",
        "readOnly": true,
        "description": "One change on the specification. Names and values are display text in the requested language.",
        "properties": {
          "dateUtc": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "description": "The user who made the change (from the CUMD public API)"
          },
          "chapterName": {
            "type": "string",
            "nullable": true
          },
          "sectionName": {
            "type": "string",
            "nullable": true
          },
          "fieldName": {
            "type": "string",
            "nullable": true
          },
          "changeType": {
            "type": "string",
            "enum": [
              "Add",
              "Update",
              "Remove",
              "Validation"
            ],
            "description": "Add / Update / Remove of a field value or document; Validation of a section or requirement"
          },
          "oldValue": {
            "type": "string",
            "nullable": true
          },
          "newValue": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackagingSpecification": {
        "type": "object",
        "description": "Packaging specification identity, status, version, contacts and\nchapter references. Every member the create accepts reads back here\nunder the same name, except the testing chapter (libraryLinkedChapters)\nand the packaging system (packaging).\n",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Cardboard Box - Organic Cereal 500g"
          },
          "templateId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "description": "The user of the owner company who owns the specification"
          },
          "supplierCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "languageCode": {
            "type": "string",
            "nullable": true,
            "example": "en-US"
          },
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/SpecificationStatus"
          },
          "sharedWithCompanyIds": {
            "type": "array",
            "readOnly": true,
            "description": "Companies with access to the specification: the owner always,\nthe supplier once the specification has been shared (POST .../share).\n",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "contacts": {
            "type": "array",
            "readOnly": true,
            "description": "Contacts of both parties",
            "items": {
              "$ref": "#/components/schemas/SpecificationPartyContact"
            }
          },
          "version": {
            "$ref": "#/components/schemas/ObjectVersion"
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "lastUpdateDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "signatures": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpecificationSignatures"
              }
            ],
            "nullable": true
          },
          "libraryLinkedChapters": {
            "type": "array",
            "readOnly": true,
            "description": "Library chapters linked to the specification (empty when none)",
            "items": {
              "$ref": "#/components/schemas/LinkedChapter"
            }
          },
          "packaging": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PackagingSystemReference"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "The linked packaging system; null when none is linked"
          }
        }
      },
      "PackagingSpecificationWithChapters": {
        "description": "Packaging specification read with the chapter content `include` asked\nfor. Each chapter property is present only when included; a chapter\nthe specification does not have reads null. Each value is the same\nshape as the matching chapter GET.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/PackagingSpecification"
          },
          {
            "type": "object",
            "properties": {
              "generalChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PackagingGeneralChapter"
                  }
                ],
                "nullable": true,
                "description": "include=general (or chapters). As PackagingSpecifications_GeneralChapter."
              },
              "attestationChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PackagingAttestationChapter"
                  }
                ],
                "nullable": true,
                "description": "include=attestation (or chapters). As PackagingSpecifications_AttestationChapter."
              },
              "testingChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PackagingTestingChapter"
                  }
                ],
                "nullable": true,
                "description": "include=testing (or chapters). As PackagingSpecifications_TestingChapter."
              },
              "packagingSystemChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PackagingSystemChapter"
                  }
                ],
                "nullable": true,
                "description": "include=packagingSystem (or chapters). As PackagingSpecifications_PackagingSystemChapter."
              }
            }
          }
        ]
      },
      "PackagingGeneralChapterWrite": {
        "type": "object",
        "description": "Write shape of the packaging general chapter. Company ids, their\nsignatory contacts and the version number derive from the\nspecification identity and are read-only. What is writable: the\nversion information (versionInfo), each party's subsidiary and\nadditional contacts, and the custom fields. Same party\nrules as FoodGeneralChapterWrite: the retailer section is written by\nthe specification owner only (a supplier caller sending a value in\nit gets a 422 naming the field); the supplier section by either\nparty. A section that is null or absent keeps what it holds.\n",
        "properties": {
          "versionInfo": {
            "$ref": "#/components/schemas/PackagingVersionWrite"
          },
          "retailer": {
            "$ref": "#/components/schemas/SpecificationPartyWrite"
          },
          "supplier": {
            "$ref": "#/components/schemas/SpecificationPartyWrite"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          }
        },
        "additionalProperties": false
      },
      "PackagingVersionWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section packaging_version. Either party may write it. Inside a\nsupplied section, null clears a field.\n",
        "properties": {
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true
          },
          "impactOnLabeling": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackagingAttestationChapterWrite": {
        "type": "object",
        "description": "Write shape of the attestation chapter. Full replace: a section that\nis null or absent is cleared. Either party may write every section.\nRead-only, and therefore absent here: the environment supplier\ncompany (copied from the general chapter's supplier section) and the\nESC critical point.\ncustomFields keeps its own rule, not the full replace: null or absent\n= not supplied, nothing changes (see CustomFields). The attestation\nchapter is not a library chapter, so a retailer template can place\ncustom components in it.\n",
        "properties": {
          "extendedProducerResponsibility": {
            "$ref": "#/components/schemas/ExtendedProducerResponsibilityWrite"
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentComplianceWrite"
          },
          "escStandards": {
            "$ref": "#/components/schemas/EscStandardsWrite"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          }
        },
        "additionalProperties": false
      },
      "ExtendedProducerResponsibilityWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section extended_producer_responsibility. supplierContributionText\nis kept only when supplierPaysContributionToEcoOrganization is true;\notherwise it is cleared.\n",
        "properties": {
          "supplierPaysContributionToEcoOrganization": {
            "type": "boolean",
            "nullable": true
          },
          "supplierContributionText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnvironmentComplianceWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section environment.",
        "properties": {
          "attestationOfCompliance": {
            "type": "boolean",
            "nullable": true
          },
          "packagingComplianceCertification": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EscStandardsWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section esc_standards. The critical point (read on EscStandards) is\ncleared when preventionByReductionAtSource is not true.\n",
        "properties": {
          "reUsage": {
            "type": "boolean",
            "nullable": true
          },
          "substanceRecycling": {
            "type": "boolean",
            "nullable": true
          },
          "energyReProcessing": {
            "type": "boolean",
            "nullable": true
          },
          "processingThroughCompostingAndBioDegradation": {
            "type": "boolean",
            "nullable": true
          },
          "dangerousSubstances": {
            "type": "boolean",
            "nullable": true
          },
          "heavyMetals": {
            "type": "boolean",
            "nullable": true
          },
          "companyCanProvideDocuments": {
            "type": "boolean",
            "nullable": true
          },
          "preventionByReductionAtSource": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemReference": {
        "type": "object",
        "description": "Reference to an existing packaging system (Packaging application).",
        "required": [
          "packagingSystemId"
        ],
        "properties": {
          "packagingSystemId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "PackagingGeneralChapter": {
        "type": "object",
        "description": "Read shape of the packaging general chapter, symmetric with\nPackagingGeneralChapterWrite: versionInfo holds what the write sends as\nversion; each party's subsidiaryCompanyId and additionalContacts are\nunder retailer / supplier, as written;\ncustomFields as written. A section the template disables is null.\n",
        "properties": {
          "versionInfo": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionInfo"
              }
            ],
            "nullable": true,
            "description": "Section packaging_version (written as version). null when the template disables it."
          },
          "retailer": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpecificationCompany"
              }
            ],
            "nullable": true,
            "description": "Section retailer. null when the template disables it."
          },
          "supplier": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpecificationCompany"
              }
            ],
            "nullable": true,
            "description": "Section supplier. null when the template disables it."
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Questionnaire"
            },
            "readOnly": true,
            "description": "Questionnaires attached to this chapter. Empty when there are none."
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter. null when there are none."
          }
        },
        "additionalProperties": false
      },
      "PackagingAttestationChapter": {
        "type": "object",
        "description": "Read shape of the attestation chapter, symmetric with\nPackagingAttestationChapterWrite (same section and field names). A\nsection the template disables is null; when the specification has no\nattestation chapter, every section is null.\n",
        "properties": {
          "extendedProducerResponsibility": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtendedProducerResponsibility"
              }
            ],
            "nullable": true
          },
          "environment": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/EnvironmentCompliance"
              }
            ],
            "nullable": true
          },
          "escStandards": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/EscStandards"
              }
            ],
            "nullable": true
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Questionnaire"
            },
            "readOnly": true,
            "description": "Questionnaires attached to this chapter. Empty when there are none."
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter. null when there are none."
          }
        },
        "additionalProperties": false
      },
      "ExtendedProducerResponsibility": {
        "type": "object",
        "description": "Section extended_producer_responsibility.",
        "properties": {
          "supplierPaysContributionToEcoOrganization": {
            "type": "boolean",
            "nullable": true
          },
          "supplierContributionText": {
            "type": "string",
            "nullable": true,
            "description": "null unless supplierPaysContributionToEcoOrganization is true."
          },
          "validations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationInfo"
            },
            "readOnly": true,
            "description": "Validations of this section. A caller that is not the\nspecification owner sees only the owner's validations and its own.\n"
          }
        },
        "additionalProperties": false
      },
      "EnvironmentCompliance": {
        "type": "object",
        "description": "Section environment.",
        "properties": {
          "attestationOfCompliance": {
            "type": "boolean",
            "nullable": true
          },
          "packagingComplianceCertification": {
            "type": "boolean",
            "nullable": true
          },
          "supplierCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The supplier company, taken from the general chapter's supplier section. Not writable."
          },
          "supplierSubsidiaryCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The supplier subsidiary, taken from the general chapter's supplier section. Not writable."
          },
          "validations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationInfo"
            },
            "readOnly": true,
            "description": "Validations of this section. A caller that is not the\nspecification owner sees only the owner's validations and its own.\n"
          }
        },
        "additionalProperties": false
      },
      "EscStandards": {
        "type": "object",
        "description": "Section esc_standards.",
        "properties": {
          "reUsage": {
            "type": "boolean",
            "nullable": true
          },
          "substanceRecycling": {
            "type": "boolean",
            "nullable": true
          },
          "energyReProcessing": {
            "type": "boolean",
            "nullable": true
          },
          "processingThroughCompostingAndBioDegradation": {
            "type": "boolean",
            "nullable": true
          },
          "dangerousSubstances": {
            "type": "boolean",
            "nullable": true
          },
          "heavyMetals": {
            "type": "boolean",
            "nullable": true
          },
          "companyCanProvideDocuments": {
            "type": "boolean",
            "nullable": true
          },
          "preventionByReductionAtSource": {
            "type": "boolean",
            "nullable": true
          },
          "criticalPointCode": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "The critical point code. Not writable through this API. null when\npreventionByReductionAtSource is not true, and cleared when it\nstops being true.\n"
          },
          "validations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationInfo"
            },
            "readOnly": true,
            "description": "Validations of this section. A caller that is not the\nspecification owner sees only the owner's validations and its own.\n"
          }
        },
        "additionalProperties": false
      },
      "PackagingTestingChapter": {
        "type": "object",
        "description": "Testing chapter of a packaging specification. The testing chapter is\none template across food and packaging: characteristics and control\nplans read in the shapes FoodTestingChapterWrite writes them, the\nsame as FoodTestingChapter. When no testing chapter is linked,\nchapterId, name, characteristics and controlPlans are null.\n",
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The library chapter linked to this specification."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Library display name of the chapter, as written on its create or replace."
          },
          "characteristics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Characteristic"
            },
            "nullable": true,
            "description": "The characteristics table, in table order. A characteristic with\nno photos reads with empty acceptedPhotoFileIds and\nrejectedPhotoFileIds lists.\n"
          },
          "controlPlans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ControlPlan"
            },
            "nullable": true,
            "description": "The control plans table, one row per controlled characteristic, in\nthe order of the characteristics table.\n"
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Questionnaire"
            },
            "nullable": true,
            "readOnly": true
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter by the specification."
          }
        },
        "additionalProperties": false
      },
      "Questionnaire": {
        "type": "object",
        "properties": {
          "questionnaireId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemChapter": {
        "type": "object",
        "description": "The packaging system linked to the specification. Every field is\nread-only: the system is attached with\nPackagingSpecifications_LinkPackagingSystem and its content lives in\nthe Packaging application. When no system is linked, packagingSystemId\nis null and sections is empty.\n",
        "properties": {
          "packagingSystemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "The linked packaging system (Packaging application)."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "null when the Packaging application does not return the system."
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "null when the Packaging application does not return the system."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackagingSystemSection"
            },
            "readOnly": true
          },
          "questionnaires": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackagingSystemQuestionnaire"
            },
            "readOnly": true,
            "description": "Questionnaires attached to this chapter. Empty when there are none."
          },
          "documents": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSection"
              }
            ],
            "nullable": true,
            "readOnly": true,
            "description": "Documents attached to this chapter. null when there are none."
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemSection": {
        "type": "object",
        "properties": {
          "sectionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "validations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationInfo"
            },
            "readOnly": true,
            "description": "Validations of this section of the packaging system, as the Packaging application reports them."
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemQuestionnaire": {
        "type": "object",
        "properties": {
          "questionnaireId": {
            "type": "string",
            "format": "uuid"
          },
          "packagingComponentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ValidationInfo": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "validatedOnUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MaterialCreateBase": {
        "type": "object",
        "description": "What every material type stores. commercialName is NOT here: additives and processing\naids have no commercial name, so the four types that do declare it themselves.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique per owning company (422 on duplicate, errorCode NAME_ALREADY_USED)"
          },
          "internalCode": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MaterialAllergensWrite": {
        "type": "object",
        "properties": {
          "present": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "unintentionallyPresent": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "MaterialCharacteristicWrite": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "characteristicId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Row identity, chosen by the caller. Only needed when a control plan\npoints at this row (controlPlans[].characteristicId); the same id\ntwice in the list is a 422 naming characteristics.\n"
          },
          "libraryCharacteristicId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The catalogue characteristic this row is taken from; name stays\nthe row's own label. An unknown id, or one that does not fit the\nrow's typeId, is a 422 naming characteristics.\n"
          },
          "name": {
            "type": "string"
          },
          "typeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "unitOfMeasureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0
          },
          "target": {
            "type": "number",
            "nullable": true
          },
          "lowerTarget": {
            "type": "number",
            "nullable": true
          },
          "upperTarget": {
            "type": "number",
            "nullable": true
          },
          "tolerance": {
            "type": "number",
            "nullable": true
          },
          "lowerTolerance": {
            "type": "number",
            "nullable": true
          },
          "upperTolerance": {
            "type": "number",
            "nullable": true
          },
          "precision": {
            "type": "number",
            "nullable": true
          },
          "nonConformity": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "nullable": true,
            "example": "Hourly"
          },
          "legalCriteria": {
            "type": "string",
            "nullable": true
          },
          "controlPhaseId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "acceptedPhotoFileIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Files of type \"characteristic photo\"."
          },
          "rejectedPhotoFileIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Same rule as acceptedPhotoFileIds."
          }
        },
        "additionalProperties": false
      },
      "MaterialControlPlanWrite": {
        "type": "object",
        "description": "One row of the material's control plans table. It controls the\ncharacteristic whose characteristicId it names. Type, name, control\nphase, target and tolerance come from the characteristic and are not\nsent here.\n\nRefused before anything is written:\n  * a characteristicId that matches no characteristic in the same\n    request: 422 naming controlPlans;\n  * two control plans for the same characteristicId: 422 naming\n    controlPlans;\n  * a control plan whose characteristic carries no controlPhaseId:\n    422 naming characteristics.\n",
        "required": [
          "characteristicId"
        ],
        "properties": {
          "characteristicId": {
            "type": "string",
            "format": "uuid"
          },
          "controlType": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "madeBy": {
            "type": "string",
            "nullable": true,
            "description": "Who performs the control. Free text, not an enum."
          },
          "frequency": {
            "type": "string",
            "nullable": true,
            "example": "Every batch"
          },
          "batchLotSize": {
            "type": "string",
            "nullable": true
          },
          "sampleSize": {
            "type": "string",
            "nullable": true
          },
          "criticity": {
            "type": "string",
            "nullable": true
          },
          "precision": {
            "type": "string",
            "nullable": true
          },
          "release": {
            "type": "boolean",
            "nullable": true
          },
          "registered": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MaterialAttachmentFileIds": {
        "type": "array",
        "nullable": true,
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Files uploaded through the document API and referenced here by id.\nEach must be owned by your company and be of type\n\"material-technical-datasheet\" (shown as Technical data sheet) or the\ndefault material type (shown as Other documents); anything else is a\n422 naming the field.\n"
      },
      "MaterialCertificateIds": {
        "type": "array",
        "nullable": true,
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Existing certificates, by id. An unknown id is a 422 naming the field.\n"
      },
      "MaterialSupplierWrite": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "internalCode": {
            "type": "string",
            "nullable": true
          },
          "origins": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "description": "One origin. The origin type decides which fields apply: a land-based type takes marketId, countryId, regionId and zoneId; a water-based type takes fishingZoneIds and fishingGearIds.\nRefused with a 422 naming suppliers: a field of the other kind; a regionId or zoneId without countryId; a zoneId without regionId; a country outside the market, or a region or zone outside the country (or the zone outside the region).\nCompleteness is checked when the material is locked, not on the create: a land-based origin needs marketId or countryId, and a water-based origin at least one fishingZoneId, before the material can be locked. The create accepts and publishes the material without them.",
              "required": [
                "originTypeId"
              ],
              "properties": {
                "originTypeId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Catalogue origin-type id. An unknown id is a 422 naming the field."
                },
                "marketId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "countryId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "regionId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "zoneId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "fishingZoneIds": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "FishingZones list"
                },
                "fishingGearIds": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "FishingGears list"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "MaterialSampleStorageWrite": {
        "type": "object",
        "description": "Sample storage conditions. Sending the object turns sample storage acceptance on for\nthe material; omitting it leaves the material with no sample storage.\n\nHumidity and temperature do not have the same precision, and the difference is the\ndomain's: SampleStorage.Humidity is a NumericRange of precision 0 and its temperature\na NumericRange of precision 1. So humidity is whole percents and temperature goes to a tenth,\nand both are stated here rather than left to be discovered against a 422.\n",
        "properties": {
          "storageConditionTemperatureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "temperatureUnitOfMeasureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "minimumTemperature": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.1,
            "description": "One decimal place; more is refused."
          },
          "maximumTemperature": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.1,
            "description": "One decimal place; more is refused. Must be greater than minimumTemperature."
          },
          "minimumHumidity": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Relative humidity of the storage conditions, in whole percents;\ndecimals are refused.\n"
          },
          "maximumHumidity": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Relative humidity of the storage conditions, in whole percents. Must be greater\nthan minimumHumidity.\n"
          },
          "keepAwayFromLight": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the samples must be kept away from light."
          },
          "size": {
            "type": "string",
            "nullable": true,
            "maxLength": 512
          },
          "duration": {
            "type": "string",
            "nullable": true,
            "maxLength": 512
          }
        },
        "additionalProperties": false
      },
      "FinishedProductSampleStorageWrite": {
        "type": "object",
        "description": "Sample storage conditions of the finished-product chapter's traceability section:\nthe fields of MaterialSampleStorageWrite without size and duration. Humidity is\nwhole percents and temperature goes to a tenth.\n",
        "properties": {
          "storageConditionTemperatureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "temperatureUnitOfMeasureId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "minimumTemperature": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.1,
            "description": "One decimal place; more is refused."
          },
          "maximumTemperature": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.1,
            "description": "One decimal place; more is refused. Must be greater than minimumTemperature."
          },
          "minimumHumidity": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Relative humidity of the storage conditions, in whole percents;\ndecimals are refused.\n"
          },
          "maximumHumidity": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Relative humidity of the storage conditions, in whole percents. Must be greater\nthan minimumHumidity.\n"
          },
          "keepAwayFromLight": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the samples must be kept away from light."
          }
        },
        "additionalProperties": false
      },
      "MaterialIngredientWrite": {
        "type": "object",
        "description": "One ingredient of a MADE-IN-HOUSE composite's recipe: a reference to an\nexisting material (leaf-first import order), and how much of it there is.\nAlso the ingredient shape of a production chapter's recipe (RecipeWrite),\nwhose own composite is made-in-house.\n\npercentage was missing and is the field that matters: Recipe.Validate()\nsums the percentage VALUES of the ingredients under each parent and\nrequires 100. With only a min and a max, every recipe created through\nthis API sat at 0% and could never pass material validation - published,\nbut never validatable. minPercentage and maxPercentage are the tolerance\naround it, not a substitute for it.\n\nA bought composite does NOT use this shape: its ingredients are declared\nby name, not referenced. See BoughtCompositeIngredientWrite.\n",
        "required": [
          "materialId"
        ],
        "properties": {
          "materialId": {
            "type": "string",
            "format": "uuid"
          },
          "percentage": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0,
            "maximum": 100,
            "description": "Share of the recipe, in percent. The ingredients under one parent\nmust total 100 for the composite to pass validation; the create\nitself does not refuse a recipe that does not (it publishes, and\nthe separate validate action reports the failure).\n"
          },
          "minPercentage": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0,
            "maximum": 100
          },
          "maxPercentage": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0,
            "maximum": 100
          },
          "functionId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Technological function of the ingredient in the recipe (reference list)."
          }
        },
        "additionalProperties": false
      },
      "RawMaterialCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MaterialCreateBase"
          },
          {
            "type": "object",
            "required": [
              "commercialName"
            ],
            "properties": {
              "commercialName": {
                "type": "string",
                "description": "Required: the material is published on create, and a published\nmaterial carries a commercial name.\n"
              },
              "gmoStatus": {
                "type": "boolean",
                "nullable": true
              },
              "ionizedStatus": {
                "type": "boolean",
                "nullable": true
              },
              "classificationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "materialStateCode": {
                "type": "string",
                "nullable": true
              },
              "partId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "allergens": {
                "$ref": "#/components/schemas/MaterialAllergensWrite"
              },
              "characteristics": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialCharacteristicWrite"
                }
              },
              "suppliers": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialSupplierWrite"
                }
              },
              "sampleStorage": {
                "$ref": "#/components/schemas/MaterialSampleStorageWrite"
              },
              "controlPlans": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialControlPlanWrite"
                }
              },
              "certificateIds": {
                "$ref": "#/components/schemas/MaterialCertificateIds"
              },
              "attachmentFileIds": {
                "$ref": "#/components/schemas/MaterialAttachmentFileIds"
              }
            }
          }
        ]
      },
      "AdditiveCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MaterialCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "standardizedNameId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "allergens": {
                "$ref": "#/components/schemas/MaterialAllergensWrite"
              },
              "characteristics": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialCharacteristicWrite"
                }
              },
              "suppliers": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialSupplierWrite"
                }
              },
              "sampleStorage": {
                "$ref": "#/components/schemas/MaterialSampleStorageWrite"
              },
              "controlPlans": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialControlPlanWrite"
                }
              },
              "attachmentFileIds": {
                "$ref": "#/components/schemas/MaterialAttachmentFileIds"
              }
            }
          }
        ]
      },
      "ProcessingAidCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AdditiveCreateRequest"
          }
        ]
      },
      "FlavorCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MaterialCreateBase"
          },
          {
            "type": "object",
            "required": [
              "commercialName",
              "flavorType"
            ],
            "properties": {
              "commercialName": {
                "type": "string",
                "description": "Required: the material is published on create, and a published\nmaterial carries a commercial name.\n"
              },
              "flavorType": {
                "type": "string",
                "description": "Required: it is set once at creation and can never be changed afterwards,\nand flavour vs smoke flavouring is a distinct regulatory category.\n",
                "enum": [
                  "flavor",
                  "smokeFlavor"
                ]
              },
              "allergens": {
                "$ref": "#/components/schemas/MaterialAllergensWrite"
              },
              "characteristics": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialCharacteristicWrite"
                }
              },
              "suppliers": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialSupplierWrite"
                }
              },
              "sampleStorage": {
                "$ref": "#/components/schemas/MaterialSampleStorageWrite"
              },
              "controlPlans": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialControlPlanWrite"
                }
              },
              "certificateIds": {
                "$ref": "#/components/schemas/MaterialCertificateIds"
              },
              "attachmentFileIds": {
                "$ref": "#/components/schemas/MaterialAttachmentFileIds"
              }
            }
          }
        ]
      },
      "BoughtCompositeIngredientWrite": {
        "type": "object",
        "description": "One declared ingredient. What it carries besides the name depends on its\ntype, and a member that does not belong to the type is a 422 naming it:\n\n  rawMaterial    classificationId (required)\n  additive       substanceId (required), substanceFunctionId (required)\n  processingAid  substanceId (required), substanceFunctionId (optional)\n  flavor         flavorType (required)\n  composite      ingredients (its children)\n\nOnly a composite ingredient may carry children; children on anything\nelse is a 422 naming the entry.\n",
        "required": [
          "type",
          "name"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "rawMaterial",
              "additive",
              "processingAid",
              "flavor",
              "composite"
            ]
          },
          "name": {
            "type": "string",
            "description": "Free text, as the supplier states it. This is the ingredient's\nidentity here - there is no library material behind it.\n"
          },
          "percentage": {
            "type": "number",
            "nullable": true,
            "multipleOf": 0.001,
            "minimum": 0,
            "maximum": 100,
            "description": "Share of the recipe, in percent. Same rule as a made composite's."
          },
          "classificationId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "rawMaterial only, and required for it. Raw-material classification\n(Catalogue). An id that is not a raw-material classification is\nrefused.\n"
          },
          "substanceId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "additive and processingAid only, required for both. Catalogue substance."
          },
          "substanceFunctionId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Technological function of the substance. Required for an\nadditive, optional for a processing aid.\n"
          },
          "flavorType": {
            "type": "string",
            "enum": [
              "flavor",
              "smokeFlavor"
            ],
            "nullable": true,
            "description": "flavor only, and required for it. Same two values as the flavor\nlibrary create: a smoke flavouring is a different subtype.\n"
          },
          "allergens": {
            "$ref": "#/components/schemas/IngredientAllergensWrite"
          },
          "ingredients": {
            "type": "array",
            "nullable": true,
            "description": "composite only: the children of a sub-composite, same shape,\nnested to any depth.\n",
            "items": {
              "$ref": "#/components/schemas/BoughtCompositeIngredientWrite"
            }
          }
        },
        "additionalProperties": false
      },
      "IngredientAllergensWrite": {
        "type": "object",
        "description": "The allergens this ingredient brings, and how. Both lists hold allergen\nids that must also appear in the composite's allergenIds - an id used here and\nnot declared there is a 422 naming this entry. An \"inherited\" flag\nper ingredient declaration, set when a sub-composite brings the\nallergen up, is derived and absent from this shape.\n",
        "properties": {
          "present": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "unintentionallyPresent": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "BoughtCompositeCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MaterialCreateBase"
          },
          {
            "type": "object",
            "required": [
              "commercialName"
            ],
            "properties": {
              "commercialName": {
                "type": "string",
                "description": "Required: the material is published on create, and a published\nmaterial carries a commercial name.\n"
              },
              "derivedFromGmo": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the composite is derived from GMO. It drives the GMO\nrisk analysis downstream when this composite is used in a recipe.\n"
              },
              "allergenIds": {
                "type": "array",
                "nullable": true,
                "description": "The allergens the composite declares. An allergen may be\ndeclared here and attributed to no ingredient, but an\nallergen an\ningredient names must appear here.\n",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "characteristics": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialCharacteristicWrite"
                }
              },
              "suppliers": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialSupplierWrite"
                }
              },
              "sampleStorage": {
                "$ref": "#/components/schemas/MaterialSampleStorageWrite"
              },
              "controlPlans": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialControlPlanWrite"
                }
              },
              "certificateIds": {
                "$ref": "#/components/schemas/MaterialCertificateIds"
              },
              "attachmentFileIds": {
                "$ref": "#/components/schemas/MaterialAttachmentFileIds"
              },
              "ingredients": {
                "type": "array",
                "nullable": true,
                "description": "The declared recipe, as a tree. See BoughtCompositeIngredientWrite.",
                "items": {
                  "$ref": "#/components/schemas/BoughtCompositeIngredientWrite"
                }
              }
            }
          }
        ]
      },
      "MadeCompositeCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MaterialCreateBase"
          },
          {
            "type": "object",
            "description": "In-house composite - name, recipe, sample storage, characteristics, control plans and attachments; allergens and origins derive from the recipe",
            "required": [
              "commercialName"
            ],
            "properties": {
              "commercialName": {
                "type": "string",
                "description": "Required: the material is published on create, and a published\nmaterial carries a commercial name.\n"
              },
              "sampleStorage": {
                "$ref": "#/components/schemas/MaterialSampleStorageWrite"
              },
              "characteristics": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialCharacteristicWrite"
                }
              },
              "controlPlans": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialControlPlanWrite"
                }
              },
              "attachmentFileIds": {
                "$ref": "#/components/schemas/MaterialAttachmentFileIds"
              },
              "ingredients": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/MaterialIngredientWrite"
                }
              }
            }
          }
        ]
      },
      "MaterialCreated": {
        "type": "object",
        "properties": {
          "materialId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "MaterialShareRequest": {
        "type": "object",
        "description": "Optional body. The owner company is always granted, with or without it.",
        "properties": {
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Companies to grant access to IN ADDITION to the owner company,\nwhich every share grants. Absent or empty = the owner only.\nAll of them are granted or none is: an unknown id is refused\nnaming the field, and nothing is written before the refusal.\n"
          }
        },
        "additionalProperties": false
      },
      "LibraryChapterShareRequest": {
        "type": "object",
        "description": "Optional body. The owner company is always granted, with or without it.",
        "properties": {
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Companies to grant access to IN ADDITION to the owner company,\nwhich every share grants. Absent or empty = the owner only.\nAll of them are granted or none is: an unknown id is refused\nnaming the field, and nothing is written before the refusal.\n"
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireTemplateView": {
        "type": "object",
        "description": "Design-time view of a published questionnaire template (PS-created).\nDraft and archived templates are not returned.\n",
        "properties": {
          "questionnaireTemplateId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "questionnaireType": {
            "type": "string",
            "enum": [
              "Specification",
              "IngredientDeclarationTerm",
              "PackagingComponent"
            ],
            "description": "What the instances are answered for — a specification, an ingredient declaration term, or a packaging component"
          },
          "chapterType": {
            "type": "string",
            "enum": [
              "general",
              "production",
              "conditioning",
              "packaging",
              "testing",
              "finishedProduct",
              "labelling"
            ],
            "description": "The chapter the instances attach to when linked"
          },
          "languageCode": {
            "type": "string",
            "description": "The template's language; question texts and option labels are in it when translated"
          },
          "questions": {
            "type": "array",
            "description": "Every question, dependent questions included, in answers-schema order",
            "items": {
              "$ref": "#/components/schemas/QuestionnaireQuestion"
            }
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireQuestion": {
        "type": "object",
        "properties": {
          "questionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Stable question identifier"
          },
          "code": {
            "type": "string",
            "description": "The key of this question in the answers document: a generated\nname (question1, question2, …), stable for the published template\nbut carrying no business meaning — map questions through\nquestionId or text. A question that other questions depend on is\nstored with its dependants inside a condition object (see the\nanswers schema for the exact nesting).\n"
          },
          "text": {
            "type": "string",
            "description": "The question label shown to the user"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Descriptive help text under the question — integrators use it\nas a mapping key (NPAS 236775).\n"
          },
          "valueType": {
            "type": "string",
            "enum": [
              "boolean",
              "string",
              "array"
            ],
            "description": "Answer type: boolean for yes/no, string for free text or a single\noption code, array of option codes for multi-choice (the answers\nschema is the authoritative contract)\n"
          },
          "required": {
            "type": "boolean",
            "description": "Must be answered for the questionnaire to validate. For a\ndependent question, only when it applies (see dependsOn).\n"
          },
          "options": {
            "type": "array",
            "nullable": true,
            "description": "Allowed values for choice questions",
            "items": {
              "$ref": "#/components/schemas/QuestionnaireQuestionOption"
            }
          },
          "dependsOn": {
            "type": "object",
            "nullable": true,
            "description": "Set on a dependent question: it applies only when the parent\nquestion's answer is one of answers. null for a top-level question.\n",
            "properties": {
              "questionId": {
                "type": "string",
                "format": "uuid",
                "description": "The parent question"
              },
              "answers": {
                "type": "array",
                "description": "The parent answers (boolean or option code) that show this question",
                "items": {
                  "oneOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "QuestionnaireQuestionOption": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The value stored in the answers document"
          },
          "label": {
            "type": "string",
            "description": "Display label in the requested language"
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireQuestionWithAnswer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QuestionnaireQuestion"
          },
          {
            "type": "object",
            "properties": {
              "answer": {
                "nullable": true,
                "description": "The current answer value, conforming to the template's\nanswers schema (GET .../answers-schema): boolean for yes/no\nquestions, an option code for single-choice, an array of\noption codes for multi-choice, a plain string for free\ntext. Null or absent = unanswered.\n"
              }
            }
          }
        ]
      },
      "QuestionnaireView": {
        "type": "object",
        "description": "A questionnaire instance with its questions and current answers.\nReturned by the instance GET and, as a list, by the spec-scoped\nprojection (GET .../specifications/{id}/questionnaires).\n",
        "properties": {
          "questionnaireId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "questionnaireTemplateId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "chapterType": {
            "type": "string",
            "description": "Chapter placement, derived from the template: general,\nproduction, finishedProduct, labelling (packaging templates\nadd their own types)\n"
          },
          "languageCode": {
            "type": "string"
          },
          "isLocked": {
            "type": "boolean",
            "description": "True once a linked specification entered signature — answers\ncan no longer be written\n"
          },
          "associatedMaterialId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "associatedPackagingComponentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuestionnaireQuestionWithAnswer"
            }
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireInstanceCreate": {
        "type": "object",
        "required": [
          "questionnaireTemplateId"
        ],
        "properties": {
          "questionnaireTemplateId": {
            "type": "string",
            "format": "uuid"
          },
          "shareWithCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Grants this company sharing access to the instance at creation"
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireInstanceCreated": {
        "type": "object",
        "properties": {
          "questionnaireId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "QuestionnaireAnswers": {
        "type": "object",
        "description": "The answers document. Keys are question codes (generated names, see\nQuestionnaireQuestion.code), values are validated against the\ntemplate's answers schema (GET .../answers-schema).\n",
        "additionalProperties": true
      },
      "QuestionnaireReference": {
        "type": "object",
        "description": "Reference to an existing questionnaire instance. questionnaireId\nmust be the only property — chapter placement derives from the\nquestionnaire's template server-side.\n",
        "required": [
          "questionnaireId"
        ],
        "properties": {
          "questionnaireId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "FoodSpecificationCreateRequest": {
        "type": "object",
        "description": "Atomic create. Identity + folder placement + composition chapters\n(general/labelling) inline + ChapterReference slots for library\nchapters created beforehand at their own /library/ address.\n",
        "required": [
          "tradeItemId",
          "supplierId",
          "templateId",
          "languageCode"
        ],
        "properties": {
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The user of your company who owns the specification and becomes its retailer contact.\nOptional when your credentials identify a user: that user is\ntaken, and a person may only name themselves (naming anyone else\nis a 403). Required when your credentials carry no user. The\ncompany always binds from your credentials, never from the\npayload.\n"
          },
          "tradeItemId": {
            "type": "string",
            "format": "uuid"
          },
          "supplierId": {
            "type": "string",
            "format": "uuid"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "Your company's published specification template — communicated at onboarding\nby Professional Services. It must be owned by your company, published and in\nits active version.\n"
          },
          "languageCode": {
            "type": "string",
            "example": "en-US"
          },
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Placement at creation; move later via PUT .../folder"
          },
          "generalChapter": {
            "$ref": "#/components/schemas/FoodGeneralChapterWrite"
          },
          "labellingChapter": {
            "$ref": "#/components/schemas/FoodLabellingChapterWrite"
          },
          "productionChapter": {
            "$ref": "#/components/schemas/ChapterReference"
          },
          "testingChapter": {
            "$ref": "#/components/schemas/ChapterReference"
          },
          "finishedProductChapter": {
            "$ref": "#/components/schemas/ChapterReference"
          },
          "requirements": {
            "type": "array",
            "nullable": true,
            "description": "References to PRE-CREATED requirements (PS-owned library objects),\nattached per chapter at creation — same containment rule as\nchapter references. Changed afterwards with\nFoodSpecifications_PutChapterRequirements. Duplicates: repeating an id within a\nchapter type is tolerated (attached once); the same id under\ntwo DIFFERENT chapter types rejects the whole create (422).\n",
            "items": {
              "type": "object",
              "required": [
                "chapterType",
                "requirementIds"
              ],
              "properties": {
                "chapterType": {
                  "type": "string"
                },
                "requirementIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          },
          "documents": {
            "type": "array",
            "nullable": true,
            "description": "Files uploaded beforehand through the document API, attached per\nchapter at creation, by the same rules as\nFoodSpecifications_PutChapterDocuments. Changed afterwards with that\nendpoint. Repeating an id within a chapter type is tolerated\n(attached once); the same id under two DIFFERENT chapter types\nrejects the whole create (422).\n",
            "items": {
              "type": "object",
              "required": [
                "chapterType",
                "fileIds"
              ],
              "properties": {
                "chapterType": {
                  "type": "string"
                },
                "fileIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          },
          "questionnaires": {
            "type": "array",
            "nullable": true,
            "description": "Not accepted: sending it is a 400, never a silent drop.\nQuestionnaires are attached automatically at creation, one\ninstance per published questionnaire template matching the\nspecification.\n",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "ChapterReference": {
        "type": "object",
        "description": "Reference to an existing library chapter. The specification links the\nchapter's current ACTIVE version and shares that same document with\nevery other linked specification: in-place content updates (the\nlibrary PUT) are seen by all of them immediately. A NEW chapter\nversion does not propagate — a spec adopts it by explicit re-link\n(the .../link endpoints). The referenced chapter must be a PUBLISHED,\nACTIVE version owned by your company (422 otherwise). chapterId must\nbe the ONLY property in the slot: \"link this chapter AND change it\" is two actions — this call does one.\n",
        "required": [
          "chapterId"
        ],
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "LibraryChapterCreated": {
        "type": "object",
        "description": "Result of a standalone library-chapter create: the chapter is\npublished and immediately referenceable from specification creates\nand link endpoints.\n",
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "FoodSpecificationCreated": {
        "type": "object",
        "description": "Result of the atomic create. Library chapter ids are already known to\nthe caller (chapters are created first at their /library/ address).\n",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "PackagingSpecificationCreateRequest": {
        "type": "object",
        "description": "Atomic create for a packaging specification. Identity plus\nChapterReference slots for library items created beforehand. No tradeItemId,\nfolderId or requirements: packaging specifications refuse all three\n(400 on unknown members).\n",
        "required": [
          "name",
          "supplierId",
          "templateId",
          "languageCode"
        ],
        "properties": {
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The user of your company who owns the specification and becomes its retailer contact.\nOptional when your credentials identify a user: that user is\ntaken, and a person may only name themselves (naming anyone else\nis a 403). Required when your credentials carry no user. The\ncompany always binds from your credentials, never from the\npayload.\n"
          },
          "name": {
            "type": "string",
            "description": "The specification name, chosen by the caller"
          },
          "supplierId": {
            "type": "string",
            "format": "uuid"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "Your company's published specification template — communicated at onboarding\nby Professional Services. It must be owned by your company, published and in\nits active version.\n"
          },
          "languageCode": {
            "type": "string",
            "example": "en-US"
          },
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true
          },
          "testingChapter": {
            "$ref": "#/components/schemas/ChapterReference"
          },
          "packagingSystemChapter": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ChapterReference"
              }
            ],
            "description": "Reference to a packaging system. Not accepted yet: sending the\nmember is a 400, never a silent drop.\n"
          },
          "questionnaires": {
            "type": "array",
            "nullable": true,
            "description": "Not accepted: sending it is a 400, never a silent drop.\nQuestionnaires are attached automatically at creation, one\ninstance per matching published template.\n",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "PackagingSpecificationCreated": {
        "type": "object",
        "description": "Result of the atomic create.",
        "properties": {
          "specificationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "FoodSpecificationWithChapters": {
        "description": "Food specification read with the content `include` asked for. Each\ncontent property is present only when included; a chapter the\nspecification does not have reads null. Each value is the same shape\nas the matching GET.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/FoodSpecification"
          },
          {
            "type": "object",
            "properties": {
              "generalChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FoodGeneralChapter"
                  }
                ],
                "nullable": true,
                "description": "include=general (or chapters). As FoodSpecifications_GeneralChapter."
              },
              "labellingChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FoodLabellingChapter"
                  }
                ],
                "nullable": true,
                "description": "include=labelling (or chapters). As FoodSpecifications_LabellingChapter."
              },
              "productionChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FoodProductionChapter"
                  }
                ],
                "nullable": true,
                "description": "include=production (or chapters). As\nFoodSpecifications_ProductionChapter: one entry per linked\nproduction chapter (several on an assortment specification).\n"
              },
              "testingChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FoodTestingChapter"
                  }
                ],
                "nullable": true,
                "description": "include=testing (or chapters). As FoodSpecifications_TestingChapter."
              },
              "finishedProductChapter": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FoodFinishedProductChapter"
                  }
                ],
                "nullable": true,
                "description": "include=finishedProduct (or chapters). As FoodSpecifications_FinishedProductChapter."
              },
              "customChapters": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CustomChapter"
                },
                "description": "include=customChapters (or chapters). One entry per custom\nchapter of the specification's template, as\nFoodSpecifications_CustomChapter. Empty when there are none.\n"
              },
              "questionnaires": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QuestionnaireView"
                },
                "description": "include=questionnaires. As FoodSpecifications_GetQuestionnaires."
              },
              "requirements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SpecificationRequirement"
                },
                "description": "include=requirements. As FoodSpecifications_Requirements."
              }
            }
          }
        ]
      },
      "SpecificationStatus": {
        "type": "string",
        "readOnly": true,
        "description": "Lifecycle status of a specification version. Draft: not yet in\nprogress. InProgress: being filled. ValidatedBySupplier /\nValidatedByRetailer: validated by that party. LockedForSupplierSignature /\nLockedForRetailerSignature: locked while that party signs.\nSignedBySupplier / SignedByRetailer: signed by that party.\nInRevisionBySupplier / InRevisionByRetailer: reopened for revision by\nthat party.\n",
        "enum": [
          "Draft",
          "InProgress",
          "ValidatedBySupplier",
          "ValidatedByRetailer",
          "LockedForSupplierSignature",
          "LockedForRetailerSignature",
          "SignedBySupplier",
          "SignedByRetailer",
          "InRevisionBySupplier",
          "InRevisionByRetailer"
        ]
      },
      "SpecificationPartyContact": {
        "type": "object",
        "readOnly": true,
        "description": "A contact of the specification. The entries with your company's\nparty and fromCollaboration false are exactly the list that\nPUT .../contacts replaces and returns.\n",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "User (from the CUMD public API). Null for a collaboration invitation not yet accepted."
          },
          "party": {
            "type": "string",
            "enum": [
              "Retailer",
              "Supplier",
              "Translator",
              "Other"
            ],
            "description": "The party the contact works for on this specification"
          },
          "isSignatory": {
            "type": "boolean",
            "description": "True when the contact signs the specification for its party"
          },
          "fromCollaboration": {
            "type": "boolean",
            "description": "True when the contact comes from a supplier collaboration (invitation, pending or accepted); PUT .../contacts neither returns nor changes it"
          }
        },
        "additionalProperties": false
      },
      "ModificationRequestPagedList": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModificationRequest"
            }
          },
          "totalCount": {
            "type": "integer"
          },
          "pageNumber": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "FoodVersionInfo": {
        "type": "object",
        "nullable": true,
        "description": "Version section of the food general chapter. A field the template\nhides is null. reasonForThisVersion receives the create request's\nreasonForThisVersion.\n",
        "properties": {
          "reasonForThisVersion": {
            "type": "string",
            "nullable": true,
            "description": "Reason for the current specification version/revision"
          },
          "impactOnLabeling": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether this version has impact on labeling"
          },
          "firstBatchNumber": {
            "type": "string",
            "nullable": true,
            "description": "First production batch number of this version"
          },
          "lastBatchNumber": {
            "type": "string",
            "nullable": true,
            "description": "Last production batch number of this version"
          },
          "firstProductionDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "First production date of this version"
          },
          "lastProductionDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Last production date of this version"
          }
        },
        "additionalProperties": false
      },
      "TemplateStructureChapter": {
        "type": "object",
        "properties": {
          "chapterType": {
            "type": "string",
            "description": "Standard chapter type (food: general, labelling, production,\ntesting, finishedProduct; packaging: general, attestation,\ntesting, packagingSystem) or a retailer-defined custom chapter\ncode. The value the chapterType path parameters take.\n"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isLibraryChapter": {
            "type": "boolean",
            "description": "Library chapters are linked entities (written at /library/...); non-library chapters are spec-embedded"
          },
          "custom": {
            "type": "boolean",
            "description": "true for a retailer-defined custom chapter (read and written at .../custom-chapters/{chapterType})"
          },
          "hasCustomFields": {
            "type": "boolean",
            "description": "true when the chapter carries custom fields — fetch .../custom-fields-schema for their schema"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateStructureSection"
            }
          }
        },
        "additionalProperties": false
      },
      "TemplateStructureSection": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable section code (CustomFieldsEntry.sectionCode for custom fields)"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "payloadField": {
            "type": "string",
            "nullable": true,
            "description": "The chapter payload property that carries this section's data.\nnull for a section without a typed property: its data, if any,\ntravels in customFields.\n"
          },
          "mandatory": {
            "type": "boolean",
            "description": "true = the retailer cannot disable this section"
          },
          "visible": {
            "type": "boolean",
            "description": "false = disabled by the retailer — absent from reads, rejected on writes"
          },
          "custom": {
            "type": "boolean",
            "description": "true for a retailer-defined section"
          },
          "customComponentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Custom components placed in this section\n(CustomFieldsSchema.components[].componentId); empty when none.\n"
          }
        },
        "additionalProperties": false
      },
      "LibraryFoodProductionChapter": {
        "type": "object",
        "description": "Read shape of ONE library production chapter (active version), the\ncounterpart of FoodProductionChapterWrite: the same four sections\n(sites / recipe / nutrition / allergens) and name, under the same\nnames, plus server-derived values marked readOnly. A GET of this shape\nwith its readOnly members removed is a valid PUT body.\n",
        "properties": {
          "chapterId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Library display name of the chapter."
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionSite"
            },
            "nullable": true
          },
          "recipe": {
            "$ref": "#/components/schemas/RecipeRead"
          },
          "nutrition": {
            "$ref": "#/components/schemas/NutritionalInformation"
          },
          "allergens": {
            "$ref": "#/components/schemas/AllergenDeclarationRead"
          }
        },
        "required": [
          "chapterId",
          "name"
        ],
        "additionalProperties": false
      },
      "ServingSizeRead": {
        "type": "object",
        "readOnly": true,
        "description": "Default serving portion of the nutrition table. Read only on a\nproduction chapter; the labelling chapter copies it as its default\nserving.\n",
        "properties": {
          "value": {
            "type": "number",
            "nullable": true,
            "example": 100
          },
          "massUnitId": {
            "type": "string",
            "format": "uuid",
            "description": "Mass unit of the portion (gram unless set otherwise)."
          },
          "volumeUnitId": {
            "type": "string",
            "format": "uuid",
            "description": "Volume unit of the portion (millilitre unless set otherwise)."
          },
          "servingTypeCode": {
            "type": "string",
            "nullable": true
          },
          "servingTypeDescription": {
            "type": "string",
            "nullable": true,
            "description": "Free text, present only for a serving type that asks for one."
          }
        },
        "additionalProperties": false
      },
      "CustomFields": {
        "type": "array",
        "nullable": true,
        "description": "Custom field VALUES, one entry per custom component of the chapter.\nThe template places retailer-defined custom components in the\nchapter; each component is a group of fields with its own published\nJSON Schema, listed by GET /v2/public/templates/{templateId}/chapters/\n{chapterType}/custom-fields-schema. A published component never\nchanges, and the same componentId is valid in every template that\nuses it.\n\nWRITE RULES\n  * An entry replaces the values of its component: a field the values\n    object does not carry is cleared. A component the array does not\n    carry keeps what it holds. null or absent = not supplied.\n  * An entry is addressed by componentId. sectionCode is needed only\n    when the component appears in more than one section of the\n    chapter; without it, that is a 422 naming the missing field,\n    customFields[i].sectionCode.\n  * A componentId (or componentId + sectionCode) that is not in the\n    chapter, or the same one twice: 422 naming the entry.\n  * To change one field, read the entry, change it and send the\n    whole values object back, with If-Match: the ETag of the\n    chapter read. Without it, an edit made in between by the\n    counterpart company is overwritten.\n  * values is validated against the component's JSON Schema (types,\n    formats, bounds, reference-list items, files owned by your\n    company). A refusal is a 422 naming the field,\n    `customFields[i].values.<field>`.\n  * Mandatory fields (CustomFieldsSchema mandatoryFields) are not\n    checked on write; they are checked when the section is validated.\n  * Who may write follows the section that holds the component: in a\n    custom section either party may write; in a standard section the\n    section's own rule applies (e.g. retailer or supplier sections of\n    the general chapter: owner company only).\nA read returns one entry per custom component of the chapter, with\nsectionCode always set.\n",
        "items": {
          "$ref": "#/components/schemas/CustomFieldsEntry"
        }
      },
      "CustomFieldsEntry": {
        "type": "object",
        "required": [
          "componentId",
          "values"
        ],
        "properties": {
          "componentId": {
            "type": "string",
            "format": "uuid",
            "description": "The custom component (CustomFieldsSchema.components[].componentId)."
          },
          "sectionCode": {
            "type": "string",
            "nullable": true,
            "description": "The section that holds the component. Needed on a write only\nwhen the component appears in more than one section of the\nchapter; missing then, it is a 422 on this field.\n"
          },
          "values": {
            "type": "object",
            "additionalProperties": true,
            "description": "The component's field values, keyed by field name (camelCase, as\nin the component's JSON Schema). Shapes follow that schema:\n  * reference-list value: the item id (an array of ids when the\n    list is multi-select). Items are resolved through the\n    Reference Data API (list id in the schema's x-referenceList).\n  * file field: an array of file ids. Files are uploaded\n    beforehand through the document API and must belong to your\n    company.\n  * measure: { value, unitId }, unitId being a unit of the\n    reference list named in the schema.\n  * date: YYYY-MM-DD.\nA field absent from the object, or null, is empty.\n"
          }
        },
        "additionalProperties": false
      },
      "CustomFieldsSchema": {
        "type": "object",
        "description": "The custom components a template places in one chapter type.",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid"
          },
          "chapterType": {
            "type": "string"
          },
          "components": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "componentId": {
                  "type": "string",
                  "format": "uuid"
                },
                "componentName": {
                  "type": "string"
                },
                "sectionCode": {
                  "type": "string"
                },
                "sectionName": {
                  "type": "string",
                  "nullable": true
                },
                "mandatoryFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Field names that must be filled for the section to pass\nvalidation. Not checked on write.\n"
                },
                "jsonSchema": {
                  "type": "object",
                  "description": "JSON Schema (draft-07) of the component's values object,\nprojected from the published component:\n  * properties keyed by field name, each with title (the\n    field label, in languageCode), type, format (date,\n    email, uuid), bounds (minimum, maximum, maxLength,\n    multipleOf) and, for rich text, contentMediaType\n    text/html;\n  * required lists STRUCTURAL rules only (e.g. a measure\n    carries both value and unitId). Like mandatoryFields,\n    they are checked when the section is validated, not\n    on write: send both, but a value read back may still\n    be partial (a measure without its unitId);\n    business-mandatory fields are in mandatoryFields;\n  * a reference-list field (and a measure's unitId)\n    carries x-referenceList: { listId, parentItemIds }; its\n    items are not listed here — resolve them through the\n    Reference Data API;\n  * a file field is an array of uuid with\n    x-fileTypeName, the document type its files must have.\nInternal keywords of the stored schema are not exposed.\nThe dialect stays draft-07, the version the platform\nvalidates writes with. A newer dialect would only ever be\noffered as an opt-in (an optional query parameter); the\ndefault never changes.\n",
                  "example": {
                    "$schema": "http://json-schema.org/draft-07/schema#",
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "auditScore": {
                        "title": "Audit score",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "comment": {
                        "title": "Comment",
                        "type": "string",
                        "maxLength": 60
                      },
                      "origin": {
                        "title": "Country of origin",
                        "type": "string",
                        "format": "uuid",
                        "x-referenceList": {
                          "listId": "3b0c2a5e-6f1d-4c2b-9a7e-0d5f8e1a2b3c",
                          "parentItemIds": []
                        }
                      },
                      "certificates": {
                        "title": "Certificates",
                        "type": "array",
                        "x-fileTypeName": "Certificate",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "netWeight": {
                        "title": "Net weight",
                        "type": "object",
                        "required": [
                          "value",
                          "unitId"
                        ],
                        "properties": {
                          "value": {
                            "type": "number",
                            "multipleOf": 0.01
                          },
                          "unitId": {
                            "type": "string",
                            "format": "uuid",
                            "x-referenceList": {
                              "listId": "9e4d1c7b-2a3f-4b8e-8c6d-5f0a1b2c3d4e",
                              "parentItemIds": [
                                "1f2e3d4c-5b6a-4978-8695-a4b3c2d1e0f9"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "TemplateStructure": {
        "type": "object",
        "description": "Design-time view of a retailer template's shape. Chapters the\nretailer hid are absent; sections the retailer disabled are listed\nwith visible false.\n",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "templateType": {
            "type": "string",
            "enum": [
              "Food",
              "PetFood",
              "Packaging",
              "FruitsAndVegetable",
              "Formula",
              "BabyFood",
              "FoodSupplement"
            ]
          },
          "chapters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateStructureChapter"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomChapterWrite": {
        "type": "object",
        "description": "Write shape of a retailer-defined custom chapter: its entire content\nis custom fields (a custom chapter has no standard fields). Validated\nagainst the template's custom-fields schema for this chapterType.\n",
        "required": [
          "customFields"
        ],
        "properties": {
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          }
        },
        "additionalProperties": false
      },
      "CustomChapter": {
        "type": "object",
        "description": "Read shape of a retailer-defined custom chapter. Its content is\ncustom fields only (written through CustomChapterWrite); requirements\nand documents are references attached at the specification level.\n",
        "properties": {
          "chapterType": {
            "type": "string",
            "description": "Retailer-defined custom chapter type code",
            "readOnly": true
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            },
            "nullable": true
          },
          "documents": {
            "$ref": "#/components/schemas/DocumentSection"
          }
        },
        "additionalProperties": false
      },
      "FoodGeneralChapterWrite": {
        "type": "object",
        "description": "Write shape of the general chapter — deliberately small, because almost\neverything this chapter shows is derived: the whole product / trade-item block is\nfilled from the trade item the specification points at, and the company\ncompany ids, their signatory contacts and versionInfo derive from the\nspecification identity. Product identity is therefore READ-ONLY here (see FoodProduct):\nit changes by changing the specification's tradeItemId, never through a\nchapter payload. Production sites are a PRODUCTION chapter section. Requirements and\nquestionnaires attach at the specification level (create references),\nnever inside chapter payloads.\nWhat remains writable: each party's subsidiary and additional\ncontacts, and the custom fields (either party).\n",
        "properties": {
          "retailer": {
            "$ref": "#/components/schemas/SpecificationPartyWrite"
          },
          "supplier": {
            "$ref": "#/components/schemas/SpecificationPartyWrite"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          }
        },
        "additionalProperties": false
      },
      "SpecificationPartyWrite": {
        "type": "object",
        "nullable": true,
        "description": "The writable part of a party's section of the general chapter. null\nor absent means the section is not supplied: the chapter keeps what it\nholds. The retailer section is written by the specification owner\nonly: a supplier caller sending a value in it gets a 422 naming the\nfield. The supplier section is written by either party.\n",
        "properties": {
          "subsidiaryCompanyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "A subsidiary of the party's company (from the CUMD public API).\nInside a supplied section, null clears it; absent keeps what the\nchapter holds.\n"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalContact"
            },
            "nullable": true,
            "description": "The party's additional contacts: contacts of that party's company\n(from the CUMD public API). Full replace: an omitted entry is\nremoved, [] clears the list. null or absent keeps the list. The\nretailer's list is written by the specification owner only; the\nsupplier's list by either party, so the retailer can fill it on\nthe create.\n"
          }
        },
        "additionalProperties": false
      },
      "FoodProductionChapterWrite": {
        "type": "object",
        "description": "Write shape of ONE library production chapter, in four sections:\nsites / recipe / nutrition / allergens. A library chapter is one\ndocument and cannot contain other chapters; the assortment view of a\nspecification's linked production chapters (linkedChapterId,\ncommercialName, percentage) belongs to the spec-scoped READ shape\nonly. Recipe ingredients reference existing library materials by\nmaterialId (by-reference rule, see RecipeWrite).\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, shown in the Library screen.\nUnique among the owner company's library chapters — a duplicate\nis a 422 with errorCode NAME_ALREADY_USED (paramName name).\n"
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionSite"
            },
            "nullable": true,
            "description": "Replaces the chapter's site list in full. null or absent leaves it\nunchanged; send [] to clear it.\n"
          },
          "recipe": {
            "$ref": "#/components/schemas/RecipeWrite"
          },
          "nutrition": {
            "$ref": "#/components/schemas/NutritionalInformationWrite"
          },
          "allergens": {
            "$ref": "#/components/schemas/AllergenDeclarationWrite"
          }
        },
        "additionalProperties": false
      },
      "FoodProductionChapterCreateRequest": {
        "type": "object",
        "description": "Write shape of a library production chapter on create: sites and\nnutrition. The recipe and the allergens are written on the update, once\nthe chapter exists. The allergen entries are worked out from the recipe\nand the sites, and that derivation only runs against a chapter that has\nalready been saved: recipe ingredients written in the same request as\nthe create would leave the chapter without its recipe-derived allergens.\nCreate first, then send the recipe (and qualify the allergens) on the\nupdate.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, shown in the Library screen.\nUnique among the owner company's library chapters — a duplicate\nis a 422 with errorCode NAME_ALREADY_USED (paramName name).\n"
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionSite"
            },
            "nullable": true,
            "description": "The chapter's production sites. Send [] or omit it for none."
          },
          "nutrition": {
            "description": "On the create, nutrients are ADDED to the mandatory nutrients the\nnew chapter starts with (the nutrient catalogue's mandatory list):\na sent nutrientId that is already there takes the sent unit and\nvalue, the others are added, and nothing is removed. So a caller\nsends only the nutrients it has values for. The update\n(LibraryFoodChapters_PutProduction) keeps the full replace.\n",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/NutritionalInformationWrite"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "FoodLabellingChapterWrite": {
        "type": "object",
        "description": "Write shape of the labelling chapter, inline on the food\nspecification create (labellingChapter) and on\nFoodSpecifications_PutLabellingChapter. Requirements and documents are\nnot part of it.\n\nDERIVED CONTENT is read-only here. The labelling chapter is built from\nthe production chapters and the questionnaires: the generated\ningredient list text, the nutrient values and the servings, the\nnutri-score result, the GMO rows and the automatic claims are\ncomputed by the platform and written where they come from (the\nproduction chapter, the questionnaire answers). This shape carries the\nlabelling inputs only.\n\nOWNERSHIP RULE — replace scope = ownership scope: a PUT is a full\nreplace OF WHAT THE CALLER'S COMPANY OWNS. Counterpart-owned fields\nare untouchable both ways: carrying a VALUE = 422 (never silently\ndropped); null or absent = ignored, never cleared. The only\nmixed-ownership labelling section is gmoRiskAnalysis.\n\nREPLACE RULE on the PUT, by kind of section:\n  * sections the labelling chapter owns outright (productInformation,\n    consumerInstructions, sortingInstructions,\n    additionalMarketingInformation, businessNameAndAddress): null and\n    absent mean the same thing, the section goes back to the template\n    defaults, as a create leaves it (full replace; no merge-patch\n    semantics);\n  * customFields: its own rule (CustomFields: an entry replaces its\n    component's values; a component not carried keeps what it holds);\n  * sections keyed by production chapter or recipe row\n    (ingredientDeclaration, nutritionalInformation, nutriScore,\n    gmoRiskAnalysis): entries are addressed, never created or removed.\n    A section or an entry the payload does not carry keeps what it\n    holds; within a carried entry, the section's own rule applies;\n  * claims: its own rule (null keeps the manual claims, [] clears\n    them).\n\nOn the create, a section that is null or absent keeps the template\ndefaults.\n",
        "properties": {
          "ingredientDeclaration": {
            "$ref": "#/components/schemas/IngredientDeclarationWrite"
          },
          "nutritionalInformation": {
            "$ref": "#/components/schemas/NutritionDeclarationWrite"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabellingClaimWrite"
            },
            "nullable": true,
            "description": "The manual claims the chapter carries, replaced in full.\n\nREPLACE ALGORITHM — the section holds claims of both origins, so\nthe replace is scoped to the manual ones:\n  * a manual claim absent from the array is removed;\n  * a manual claim present in the array is kept as it stands\n    (its server-side detail is not reset);\n  * an id not yet on the chapter is added as a manual claim, in\n    the list its claimType names;\n  * an AUTOMATIC claim is never touched — not removed, not\n    converted, not counted as a duplicate of a manual one.\n\nSending the id of a claim that is currently AUTOMATIC does not\nadopt it: it stays automatic and no second entry appears.\n\nThe same id twice under the SAME claimType is collapsed silently;\nthe same id under two different types is a contradiction, refused\nwith a 422 naming the second occurrence's claimType.\n\nnull or absent means the section is NOT supplied and keeps what\nthe chapter already holds (template defaults on a create) — it\ndoes NOT clear the manual claims. Send [] to clear them.\n\nERROR ATTRIBUTION. Refusals the payload alone can produce — a\nmissing claimId or claimType, the duplicate contradiction above —\nname the exact entry (labellingChapter.claims[1].claimType).\nEverything about the claim ITSELF is checked by the platform when\nthe link is written: the claim exists, is of the specification's\nproduct type, is the active version, and — for a library claim —\nbelongs to the specification owner. Those refusals are 422s naming\nthe SECTION (labellingChapter.claims), and the message identifies\nthe offending id.\n\nA marketing or nutritional claim id that exists but is not\nvisible to your company answers 403: treat 403 on this section\nas \"one of these claim ids is not yours\".\n"
          },
          "productInformation": {
            "$ref": "#/components/schemas/LabellingProductInformationWrite"
          },
          "nutriScore": {
            "$ref": "#/components/schemas/NutriScoreWrite"
          },
          "consumerInstructions": {
            "$ref": "#/components/schemas/ConsumerInstructionsWrite"
          },
          "sortingInstructions": {
            "$ref": "#/components/schemas/SortingInstructions"
          },
          "gmoRiskAnalysis": {
            "$ref": "#/components/schemas/GmoRiskAnalysisWrite"
          },
          "additionalMarketingInformation": {
            "$ref": "#/components/schemas/MarketingInformation"
          },
          "businessNameAndAddress": {
            "$ref": "#/components/schemas/BusinessNameAndAddressWrite"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          }
        },
        "additionalProperties": false
      },
      "LabellingProductInformationRead": {
        "type": "object",
        "nullable": true,
        "description": "Section pack_product_info — names, GTIN, net contents, alcohol, final\npage proof. The product name, the GTIN and the quantities of the trade\nitem's net contents, variable weight and drained net weight are copied\nfrom the specification's trade item (tradeItemId) and are readOnly;\ntheir eMark and displayOnPack flags are writable\n(LabellingProductInformationWrite).\n",
        "properties": {
          "productName": {
            "type": "object",
            "nullable": true,
            "properties": {
              "value": {
                "type": "string",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "commercialName": {
            "$ref": "#/components/schemas/DisplayableTextWithSubtitle"
          },
          "legalName": {
            "$ref": "#/components/schemas/DisplayableTextWithSubtitle"
          },
          "productDescription": {
            "$ref": "#/components/schemas/DisplayableText"
          },
          "productGtin": {
            "type": "object",
            "nullable": true,
            "properties": {
              "value": {
                "type": "string",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "netContents": {
            "type": "array",
            "nullable": true,
            "description": "The trade item's own net contents, one entry per unit the trade\nitem expresses it in. The write's netContents sets the flags of\neach entry, addressed by unitId.\n",
            "items": {
              "type": "object",
              "properties": {
                "unitId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "readOnly": true,
                  "description": "Copied from the trade item (Units of measure list)."
                },
                "value": {
                  "type": "string",
                  "nullable": true,
                  "readOnly": true,
                  "description": "Copied from the trade item, as the trade item states it."
                },
                "eMark": {
                  "type": "boolean"
                },
                "displayOnPack": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalNetContents": {
            "type": "array",
            "nullable": true,
            "description": "Extra net contents beyond the trade item's own — whole quantities only.",
            "items": {
              "type": "object",
              "properties": {
                "unitId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "Unit of measure (reference data)"
                },
                "value": {
                  "type": "integer",
                  "minimum": 0,
                  "nullable": true
                },
                "eMark": {
                  "type": "boolean"
                },
                "displayOnPack": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "variableWeight": {
            "type": "object",
            "nullable": true,
            "description": "null when the trade item is not a variable-weight item.",
            "properties": {
              "minimumValue": {
                "type": "number",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "maximumValue": {
                "type": "number",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "unitId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "eMark": {
                "type": "boolean"
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "drainedNetWeight": {
            "type": "object",
            "nullable": true,
            "properties": {
              "unitId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "value": {
                "type": "number",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the trade item."
              },
              "eMark": {
                "type": "boolean"
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "eMark": {
            "type": "object",
            "nullable": true,
            "description": "The e-mark block's on-pack flag (one per specification).",
            "properties": {
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "alcoholVolume": {
            "type": "object",
            "nullable": true,
            "description": "Percentage 0-100, step 0.01",
            "properties": {
              "percentage": {
                "type": "number",
                "nullable": true
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "finalPageProofFileIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "LabellingProductInformationWrite": {
        "type": "object",
        "description": "Section pack_product_info — WRITE side. Values copied from the trade\nitem (product name, GTIN, the trade item's own net content, variable\nweight, drained net weight) are NOT writable: they derive from\ntradeItemId server-side and appear on the read side; here only their\non-pack flags are set. Extra net contents are written in full.\nAbsent fields keep the template defaults.\n",
        "properties": {
          "productName": {
            "$ref": "#/components/schemas/DisplayOnPackFlag"
          },
          "commercialName": {
            "$ref": "#/components/schemas/DisplayableTextWithSubtitle"
          },
          "legalName": {
            "$ref": "#/components/schemas/DisplayableTextWithSubtitle"
          },
          "productDescription": {
            "$ref": "#/components/schemas/DisplayableText"
          },
          "productGtin": {
            "$ref": "#/components/schemas/DisplayOnPackFlag"
          },
          "netContents": {
            "type": "array",
            "nullable": true,
            "description": "On-pack flags of the trade item's own net contents, one entry per\nrow, addressed by unitId (the read's netContents gives each row's\nunit; the trade item has one row per unit). The quantities stay\nread-only: they come from the trade item. Same rule as the other\nsections of this chapter: a row not sent gets the template\ndefaults (eMark false, displayOnPack true). A unitId that is not\none of the trade item's rows, or the same unitId twice, is a 422\nnaming netContents[i].unitId.\n",
            "items": {
              "type": "object",
              "required": [
                "unitId"
              ],
              "properties": {
                "unitId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unit of the trade item's net-content row (Units of measure list)"
                },
                "eMark": {
                  "type": "boolean",
                  "nullable": true
                },
                "displayOnPack": {
                  "type": "boolean",
                  "nullable": true
                }
              },
              "additionalProperties": false
            }
          },
          "additionalNetContents": {
            "type": "array",
            "nullable": true,
            "description": "Extra net contents beyond the trade item's own — whole quantities only",
            "items": {
              "type": "object",
              "required": [
                "unitId",
                "value"
              ],
              "properties": {
                "unitId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unit of measure (reference data)"
                },
                "value": {
                  "type": "integer",
                  "minimum": 0
                },
                "eMark": {
                  "type": "boolean"
                },
                "displayOnPack": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "variableWeight": {
            "description": "On-pack flags of the trade item's variable weight (variable-weight trade items only)",
            "$ref": "#/components/schemas/PackFlags"
          },
          "drainedNetWeight": {
            "description": "On-pack flags of the trade item's drained net weight",
            "$ref": "#/components/schemas/PackFlags"
          },
          "eMark": {
            "description": "On-pack flag of the e-mark block as a whole (one per\nspecification), independent of the per-quantity eMark flags. The\ne-mark content itself (the quantities it shows) is derived\nserver-side. displayOnPack true is refused (422) when the e-mark\nblock holds no quantity. Absent keeps the template default\n(true).\n",
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DisplayOnPackFlag"
              }
            ]
          },
          "alcoholVolume": {
            "type": "object",
            "nullable": true,
            "description": "Percentage 0-100, step 0.01",
            "properties": {
              "percentage": {
                "type": "number"
              },
              "displayOnPack": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "finalPageProofFileIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "DisplayOnPackFlag": {
        "type": "object",
        "nullable": true,
        "description": "On-pack flag of a value that is derived server-side (not writable itself)",
        "properties": {
          "displayOnPack": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PackFlags": {
        "type": "object",
        "nullable": true,
        "description": "On-pack flags of a quantity that is derived server-side (not writable itself)",
        "properties": {
          "eMark": {
            "type": "boolean"
          },
          "displayOnPack": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DisplayableText": {
        "type": "object",
        "nullable": true,
        "properties": {
          "value": {
            "type": "string"
          },
          "displayOnPack": {
            "type": "boolean"
          }
        }
      },
      "DisplayableTextWithSubtitle": {
        "type": "object",
        "nullable": true,
        "properties": {
          "value": {
            "type": "string"
          },
          "subtitle": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          },
          "displayOnPack": {
            "type": "boolean"
          }
        }
      },
      "NutriScoreWrite": {
        "type": "object",
        "description": "Section nutriscore — INPUTS ONLY, keyed by production chapter. An\nentry addresses a production chapter linked to the specification (on\na create: referenced by this same create, productionChapter.chapterId);\na productionChapterId that is not linked is a 422 naming the entry. Entries are not created or\nremoved here: a linked chapter not carried in the array keeps what it\nholds. null or absent = section not supplied.\n\nWithin an entry only productionChapterId is required. A field that is\nnull or absent keeps what the entry holds (empty on a create): the\nplatform's own validation flags an entry without a product type or a\npercentage as incomplete; it does not refuse it.\n\nMerged (assortment) mode is out of scope: this write addresses the\nper-chapter entries. A chapter later put in merged mode keeps one\nmerged entry under another key and is not writable here.\n",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "productionChapterId"
              ],
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "displayOnPack": {
                  "type": "boolean",
                  "default": true
                },
                "productType": {
                  "type": "string",
                  "description": "Code from the NutriscoreProductTypes list. An unknown code is\nrefused by the platform's list rule with a 422 naming the\nSECTION (labellingChapter.nutriScore); the message says which\ncode. Only what the payload alone can get wrong - a missing\nfield, a chapter not referenced by this create, a repeated\nchapter - names the entry.\n"
                },
                "percentageOfFruitsVegetablesAndLegumes": {
                  "type": "number",
                  "description": "0-100, step 0.001"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "NutriScoreRead": {
        "type": "object",
        "nullable": true,
        "description": "Read shape of the nutriscore section — the write INPUTS plus what the\nplatform derives: the nutrient amounts taken from the production\nchapter's nutrition table, and the computed result. One entry per\nproduction chapter linked to the specification.\n",
        "properties": {
          "entries": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "productionChapterId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "null on the single merged entry of a specification in merged (assortment) mode."
                },
                "displayOnPack": {
                  "type": "boolean"
                },
                "productType": {
                  "type": "string",
                  "nullable": true,
                  "description": "Code from the NutriscoreProductTypes list"
                },
                "percentageOfFruitsVegetablesAndLegumes": {
                  "type": "number",
                  "nullable": true
                },
                "nutrients": {
                  "type": "array",
                  "nullable": true,
                  "readOnly": true,
                  "description": "Copied from the production chapter's nutrition table; written there, not here.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "nutrientId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "unitOfMeasureId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "amount": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "result": {
                  "type": "object",
                  "nullable": true,
                  "readOnly": true,
                  "description": "Computed server-side, never writable",
                  "properties": {
                    "grade": {
                      "type": "string",
                      "nullable": true
                    },
                    "totalScore": {
                      "type": "integer",
                      "nullable": true
                    },
                    "positiveComponentsScore": {
                      "type": "integer",
                      "nullable": true
                    },
                    "negativeComponentsScore": {
                      "type": "integer",
                      "nullable": true
                    },
                    "presenceOfNonNutritiveSweeteners": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "Derived from the Catalog's nutrient data for the recipe."
                    },
                    "calculationState": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "Successful",
                        "MandatoryFieldsMissing",
                        "ProductionChapterNotLinked",
                        "Error"
                      ],
                      "description": "Outcome of the last calculation. Anything but Successful\nsays why grade and scores are null.\n"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "ShelfLifeDuration": {
        "type": "object",
        "nullable": true,
        "properties": {
          "value": {
            "type": "number",
            "nullable": true
          },
          "unitId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "UnitOfMeasure reference list"
          }
        },
        "additionalProperties": false
      },
      "InstructionListWrite": {
        "type": "object",
        "description": "A block of instruction sentences from the labelling-information\nlibrary, replaced in full. Send { instructions: [] } to clear.\n",
        "properties": {
          "displayOnPack": {
            "type": "boolean",
            "default": true
          },
          "instructions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "labellingInformationId"
              ],
              "properties": {
                "labellingInformationId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "A labelling-information item of the block's type (storage\ninstructions under storageInstructions, preparation\ninstructions under preparationInstructions), owned by your\ncompany, active version, for the specification's product\ntype. All of that is checked by the platform when the block\nis written: refusals are 422s naming the SECTION\n(labellingChapter.consumerInstructions), and the message\nidentifies the id. An id you cannot see answers as not\nfound. The same id twice is collapsed silently.\n"
                },
                "placeholders": {
                  "type": "array",
                  "nullable": true,
                  "description": "Values for the sentence's variables, by variable name. A\nvariable the sentence has and the caller leaves out is left\nempty: the write succeeds, and the specification's own\nvalidation flags the chapter as incomplete until the value\nis written. A variable name the sentence does not have is a\n422 naming the entry.\n",
                  "items": {
                    "type": "object",
                    "required": [
                      "variableName",
                      "value"
                    ],
                    "properties": {
                      "variableName": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "overrideText": {
            "type": "string",
            "nullable": true,
            "description": "Replaces the on-pack text the platform generates from the\ninstructions. Absent or null keeps what the chapter holds - on a\ncreate, the generated text. An override cannot be cleared.\n"
          }
        },
        "additionalProperties": false
      },
      "InstructionListRead": {
        "type": "object",
        "nullable": true,
        "properties": {
          "displayOnPack": {
            "type": "boolean"
          },
          "languageCode": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "The language the sentences and the generated text are rendered in (the specification's language)."
          },
          "instructions": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "labellingInformationId": {
                  "type": "string",
                  "format": "uuid"
                },
                "sentence": {
                  "type": "string",
                  "nullable": true,
                  "readOnly": true,
                  "description": "Rendered from the library item and the placeholder values."
                },
                "placeholders": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "properties": {
                      "variableName": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "generatedText": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "overrideText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CodesAndDatesWrite": {
        "type": "object",
        "description": "Block consumer_instruction (codes & dates) — the caller's inputs only.\nThe shelf lives and the consumer shelf-life indication are copied from\nthe finished-product chapter's shelf_life section and are not accepted\nhere (unknown member = 400). Within a supplied block, a field that is\nnull or absent keeps what the chapter holds (the template default);\nproductionIndicationIds is replaced in full when supplied.\n",
        "properties": {
          "displayOnPack": {
            "type": "boolean",
            "default": true
          },
          "consumerShelfLife": {
            "type": "object",
            "nullable": true,
            "properties": {
              "dateExpression": {
                "type": "string",
                "nullable": true,
                "description": "Code from the DateFormats list; an unknown code is refused by the platform's list rule with a 422 naming the section."
              },
              "batchLotNumber": {
                "type": "string",
                "nullable": true,
                "maxLength": 500
              }
            },
            "additionalProperties": false
          },
          "productionIndicationIds": {
            "type": "array",
            "nullable": true,
            "description": "ProductionIndication reference list. Replaced in full.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "CodesAndDatesRead": {
        "type": "object",
        "nullable": true,
        "description": "Block consumer_instruction (codes & dates) as read — the caller's\ninputs plus the values copied from the finished-product chapter.\n",
        "properties": {
          "displayOnPack": {
            "type": "boolean"
          },
          "shelfLife": {
            "type": "object",
            "nullable": true,
            "readOnly": true,
            "description": "Copied from the finished-product chapter's shelf_life section.",
            "properties": {
              "guaranteedShelfLife": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "indicationId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "GuaranteedShelfLife reference list"
                  },
                  "duration": {
                    "$ref": "#/components/schemas/ShelfLifeDuration"
                  }
                },
                "additionalProperties": false
              },
              "production": {
                "$ref": "#/components/schemas/ShelfLifeDuration"
              },
              "packaging": {
                "$ref": "#/components/schemas/ShelfLifeDuration"
              },
              "shipping": {
                "$ref": "#/components/schemas/ShelfLifeDuration"
              },
              "delivery": {
                "$ref": "#/components/schemas/ShelfLifeDuration"
              }
            },
            "additionalProperties": false
          },
          "consumerShelfLife": {
            "type": "object",
            "nullable": true,
            "properties": {
              "beforeOpeningIndicationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the finished-product chapter (ConsumerShelfLife reference list)."
              },
              "afterOpening": {
                "type": "object",
                "nullable": true,
                "readOnly": true,
                "description": "Copied from the finished-product chapter.",
                "properties": {
                  "value": {
                    "type": "integer",
                    "nullable": true
                  },
                  "unitId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  }
                },
                "additionalProperties": false
              },
              "shelfLifeTesting": {
                "type": "boolean",
                "readOnly": true,
                "description": "Copied from the finished-product chapter."
              },
              "dateExpression": {
                "type": "string",
                "nullable": true,
                "description": "Code from the DateFormats list"
              },
              "batchLotNumber": {
                "type": "string",
                "nullable": true,
                "maxLength": 500
              }
            },
            "additionalProperties": false
          },
          "productionIndicationIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "ProductOriginsWrite": {
        "type": "object",
        "description": "Block product_origins. origins is replaced in full (keyed by\noriginTypeId — the same type twice is a 422 naming the second\noccurrence). An origin is land-based OR water-based, and which one is\ndecided by the origin type, not by the caller: send landBased for a\nland origin type and waterBased for a water one — the other branch is\nrefused with a 422 naming it. A land-based origin needs its countryId\nand a water-based one at least one fishing zone and one fishing gear;\nmissing ones are not refused, the specification's validation flags\nthe chapter as incomplete. Unknown or mismatched country / region /\nzone ids are refused by the platform with a 422 naming the section\n(labellingChapter.consumerInstructions).\n",
        "properties": {
          "displayOnPack": {
            "type": "boolean",
            "default": true
          },
          "origins": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "originTypeId"
              ],
              "properties": {
                "originTypeId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "OriginTypes list"
                },
                "landBased": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "countryId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "regionId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "zoneId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                },
                "waterBased": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "fishingZoneIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "FishingZones list"
                    },
                    "fishingGearIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "FishingGears list"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "overrideText": {
            "type": "string",
            "nullable": true,
            "description": "Replaces the on-pack text the platform generates from the origins.\nAbsent or null keeps what the chapter holds - on a create, the\ngenerated text. An override cannot be cleared.\n"
          }
        },
        "additionalProperties": false
      },
      "ProductOriginsRead": {
        "type": "object",
        "nullable": true,
        "properties": {
          "displayOnPack": {
            "type": "boolean",
            "nullable": true
          },
          "languageCode": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "The language the generated text is rendered in (the specification's language)."
          },
          "origins": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "originTypeId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "OriginTypes list"
                },
                "landBased": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "countryId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "regionId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "zoneId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                },
                "waterBased": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "fishingZoneIds": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "FishingZones list"
                    },
                    "fishingGearIds": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "FishingGears list"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "generatedText": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "overrideText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConsumerInstructionsWrite": {
        "type": "object",
        "description": "Section consumer_instruction — four blocks, each supplied independently (see the block semantics above).",
        "properties": {
          "storageInstructions": {
            "$ref": "#/components/schemas/InstructionListWrite"
          },
          "preparationInstructions": {
            "$ref": "#/components/schemas/InstructionListWrite"
          },
          "codesAndDates": {
            "$ref": "#/components/schemas/CodesAndDatesWrite"
          },
          "productOrigins": {
            "$ref": "#/components/schemas/ProductOriginsWrite"
          }
        },
        "additionalProperties": false
      },
      "ConsumerInstructionsRead": {
        "type": "object",
        "nullable": true,
        "description": "Section consumer_instruction, as read — the write inputs plus the rendered sentences, generated texts and the values copied from other chapters.",
        "properties": {
          "storageInstructions": {
            "$ref": "#/components/schemas/InstructionListRead"
          },
          "preparationInstructions": {
            "$ref": "#/components/schemas/InstructionListRead"
          },
          "codesAndDates": {
            "$ref": "#/components/schemas/CodesAndDatesRead"
          },
          "productOrigins": {
            "$ref": "#/components/schemas/ProductOriginsRead"
          }
        },
        "additionalProperties": false
      },
      "SortingInstructions": {
        "type": "object",
        "description": "Section sorting_instruction — target streams with country-specific\ncomponents, plus the recycling logos.\n\ndisplaySortingInstructions is not only a display flag: turning it OFF\nCLEARS the streams (the platform drops them when the section is not\nshown on pack). A payload carrying false together with a non-empty\nstreams array is therefore a contradiction, refused with a 422 naming\ndisplaySortingInstructions - the streams would otherwise be accepted\nand then removed.\n\nstreams and the countries inside a stream are each replaced in full\nwhen supplied; absent or null keeps what the chapter holds (template\ndefaults on a create). A stream is keyed by targetStreamId and a\ncountry row by countryId - the same key twice is a 422 naming the\nsecond occurrence.\n",
        "properties": {
          "displaySortingInstructions": {
            "type": "boolean",
            "default": true
          },
          "streams": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "required": [
                "targetStreamId"
              ],
              "properties": {
                "targetStreamId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Item from the SortingStreams list. An unknown id is refused\nby the platform's list rule with a 422 naming the section.\n"
                },
                "countries": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "required": [
                      "countryId"
                    ],
                    "properties": {
                      "countryId": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Country reference list"
                      },
                      "components": {
                        "type": "string",
                        "nullable": true,
                        "description": "The packaging components sorted into this stream in\nthis country. Absent or null keeps what the row holds;\nthe specification's own validation flags a country row\nwithout it as incomplete, it is not refused.\n"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "otherLogos": {
            "type": "object",
            "nullable": true,
            "properties": {
              "trimanLogo": {
                "type": "boolean",
                "default": true
              },
              "greenDotLogo": {
                "type": "boolean",
                "default": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "GmoRawMaterialOrigin": {
        "type": "object",
        "properties": {
          "originTypeId": {
            "type": "string",
            "format": "uuid",
            "description": "MaterialOrigin reference list"
          },
          "countryIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "GmoRiskAnalysisWrite": {
        "type": "object",
        "description": "Section gmo_risk_analysis — the inputs of the rows the platform\ngenerated from the recipe.\n\nEach entry addresses one generated row by materialId AND ingredientId\n(see the note above: an absent ingredientId is part of the key, not an\nomitted field). A pair that matches no generated row is a 422 naming\nthe entry, and the same pair twice is a 422 naming the second\noccurrence. A row the array does not carry keeps what it holds.\n\nnull or absent = section not supplied.\n",
        "properties": {
          "rawMaterialRisks": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "materialId"
              ],
              "properties": {
                "materialId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Part of the key of a row the platform generated. Not a row\nyou create: the rows follow the recipe's raw materials.\n"
                },
                "ingredientId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "The other part of the key. Omit it (or send null) to address\nthe raw-material row of this material; send the child's\ningredient id to address one row of a bought composite.\n"
                },
                "riskLevelCode": {
                  "type": "string",
                  "nullable": true,
                  "description": "RETAILER-owned. Code from the GmoRiskLevels list. Absent or\nnull keeps what the row holds; the specification's own\nvalidation flags a row without one as incomplete.\n"
                },
                "fileIds": {
                  "type": "array",
                  "nullable": true,
                  "description": "SUPPLIER-owned. Supporting documents, uploaded through the\ndocument API and referenced here by id; replaced in full when\nsupplied.\n\nEach risk level accepts a fixed set of document types. A file\nwhose type the row's risk level does not accept is refused\nwith a 422 naming it - the platform would otherwise drop it\nfrom the row and still answer 201.\n",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "GmoRiskAnalysisRead": {
        "type": "object",
        "nullable": true,
        "description": "Section gmo_risk_analysis as read — the inputs plus what the recipe\nfilled in. One row per GMO-risky raw material of the recipe, keyed by\nmaterialId and ingredientId (the key GmoRiskAnalysisWrite addresses).\n",
        "properties": {
          "rawMaterialRisks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "materialId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Part of the row key."
                },
                "ingredientId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "The other part of the row key: null on the raw-material row\nof a material, the child's ingredient id on a row of a bought\ncomposite.\n"
                },
                "ingredientName": {
                  "type": "string",
                  "nullable": true,
                  "readOnly": true,
                  "description": "From the recipe."
                },
                "riskLevelCode": {
                  "type": "string",
                  "nullable": true,
                  "description": "Code from the GmoRiskLevels list"
                },
                "fileIds": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "origins": {
                  "type": "array",
                  "nullable": true,
                  "readOnly": true,
                  "description": "From the composite: the origins declared on the suppliers of\nthis ingredient, grouped by origin type.\n",
                  "items": {
                    "$ref": "#/components/schemas/GmoRawMaterialOrigin"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "BusinessNameAndAddressWrite": {
        "type": "object",
        "nullable": true,
        "description": "Section pack_business_name_and_address: the consumer-service contact\nand an additional text printed on pack, and whether the health marks\nand packer codes of the production sites are shown. The codes\nthemselves come from the production chapters' sites and are read on\nBusinessNameAndAddressRead.\n",
        "properties": {
          "consumerServiceInformation": {
            "$ref": "#/components/schemas/ConsumerServiceInformationWrite"
          },
          "additionalInformation": {
            "$ref": "#/components/schemas/DisplayableText"
          },
          "healthMarks": {
            "$ref": "#/components/schemas/DisplayOnPackFlag"
          },
          "packerCodes": {
            "$ref": "#/components/schemas/DisplayOnPackFlag"
          }
        },
        "additionalProperties": false
      },
      "ConsumerServiceInformationWrite": {
        "type": "object",
        "nullable": true,
        "description": "Either a sentence from the labelling-information library\n(labellingInformationId, with its placeholders) or a free text\n(value). Sending both is a 422 naming value.\n",
        "properties": {
          "displayOnPack": {
            "type": "boolean",
            "default": true
          },
          "labellingInformationId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "A consumer-service-information item of the labelling-information\nlibrary, owned by your company, active version. Refusals are 422s\nnaming the section (labellingChapter.businessNameAndAddress), and\nthe message identifies the id. An id you cannot see answers as\nnot found.\n"
          },
          "placeholders": {
            "type": "array",
            "nullable": true,
            "description": "Values for the sentence's variables, by variable name. A variable\nthe sentence has and the caller leaves out is left empty: the\nwrite succeeds, and the specification's own validation flags the\nchapter as incomplete until the value is written. A variable name\nthe sentence does not have is a 422 naming the entry.\n",
            "items": {
              "type": "object",
              "required": [
                "variableName",
                "value"
              ],
              "properties": {
                "variableName": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "value": {
            "type": "string",
            "nullable": true,
            "description": "Free text shown on pack."
          }
        },
        "additionalProperties": false
      },
      "BusinessNameAndAddressRead": {
        "type": "object",
        "nullable": true,
        "description": "Section pack_business_name_and_address, as read. The write inputs plus the rendered sentence and the codes copied from the production sites.",
        "properties": {
          "consumerServiceInformation": {
            "type": "object",
            "nullable": true,
            "properties": {
              "displayOnPack": {
                "type": "boolean"
              },
              "labellingInformationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "sentence": {
                "type": "string",
                "nullable": true,
                "readOnly": true,
                "description": "Rendered from the library item and the placeholder values."
              },
              "placeholders": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "object",
                  "properties": {
                    "variableName": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                }
              },
              "value": {
                "type": "string",
                "nullable": true
              },
              "languageCode": {
                "type": "string",
                "nullable": true,
                "readOnly": true,
                "description": "The specification's language."
              }
            },
            "additionalProperties": false
          },
          "additionalInformation": {
            "$ref": "#/components/schemas/DisplayableText"
          },
          "siteIds": {
            "type": "array",
            "nullable": true,
            "readOnly": true,
            "description": "The production sites of the chapters linked to the specification.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "healthMarks": {
            "$ref": "#/components/schemas/SiteCodesRead"
          },
          "packerCodes": {
            "$ref": "#/components/schemas/SiteCodesRead"
          }
        },
        "additionalProperties": false
      },
      "SiteCodesRead": {
        "type": "object",
        "nullable": true,
        "properties": {
          "values": {
            "type": "array",
            "nullable": true,
            "readOnly": true,
            "description": "The codes of the production sites (from the Sites API).",
            "items": {
              "type": "string"
            }
          },
          "displayOnPack": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MarketingInformation": {
        "type": "object",
        "description": "Section pack_marketing_info.",
        "nullable": true,
        "properties": {
          "information": {
            "type": "string"
          },
          "displayOnPack": {
            "type": "boolean"
          }
        }
      },
      "FoodTestingChapterWrite": {
        "type": "object",
        "description": "Write shape of the testing chapter (library chapter).",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, shown in the Library screen.\nUnique among the owner company's library chapters — a duplicate\nis a 422 with errorCode NAME_ALREADY_USED (paramName name).\n"
          },
          "characteristics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Characteristic"
            },
            "nullable": true,
            "description": "Replaces the characteristics table in full. A row whose\ncharacteristicId is absent from the array is removed; a row\ncarrying one updates it; a row without one is added. null or\nabsent leaves the table unchanged; send [] to clear it.\n"
          },
          "controlPlans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ControlPlan"
            },
            "nullable": true,
            "description": "Same replace rule, keyed on characteristicId. Each row must name a\ncharacteristicId present in the characteristics table whose\ncontrolPhaseId is set - otherwise a 422 naming the entry.\n"
          }
        },
        "additionalProperties": false
      },
      "FoodFinishedProductChapterWrite": {
        "type": "object",
        "description": "Write shape of the finished product chapter (library chapter).\nproductPhotos reference files already uploaded via the document flow.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Library display name of the chapter, shown in the Library screen.\nUnique among the owner company's library chapters — a duplicate\nis a 422 with errorCode NAME_ALREADY_USED (paramName name).\n"
          },
          "productPhotos": {
            "$ref": "#/components/schemas/ProductPhotos"
          },
          "shelfLife": {
            "$ref": "#/components/schemas/FinishedProductShelfLife"
          },
          "consumerShelfLife": {
            "$ref": "#/components/schemas/FinishedProductConsumerShelfLife"
          },
          "storageConditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageCondition"
            },
            "nullable": true,
            "description": "Replaces the storage-condition list in full, keyed on conditionId:\na row the array does not carry is removed. null or absent leaves\nthe list unchanged; send [] to clear it.\n"
          },
          "preservationMethodIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "description": "PreservationMethod reference list. Replaces the list in full; null\nor absent leaves it unchanged, [] clears it.\n"
          },
          "traceability": {
            "$ref": "#/components/schemas/Traceability"
          }
        },
        "additionalProperties": false
      },
      "FolderCreateRequest": {
        "type": "object",
        "description": "Full folder payload — creation and configuration in one call. The\nfolder is created in preparation; every field needed to start it at\nshare time is required up front, so the handover cannot fail on\nmissing data. Contacts are added while the folder is still in\npreparation, the only state that accepts them.\n",
        "required": [
          "name",
          "templateId",
          "targetDateUtc",
          "languageCode"
        ],
        "properties": {
          "ownerUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The user of your company who owns the folder and becomes its retailer contact.\nOptional when your credentials identify a user: that user is\ntaken, and a person may only name themselves (naming anyone else\nis a 403). Required when your credentials carry no user. The\ncompany always binds from your credentials, never from the\npayload.\n"
          },
          "name": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "Your company's published food-family specification template, on which the\nfolder's specifications are based — communicated at onboarding by\nProfessional Services (same value as on specification creates). It must be\nowned by your company, published and in its active version; anything else is\na 422 naming this field. Determines the folder's template family; packaging\ntemplates are rejected (422) — folders hold food-family specifications only.\n"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "targetDateUtc": {
            "type": "string",
            "format": "date-time",
            "description": "Must not be in the past."
          },
          "specificationNote": {
            "type": "string",
            "nullable": true,
            "description": "Default note carried to specifications created in this folder"
          },
          "languageCode": {
            "type": "string",
            "example": "en-US"
          },
          "contacts": {
            "type": "array",
            "nullable": true,
            "description": "The folder's contacts: users of your company who work on it, addressed by\nuserId as discoverable through the CUMD public API. The folder's owner is\nalways a contact and needs no entry here; omit the property for the owner\nalone. A userId that is not a user of your company is a 422 reported on\n`contacts` - the first refused entry stops the request and nothing is created.\n",
            "items": {
              "type": "object",
              "required": [
                "userId"
              ],
              "properties": {
                "userId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "User of your company (from the CUMD public API)"
                }
              }
            }
          }
        },
        "additionalProperties": false
      },
      "FolderCreated": {
        "type": "object",
        "properties": {
          "folderId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ContactListWrite": {
        "type": "object",
        "description": "Contact list, addressed by userId — users are discoverable through\nthe CUMD public API (same IDs-only pattern as reference data). Each\ncontact carries its signatory flag; signature history is not\nwritable.\n",
        "required": [
          "contacts"
        ],
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "userId"
              ],
              "properties": {
                "userId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "User of the retailer or supplier company (from the CUMD public API)"
                },
                "isSignatory": {
                  "type": "boolean",
                  "nullable": true,
                  "description": "Whether this contact signs the specification for your\ncompany - the UI's \"Set as signatory\". A signatory can sign,\nand on the retailer side revise, duplicate and delete the\nspecification. true or false sets the flag; null or absent\nkeeps the stored flag (false for a contact being added).\nThe owner contact's flag cannot be changed: a value\ndifferent from the stored one gets a 422 naming it. Always\nreturned in the response.\n"
                }
              }
            }
          }
        },
        "additionalProperties": false
      },
      "FolderAssignment": {
        "type": "object",
        "required": [
          "folderId"
        ],
        "properties": {
          "folderId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ReferenceListItem": {
        "type": "object",
        "readOnly": true,
        "description": "A reference-list value as read. Written as the item id alone.",
        "properties": {
          "referenceListItemId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "referenceListItemCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LibraryVersion": {
        "type": "object",
        "readOnly": true,
        "properties": {
          "number": {
            "type": "integer",
            "minimum": 1
          },
          "activeVersion": {
            "type": "boolean"
          },
          "lastVersion": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PackagingComponentWrite": {
        "type": "object",
        "description": "Write shape of a packaging component, used by the create and the replace. Reference-list\nvalues are item ids; their read twin is a ReferenceListItem (e.g. packagingComponentTypeId\nis read back as packagingComponentType.referenceListItemId). Inside the replace, a member\nthat is null or absent is cleared.\n",
        "required": [
          "name",
          "usageLevel",
          "packagingComponentTypeId"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique among your company's packaging components."
          },
          "usageLevel": {
            "type": "string",
            "enum": [
              "primary",
              "secondary",
              "tertiary"
            ]
          },
          "packagingComponentTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "isPrintable": {
            "type": "boolean",
            "nullable": true
          },
          "weight": {
            "$ref": "#/components/schemas/Measurement"
          },
          "width": {
            "$ref": "#/components/schemas/Measurement"
          },
          "height": {
            "$ref": "#/components/schemas/Measurement"
          },
          "length": {
            "$ref": "#/components/schemas/Measurement"
          },
          "diameter": {
            "$ref": "#/components/schemas/Measurement"
          },
          "packagingUsageIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "internalCode": {
            "type": "string",
            "nullable": true
          },
          "technicalDesignation": {
            "type": "string",
            "nullable": true
          },
          "commercialDesignation": {
            "type": "string",
            "nullable": true
          },
          "isComponentInDirectContactWithProduct": {
            "type": "boolean",
            "nullable": true
          },
          "suppliers": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PackagingSupplierWrite"
            }
          },
          "materials": {
            "$ref": "#/components/schemas/PackagingMaterialsWrite"
          },
          "componentCharacteristics": {
            "$ref": "#/components/schemas/ComponentCharacteristicsWrite"
          },
          "printing": {
            "$ref": "#/components/schemas/PrintingWrite"
          },
          "substances": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PackagingSubstance"
            }
          }
        },
        "additionalProperties": false
      },
      "PackagingSupplierWrite": {
        "type": "object",
        "properties": {
          "supplierName": {
            "type": "string",
            "nullable": true
          },
          "supplierInternalCode": {
            "type": "string",
            "nullable": true
          },
          "marketId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "countryId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "regionId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "zoneId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackagingMaterialsWrite": {
        "type": "object",
        "nullable": true,
        "properties": {
          "packagingMaterials": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "required": [
                "packagingMaterialId"
              ],
              "properties": {
                "packagingMaterialId": {
                  "type": "string",
                  "format": "uuid"
                },
                "percentageOfMaterial": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 100
                },
                "thicknessInMicrons": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0
                },
                "percentageOfRecycledMaterials": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 100
                },
                "percentageOfRecycledMaterialsIncludingPcr": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 100
                },
                "percentageOfRenewableResources": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "ComponentCharacteristicsWrite": {
        "type": "object",
        "nullable": true,
        "properties": {
          "isRecyclable": {
            "type": "boolean",
            "nullable": true
          },
          "detachableForWashing": {
            "type": "object",
            "nullable": true,
            "properties": {
              "isDetachableForWashing": {
                "type": "boolean",
                "nullable": true
              },
              "detachableForWashingPrecisionId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              }
            },
            "additionalProperties": false
          },
          "plasticCharacteristics": {
            "type": "object",
            "nullable": true,
            "properties": {
              "densityId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "rigidityId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "tintId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "transparencyId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              }
            },
            "additionalProperties": false
          },
          "additives": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "required": [
                "packagingAdditiveId"
              ],
              "properties": {
                "packagingAdditiveId": {
                  "type": "string",
                  "format": "uuid"
                },
                "percentage": {
                  "type": "number",
                  "nullable": true,
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "PrintingWrite": {
        "type": "object",
        "nullable": true,
        "properties": {
          "printingTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "numberOfColors": {
            "type": "integer",
            "nullable": true,
            "minimum": 0
          },
          "inkTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "varnishTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "glueTypeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackagingSubstance": {
        "type": "object",
        "required": [
          "substanceId",
          "percentage",
          "presentAtNanoscale"
        ],
        "properties": {
          "substanceId": {
            "type": "string",
            "format": "uuid"
          },
          "percentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "presentAtNanoscale": {
            "type": "boolean"
          },
          "presenceAtNanoscale": {
            "type": "object",
            "nullable": true,
            "properties": {
              "size": {
                "type": "number",
                "nullable": true
              },
              "specificSurface": {
                "type": "number",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "PackagingComponent": {
        "type": "object",
        "description": "Read shape of a packaging component. Every member of PackagingComponentWrite reads back\nunder the same name, except reference-list values (read as ReferenceListItem under the\nname without \"Id\") and the material totals, which the platform computes.\n",
        "properties": {
          "packagingComponentId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "version": {
            "$ref": "#/components/schemas/LibraryVersion"
          },
          "status": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "draft",
              "inProgress",
              "locked"
            ]
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "usageLevel": {
            "type": "string",
            "enum": [
              "primary",
              "secondary",
              "tertiary"
            ]
          },
          "packagingComponentType": {
            "$ref": "#/components/schemas/ReferenceListItem"
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "lastUpdateDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "isPrintable": {
            "type": "boolean"
          },
          "weight": {
            "$ref": "#/components/schemas/Measurement"
          },
          "width": {
            "$ref": "#/components/schemas/Measurement"
          },
          "height": {
            "$ref": "#/components/schemas/Measurement"
          },
          "length": {
            "$ref": "#/components/schemas/Measurement"
          },
          "diameter": {
            "$ref": "#/components/schemas/Measurement"
          },
          "packagingUsage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceListItem"
            }
          },
          "internalCode": {
            "type": "string",
            "nullable": true
          },
          "technicalDesignation": {
            "type": "string",
            "nullable": true
          },
          "commercialDesignation": {
            "type": "string",
            "nullable": true
          },
          "isComponentInDirectContactWithProduct": {
            "type": "boolean"
          },
          "suppliers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "supplierName": {
                  "type": "string",
                  "nullable": true
                },
                "supplierInternalCode": {
                  "type": "string",
                  "nullable": true
                },
                "market": {
                  "$ref": "#/components/schemas/ReferenceListItem"
                },
                "country": {
                  "$ref": "#/components/schemas/ReferenceListItem"
                },
                "region": {
                  "$ref": "#/components/schemas/ReferenceListItem"
                },
                "zone": {
                  "$ref": "#/components/schemas/ReferenceListItem"
                }
              },
              "additionalProperties": false
            }
          },
          "materials": {
            "type": "object",
            "nullable": true,
            "properties": {
              "packagingMaterials": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "packagingMaterial": {
                      "$ref": "#/components/schemas/ReferenceListItem"
                    },
                    "percentageOfMaterial": {
                      "type": "number",
                      "nullable": true
                    },
                    "thicknessInMicrons": {
                      "type": "number",
                      "nullable": true
                    },
                    "percentageOfRecycledMaterials": {
                      "type": "number",
                      "nullable": true
                    },
                    "percentageOfRecycledMaterialsIncludingPcr": {
                      "type": "number",
                      "nullable": true
                    },
                    "percentageOfRenewableResources": {
                      "type": "number",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                }
              },
              "percentageOfTotalRenewableResources": {
                "type": "number",
                "nullable": true,
                "readOnly": true
              },
              "percentageOfTotalRecycledMaterials": {
                "type": "number",
                "nullable": true,
                "readOnly": true
              },
              "percentageOfTotalRecycledMaterialsIncludingPcr": {
                "type": "number",
                "nullable": true,
                "readOnly": true
              }
            },
            "additionalProperties": false
          },
          "componentCharacteristics": {
            "type": "object",
            "nullable": true,
            "properties": {
              "isRecyclable": {
                "type": "boolean",
                "nullable": true
              },
              "detachableForWashing": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "isDetachableForWashing": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "detachableForWashingPrecision": {
                    "$ref": "#/components/schemas/ReferenceListItem"
                  }
                },
                "additionalProperties": false
              },
              "plasticCharacteristics": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "density": {
                    "$ref": "#/components/schemas/ReferenceListItem"
                  },
                  "rigidity": {
                    "$ref": "#/components/schemas/ReferenceListItem"
                  },
                  "tint": {
                    "$ref": "#/components/schemas/ReferenceListItem"
                  },
                  "transparency": {
                    "$ref": "#/components/schemas/ReferenceListItem"
                  }
                },
                "additionalProperties": false
              },
              "additives": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "packagingAdditive": {
                      "$ref": "#/components/schemas/ReferenceListItem"
                    },
                    "percentage": {
                      "type": "number",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "printing": {
            "type": "object",
            "nullable": true,
            "properties": {
              "printingType": {
                "$ref": "#/components/schemas/ReferenceListItem"
              },
              "numberOfColors": {
                "type": "integer",
                "nullable": true
              },
              "inkType": {
                "$ref": "#/components/schemas/ReferenceListItem"
              },
              "varnishType": {
                "$ref": "#/components/schemas/ReferenceListItem"
              },
              "glueType": {
                "$ref": "#/components/schemas/ReferenceListItem"
              }
            },
            "additionalProperties": false
          },
          "substances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackagingSubstance"
            }
          }
        },
        "additionalProperties": false
      },
      "PackagingComponentCreated": {
        "type": "object",
        "properties": {
          "packagingComponentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemWrite": {
        "type": "object",
        "description": "Write shape of a packaging system, used by the create and the replace. Components are\nreferenced by id and must be published components visible to you. linkedComponentIds\nattaches components to a main component: a component is linked to one main component at\nmost, and main components are not linked together.\n",
        "required": [
          "name",
          "components"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique among your company's packaging systems."
          },
          "components": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/PackagingSystemComponentWrite"
            }
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemComponentWrite": {
        "type": "object",
        "description": "One component of the system. Field names are the ones the application already sends;\nthey read back as packagingComponentId, componentQuantity, isMainComponent,\nrecyclabilityId and linkedPackagingComponentIds.\n",
        "required": [
          "componentId",
          "componentQuantity",
          "isMainComponent"
        ],
        "properties": {
          "componentId": {
            "type": "string",
            "format": "uuid"
          },
          "componentQuantity": {
            "type": "integer",
            "minimum": 1
          },
          "isMainComponent": {
            "type": "boolean"
          },
          "componentRecyclabilityId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Recyclability (reference list item id)."
          },
          "linkedComponentIds": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "On a main component only: the components of this system attached to it. A component\nthat is not part of the system is a 422 naming the item.\n"
          }
        },
        "additionalProperties": false
      },
      "PackagingSystem": {
        "type": "object",
        "description": "Read shape of a packaging system.",
        "properties": {
          "packagingSystemId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "ownerCompanyId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "version": {
            "$ref": "#/components/schemas/LibraryVersion"
          },
          "status": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "draft",
              "published",
              "locked"
            ]
          },
          "creationDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "lastUpdateDateUtc": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "packagingComponents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packagingComponentId": {
                  "type": "string",
                  "format": "uuid"
                },
                "isMainComponent": {
                  "type": "boolean"
                },
                "componentQuantity": {
                  "type": "integer",
                  "nullable": true
                },
                "recyclabilityId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "linkedPackagingComponentIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemCreated": {
        "type": "object",
        "properties": {
          "packagingSystemId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "PackagingSystemVersionCreated": {
        "type": "object",
        "properties": {
          "packagingSystemId": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the new version"
          },
          "versionNumber": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ShareRequest": {
        "type": "object",
        "required": [
          "companyIds"
        ],
        "properties": {
          "companyIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Companies to share with (from the CUMD public API)."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "servers": [
    {
      "url": "https://apis.traceone.com/spec",
      "description": "Production"
    }
  ]
}