Skip to content

Get a product's packaging tree

GET
/products/{product_id}/packaging
curl --request GET \
--url 'https://api.europlaybook.com/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/packaging?history=false' \
--header 'Authorization: Bearer <token>'

Layers > lines > item > materials, with totals_by_material per sales unit on on (default today). history=true also lists lines that are not valid on on (they never count in the totals).

product_id
required
Product Id
string format: uuid
on
Any of:
string format: date
history
History
boolean

OK

Media typeapplication/json
PackagingTreeOut

A product’s packaging as a tree: layers > lines > item > materials, plus the totals per material for one day. The product’s own lines and the lines it inherits from its group (per layer: own lines valid on a day replace the group’s); each line has source, source_ref, inherited, group_id.

object
product_id
required
Product Id
string format: uuid
sku
required
Sku
string
group_id
Any of:
string format: uuid
on
required
On

The day the totals are for (query parameter on, default today).

string format: date
packaging_confirmed
required
Packaging Confirmed

Gate 1 passed (see ProductOut.packaging_confirmed).

boolean
confirmed_at
Any of:
string format: date-time
confirmation
required
ConfirmationOut

Gate 1 with the packaging fingerprint.

object
state
required
State

None = never confirmed; confirmed = the packaging is what a person confirmed; changed = it was confirmed, but the packaging (own or inherited) differs now.

string
Allowed values: none confirmed changed
at
Any of:
string format: date-time
by
Any of:
string
layers
required
Layers
Array<object>
PackagingLayerOut
object
layer
required
Layer

Sales (primary), grouped (secondary) or transport (tertiary).

string
Allowed values: sales grouped transport
lines
required
Lines
Array<object>
PackagingLineOut

One packaging line: quantity parts of item per sales unit, valid over a date range.

object
id
required
Id
string format: uuid
state
required
State

Proposed = not yet checked by a person; confirmed = part of a gate-1 confirmation.

string
Allowed values: proposed confirmed
quantity
required
Quantity

Parts per sales unit (may be a fraction, e.g. 1 film per 1440).

string
household
required
Household

Ends up with households (counts as household packaging).

boolean
scope_channel
Any of:
string
scope_fulfilment
Any of:
string
valid_from
Any of:
string format: date
valid_to
Any of:
string format: date
mass_mg
required
Mass Mg

Packaging mass per sales unit for this line (item mass x quantity).

integer
in_totals
required
In Totals

Counted in totals_by_material: valid on on and not limited to a channel/fulfilment.

boolean
source
required
Source

Where the line came from (provenance).

string
Allowed values: manual csv odoo shopify picqer supplier_spec photo api ai
source_ref
Source Ref

Which record of that source, e.g. api:token:<prefix>.

string
""
inherited
Inherited

The line is the product group’s: the product has no own line on that layer.

boolean
group_id
Any of:
string format: uuid
item
required
PackagingItemOut
object
id
required
Id
string format: uuid
name
required
Name

Name of the packaging part.

string
code
required
Code

Your code for the part (unique per account when set).

string
role_default
required
Role Default

Usual role: sales, grouped, transport, shipping or filler.

string
household_default
required
Household Default

Usually ends up with households (vs. businesses).

boolean
separable
required
Separable

Can be separated from the other parts by hand.

boolean
rigidity
required
Rigidity
string
Allowed values: rigid flexible
recycled_content_pct
Any of:
string
recyclability_grade
Any of:
string
custom_for_product_id
Any of:
string format: uuid
materials
required
Materials

Material breakdown of ONE part.

Array<object>
MaterialMassOut
object
material
required
Material

Material code from the knowledge pack (see /reference/materials).

string
mass_mg
required
Mass Mg

Mass in milligrams.

integer
total_mass_mg
required
Total Mass Mg

Sum of the materials, milligrams.

integer
archived_at
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
mass_mg
required
Mass Mg

Mass per sales unit of this layer’s lines that count in the totals.

integer
totals_by_material
required
Totals By Material

Packaging per sales unit by material on on (lines with in_totals), heaviest first.

Array<object>
MaterialMassOut
object
material
required
Material

Material code from the knowledge pack (see /reference/materials).

string
mass_mg
required
Mass Mg

Mass in milligrams.

integer
total_mass_mg
required
Total Mass Mg

Sum of totals_by_material.

integer
findings
Findings

Automatic plausibility checks on today’s lines.

Array<object>
default:
FindingOut
object
code
required
Code

Stable check code.

string
severity
required
Severity

Info, warning or error.

string
params
Params

Values for the message, per code.

object
key
additional properties
any
line_id
Any of:
string format: uuid
dismissed
Dismissed

A person marked this finding as right (‘klopt zo’).

boolean

Example

{
"product_id": "0199f5a2-7c1e-7b4a-9d0e-3f6c2a1b8e44",
"sku": "TEA-001",
"confirmation": {
"state": "none"
},
"layers": [
{
"layer": "sales",
"lines": [
{
"id": "0199f5a2-7c1e-7b4a-9d0e-3f6c2a1b8e44",
"state": "proposed",
"quantity": "1.0000",
"source": "manual",
"source_ref": "",
"inherited": false,
"item": {
"id": "0199f5a2-7c1e-7b4a-9d0e-3f6c2a1b8e44",
"name": "Folding box S",
"code": "BOX-S",
"rigidity": "rigid",
"materials": [
{
"material": "paper",
"mass_mg": 12000
}
],
"total_mass_mg": 12500
}
}
]
}
],
"totals_by_material": [
{
"material": "paper",
"mass_mg": 12000
}
],
"total_mass_mg": 14500,
"findings": []
}

Bad Request

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}

Unauthorized

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}

Forbidden

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}

Not Found

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}

Conflict

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}

Unprocessable Content

Media typeapplication/json
PublicValidationErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any
errors
Errors

Per-field problems (pydantic format: loc, msg, type).

Array<object>
default:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
},
"errors": []
}

Too Many Requests

Media typeapplication/json
PublicErrorOut
object
detail
required
Detail

What went wrong, in English, for people and logs.

string
code
required
Code

Stable machine-readable error code; translate and branch on this.

string
params
Any of:
object
key
additional properties
any

Example

{
"detail": "This API key lacks the scope catalogue:write",
"code": "insufficient_scope",
"params": {
"required_scope": "catalogue:write"
}
}