Passer au contenu

Limited
Get packaging specification

Requête

Returns specification identity, status, and chapter references. include adds chapter content in the same response (PackagingSpecificationWithChapters): chapters for every chapter, or a list, e.g. include=general,attestation. Without include, no content is returned. Same rules as FoodSpecifications_GetById: a property is present only when included, a chapter the specification does not have reads null, and the full document carries no ETags (a chapter write uses the ETag of that chapter's own GET).

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

The unique identifier of the specification

Requête
includeArray of strings

Comma-separated. chapters = general, attestation, testing and packagingSystem. An unknown value is a 400.

Items Enum:"chapters""general""attestation""testing""packagingSystem"
curl -i -X GET \
  'https://apis.traceone.com/spec/v2/packaging/specifications/{specificationId}?include=chapters' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Returns the packaging specification, with the content include asked for

Corpsapplication/json
specificationIdstring, (uuid)read-only
namestring or null
Exemple:"Cardboard Box - Organic Cereal 500g"
templateIdstring, (uuid)
ownerCompanyIdstring, (uuid)read-only
ownerUserIdstring, (uuid)

The user of the owner company who owns the specification

supplierCompanyIdstring, (uuid)
languageCodestring or null
Exemple:"en-US"
reasonForThisVersionstring or null
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).

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)

packagingobject or null(PackagingSystemReference)read-only

The linked packaging system; null when none is linked

generalChapterobject or null(PackagingGeneralChapter)

include=general (or chapters). As PackagingSpecifications_GeneralChapter.

attestationChapterobject or null(PackagingAttestationChapter)

include=attestation (or chapters). As PackagingSpecifications_AttestationChapter.

testingChapterobject or null(PackagingTestingChapter)

include=testing (or chapters). As PackagingSpecifications_TestingChapter.

packagingSystemChapterobject or null(PackagingSystemChapter)

include=packagingSystem (or chapters). As PackagingSpecifications_PackagingSystemChapter.

Réponse
{ "specificationId": "df380d59-2906-4417-bec3-4ac4567b1960", "name": "Cardboard Box - Organic Cereal 500g", "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "ownerCompanyId": "10e96248-c873-4e93-b748-bc36e39510eb", "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f", "supplierCompanyId": "60e634ac-9cf5-4a73-a6b6-1e5d15116468", "languageCode": "en-US", "reasonForThisVersion": "string", "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": [ { … } ], "packaging": { "packagingSystemId": "04dbf7ac-1d58-4c7b-a7c1-0e70b0d8f3d3" }, "generalChapter": { "versionInfo": { … }, "retailer": { … }, "supplier": { … }, "customFields": [ … ], "questionnaires": [ … ], "documents": { … } }, "attestationChapter": { "extendedProducerResponsibility": { … }, "environment": { … }, "escStandards": { … }, "customFields": [ … ], "questionnaires": [ … ], "documents": { … } }, "testingChapter": { "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811", "name": "string", "characteristics": [ … ], "controlPlans": [ … ], "questionnaires": [ … ], "documents": { … } }, "packagingSystemChapter": { "packagingSystemId": "04dbf7ac-1d58-4c7b-a7c1-0e70b0d8f3d3", "name": "string", "ownerCompanyId": "10e96248-c873-4e93-b748-bc36e39510eb", "sections": [ … ], "questionnaires": [ … ], "documents": { … } } }