Skip to content

Designed
Get food specification

Request

Returns specification identity, status, and chapter references. include adds content in the same response (FoodSpecificationWithChapters): chapters for every chapter, or a list of the chapters and sub-resources wanted, e.g. include=general,labelling or include=chapters,questionnaires. Without include, no content is returned. A property is present only when its value is included; a chapter the specification does not have reads null.

The full document carries no ETags. A chapter write (If-Match) uses the ETag of that chapter's own GET, which stays the address for reading one chapter. Content is composed by the same read mappers as the chapter GETs, so both answer the same.

Security
oauth2(Required scopes: t1_api)
Path
specificationIdstring, (uuid)required

The unique identifier of the specification

Query
includeArray of strings

Comma-separated. chapters = general, labelling, production, testing, finishedProduct and customChapters. An unknown value is a 400.

Items Enum:"chapters""general""labelling""production""testing""finishedProduct""customChapters""questionnaires""requirements"
curl -i -X GET \
  'https://apis.traceone.com/spec/v2/food/specifications/{specificationId}?include=chapters' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Returns the food specification, with the content include asked for

Bodyapplication/json
specificationIdstring, (uuid)read-only
namestring or nullread-only

Derived from the trade item

Example:"Organic Strawberry Yogurt 150g"
templateTypestringread-only
Example:"Food"
templateIdstring, (uuid)
tradeItemIdstring or null, (uuid)
ownerCompanyIdstring, (uuid)read-only
ownerUserIdstring, (uuid)

The user of the owner company who owns the specification

supplierCompanyIdstring, (uuid)
languageCodestring or null
Example:"en-US"
reasonForThisVersionstring or null
folderIdstring or null, (uuid)

The folder the specification is placed in; null when it is in none

statusstring(SpecificationStatus)read-only

Lifecycle status of a specification version. Draft: not yet in progress. InProgress: being filled. ValidatedBySupplier / ValidatedByRetailer: validated by that party. LockedForSupplierSignature / LockedForRetailerSignature: locked while that party signs. SignedBySupplier / SignedByRetailer: signed by that party. InRevisionBySupplier / InRevisionByRetailer: reopened for revision by that party.

Enum:"Draft""InProgress""ValidatedBySupplier""ValidatedByRetailer""LockedForSupplierSignature""LockedForRetailerSignature""SignedBySupplier""SignedByRetailer""InRevisionBySupplier""InRevisionByRetailer"
sharedWithCompanyIdsArray of strings, (uuid)read-only

Companies with access to the specification: the owner always, the supplier once the specification has been shared (POST .../share or the share of its folder).

contactsArray of objects(SpecificationPartyContact)read-only

Contacts of both parties

versionobject(ObjectVersion)
creationDateUtcstring, (date-time)read-only
lastUpdateDateUtcstring, (date-time)read-only
signaturesobject or null(SpecificationSignatures)read-only

The signature of this specification version. Absent (null) until a signature process starts.

libraryLinkedChaptersArray of objects(LinkedChapter)read-only

Library chapters linked to the specification (empty when none)

generalChapterobject or null(FoodGeneralChapter)

include=general (or chapters). As FoodSpecifications_GeneralChapter.

labellingChapterobject or null(FoodLabellingChapter)

include=labelling (or chapters). As FoodSpecifications_LabellingChapter.

productionChapterobject or null(FoodProductionChapter)

include=production (or chapters). As FoodSpecifications_ProductionChapter: one entry per linked production chapter (several on an assortment specification).

testingChapterobject or null(FoodTestingChapter)

include=testing (or chapters). As FoodSpecifications_TestingChapter.

finishedProductChapterobject or null(FoodFinishedProductChapter)

include=finishedProduct (or chapters). As FoodSpecifications_FinishedProductChapter.

customChaptersArray of objects(CustomChapter)

include=customChapters (or chapters). One entry per custom chapter of the specification's template, as FoodSpecifications_CustomChapter. Empty when there are none.

questionnairesArray of objects(QuestionnaireView)

include=questionnaires. As FoodSpecifications_GetQuestionnaires.

requirementsArray of objects(SpecificationRequirement)

include=requirements. As FoodSpecifications_Requirements.

Response
{ "specificationId": "df380d59-2906-4417-bec3-4ac4567b1960", "name": "Organic Strawberry Yogurt 150g", "templateType": "Food", "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "tradeItemId": "ca25da54-cf50-4957-b1f6-2a6f444fe8a3", "ownerCompanyId": "10e96248-c873-4e93-b748-bc36e39510eb", "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f", "supplierCompanyId": "60e634ac-9cf5-4a73-a6b6-1e5d15116468", "languageCode": "en-US", "reasonForThisVersion": "string", "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e", "status": "Draft", "sharedWithCompanyIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "contacts": [ { … } ], "version": { "number": 0, "activeVersion": true, "lastVersion": true }, "creationDateUtc": "2019-08-24T14:15:22Z", "lastUpdateDateUtc": "2019-08-24T14:15:22Z", "signatures": { "signedFileId": "eda2144a-d0ac-4eab-bfe4-97518320bb67", "retailerSignature": { … }, "supplierSignature": { … } }, "libraryLinkedChapters": [ { … } ], "generalChapter": { "versionInfo": { … }, "product": { … }, "retailer": { … }, "supplier": { … }, "customFields": [ … ], "requirements": [ … ], "documents": { … }, "questionnaires": [ … ] }, "labellingChapter": { "productInformation": { … }, "nutriScore": { … }, "consumerInstructions": { … }, "sortingInstructions": { … }, "gmoRiskAnalysis": { … }, "additionalMarketingInformation": { … }, "businessNameAndAddress": { … }, "ingredientDeclaration": { … }, "nutritionalInformation": { … }, "claims": [ … ], "customFields": [ … ], "requirements": [ … ], "documents": { … } }, "productionChapter": { "productionChapters": [ … ], "requirements": [ … ], "documents": { … } }, "testingChapter": { "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811", "name": "string", "characteristics": [ … ], "controlPlans": [ … ], "requirements": [ … ], "documents": { … } }, "finishedProductChapter": { "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811", "name": "string", "productPhotos": { … }, "shelfLife": { … }, "consumerShelfLife": { … }, "storageConditions": [ … ], "preservationMethodIds": [ … ], "traceability": { … }, "requirements": [ … ], "documents": { … } }, "customChapters": [ { … } ], "questionnaires": [ { … } ], "requirements": [ { … } ] }