Expanding Objects
Many objects contain the id of a related object in their response properties. For example, a Product size labels may
have associated product size ids. Those objects can be expanded inline with the expand request parameter.
Objects that can be expanded are noted in this documentation.
You can expand recursively by specifying nested fields after a dot (.). For example,
requesting product_sizes on an request will expand the product size property into a full product size object.
You can expand multiple objects at once by separating them with a comma.
#Compressed Product sizes
Request
GET /product-size-labels/1 HTTP/1.1
Response
{
"id": 1,
"handle": "herren-hosen-eu",
"name": "Herren Hosen EU",
"product_sizes": [
1,
2,
3,
4,
5,
6
],
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
}
#Expanded Product sizes
Request
GET /product-size-labels/1?expand=product_sizes HTTP/1.1
Response
{
"id": 1,
"handle": "herren-hosen-eu",
"name": "Herren Hosen EU",
"product_sizes": [
{
"id": 1,
"handle": "herren-hosen-eu-d-40",
"value": "40",
"product_size_scale": {
"id": 1,
"name": "D",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
{
"id": 2,
"handle": "herren-hosen-eu-gr-40",
"value": "40",
"product_size_scale": {
"id": 2,
"name": "GR",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
{
"id": 3,
"handle": "herren-hosen-eu-f-46",
"value": "46",
"product_size_scale": {
"id": 3,
"name": "F",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
{
"id": 4,
"handle": "herren-hosen-eu-b-44",
"value": "44",
"product_size_scale": {
"id": 4,
"name": "B",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
{
"id": 5,
"handle": "herren-hosen-eu-i-46",
"value": "46",
"product_size_scale": {
"id": 5,
"name": "I",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
{
"id": 6,
"handle": "herren-hosen-eu-tr-40",
"value": "40",
"product_size_scale": {
"id": 6,
"name": "TR",
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
},
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
}
],
"created_at": "2023-01-10T10:11:11+00:00",
"updated_at": "2023-01-10T10:11:11+00:00"
}