Passer au contenu

Designed
Get library production chapter

Requête

Reads the chapter at its own address — the owner never needs to know which specifications link it. The response carries every section the PUT writes, under the same names, plus server-derived values marked readOnly. Returns the ETag used by If-Match on the PUT (read-modify-write: PUT is a full replace).

Sécurité
oauth2(Portées requises: t1_api)
Chemin
chapterIdstring, (uuid)obligatoire

The unique identifier of the library chapter

curl -i -X GET \
  'https://apis.traceone.com/spec/v2/library/food/production-chapters/{chapterId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Returns the production chapter (active version)

En-têtes
ETagstring

Version tag of the chapter as stored. Pass it back in If-Match on the next write for optimistic concurrency.

Corpsapplication/json
chapterIdstring, (uuid)read-onlyobligatoire
namestringobligatoire

Library display name of the chapter.

sitesArray of objects or null(ProductionSite)
recipeobject(RecipeRead)

The chapter's recipe: its own composite, the ingredients read through it, and the chapter's own manufacturing detail.

nutritionobject(NutritionalInformation)

READ shape of the production chapter's nutrition table, the counterpart of NutritionalInformationWrite: the nutrient values per reference quantity (100 g / 100 ml), the two automatic switches and the default serving portion. Rounded, per-serving and reference-intake values and the nutri-score are labelling data (NutritionDeclarationRead, labelling chapter).

allergensobject(AllergenDeclarationRead)

The three allergen blocks of the production chapter. Raw-material entries come from the recipe composite's PRESENT declarations. Cross-contamination entries come from the composite's UNINTENTIONALLY PRESENT declarations and from the allergens the chapter's sites handle; an entry with neither is dropped. Free-from entries are the chapter's own list.

Réponse
{ "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811", "name": "string", "sites": [ { … } ], "recipe": { "compositeId": "d7d6ede0-9b7f-49fc-9171-ffe831ea04ff", "ingredients": [ … ], "totalPercentage": 0.1, "manufacturingDiagramFileIds": [ … ], "calculationOfYield": { … }, "recycledProductQuantity": { … } }, "nutrition": { "nutrients": [ … ], "servingSize": { … }, "automaticCalculation": true, "automaticConversion": true }, "allergens": { "rawMaterialAllergens": [ … ], "crossContaminationAllergens": [ … ], "freeFromAllergens": [ … ] } }