Passer au contenu

Designed
Create a packaging system

Requête

Creates a packaging system owned by your company from existing, published packaging components, born published as version 1, active: a packaging specification can link it right away. Atomic: nothing is created when a value is refused.

The component fields keep the names the Packaging application uses (componentId, componentRecyclabilityId).

Sécurité
oauth2(Portées requises: t1_api)
En-têtes
Idempotency-Keystring, <= 255 characters

Not active yet. A unique key per create: a retried call with the same key will answer the result of the first call instead of creating again. Until it is active, check whether the item exists before retrying a create.

Corpsapplication/jsonobligatoire
namestringobligatoire

Unique among your company's packaging systems.

componentsArray of objects, non-empty(PackagingSystemComponentWrite)obligatoire
curl -i -X POST \
  https://apis.traceone.com/spec/v2/library/packaging-systems \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "name": "string",
    "components": [
      {
        "componentId": "616ccd92-d666-4180-8349-8d125b269fac",
        "componentQuantity": 1,
        "isMainComponent": true,
        "componentRecyclabilityId": "68e74424-17e7-4e0c-b8a6-3b925d9394c8",
        "linkedComponentIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ]
  }'

Réponses

The system was created.

Corpsapplication/json
packagingSystemIdstring, (uuid)
Réponse
{ "packagingSystemId": "04dbf7ac-1d58-4c7b-a7c1-0e70b0d8f3d3" }