Passer au contenu

Designed
Get finished product chapter

Requête

Returns the finished product chapter content including product photos, shelf life, storage conditions, preservation methods, and traceability.

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

The unique identifier of the specification

curl -i -X GET \
  'https://apis.traceone.com/spec/v2/food/specifications/{specificationId}/finished-product-chapter' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Returns the finished product chapter

Corpsapplication/json
chapterIdstring or null, (uuid)read-only

The library chapter this content belongs to.

namestring

Library display name of the chapter, as written on its create or replace.

productPhotosobject(ProductPhotos)

The product photos of the finished product chapter. Three separate lists of file ids - packaged, sectioned, unpackaged - the category is the list an id is in, not a property of the photo. There is no per-photo name or description to write: the file name comes from the file itself.

Each list replaces the stored one in full; null or absent leaves that list unchanged, [] clears it. Every id must be a file of type "product picture" owned by your company.

shelfLifeobject(FinishedProductShelfLife)

Section shelf_life, first block. This chapter is where shelf life is DECLARED; the labelling chapter's copy of it is derived. The five durations are independent: the guaranteed shelf life of the product, and how long it keeps at each stage.

guaranteedShelfLife.duration exists only while indicationId is set - clearing the id deletes the duration. A payload carrying a duration with no indicationId is therefore refused with a 422 naming guaranteedShelfLife.indicationId, rather than answering 200 having dropped it.

consumerShelfLifeobject(FinishedProductConsumerShelfLife)

Section shelf_life, second block - the shelf life as the consumer sees it.

storageConditionsArray of objects or null(StorageCondition)
preservationMethodIdsArray of strings or null, (uuid)

PreservationMethod reference list.

traceabilityobject(Traceability)

sampleStorage is present exactly when sample storage is accepted and absent otherwise, never null - the same rule as on the write, so sending the read back keeps the acceptance as it is. Accepted with no conditions entered, it reads as an object whose members are null.

requirementsArray of objects or null(Requirement)read-only

Requirements attached to this chapter by the specification. A specification-level value: null when the chapter is read at its library address.

documentsobject or null(DocumentSection)read-only

Documents attached to this chapter by the specification. A specification-level value: null when the chapter is read at its library address.

Réponse
{ "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811", "name": "string", "productPhotos": { "packaged": [ … ], "sectioned": [ … ], "unpackaged": [ … ] }, "shelfLife": { "guaranteedShelfLife": { … }, "production": { … }, "packaging": { … }, "shipping": { … }, "delivery": { … }, "protocolFileIds": [ … ] }, "consumerShelfLife": { "beforeOpeningIndicationId": "661e052b-d1e8-4a19-bacb-cd3e47f97623", "afterOpening": { … }, "shelfLifeTesting": true }, "storageConditions": [ { … } ], "preservationMethodIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "traceability": { "batchLotNumberFormatting": "string", "productionBatchSize": "string", "samplesKeptPerBatch": 0, "sampleRetentionTime": { … }, "sampleStorage": { … }, "procedureFileIds": [ … ] }, "requirements": [ { … } ], "documents": { "files": [ … ] } }