Product Size Label
Fetching product size label(list/individual). Create new product size label.
#List
Returns a collection of product size label.
#Filtering
You can filter your results as follows:
#Fetch product size label list for specific id(s)
-
/product-size-labels?filter[id]=1 -
/product-size-labels?filter[id]=1,2,3
#Fetch product size label list for specific name(s)
-
/product-size-labels?filter[name]=Herren Hosen EU -
/product-size-labels?filter[name]=Herren Hosen EU,Herren Hosen EU2
#Fetch product size label list for specific handle(s)
-
/product-size-labels?filter[handle]=herren-hosen-eu -
/product-size-labels?filter[handle]=herren-hosen-eu,herren-hosen-eu2
#Fetching product size label list
Request
GET /product-size-labels HTTP/1.1
Response
{
"data": [
{
"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"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "https://api.smake.io/master-administration/product-size-labels",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
#Expanding relationships
You can expand some resources to show more details.
See: Expanding Objects
#Expand product size
You can show the content of the product size instead of the id.
-
/product-size-labels?expand=product_sizes
#Fetching product size label list with expanded relation
Request
GET /product-size-labels?expand=product_sizes HTTP/1.1
Response
{
"data": [
{
"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"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "https://api.smake.io/master-administration/product-size-labels",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
#Fetching filtered product size label
Request
GET /product-size-labels?filter[id]=1 HTTP/1.1
Response
{
"data": [
{
"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"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "https://api.smake.io/master-administration/product-size-labels",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
#GET
You can get specific product size label and also with expanded relation.
#Fetch product size label
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"
}
#CREATE
You can create product size label.
#Product Size Array
Array of product size object. Minimum 1 obejct is required.
"product_sizes": [
{
"handle": "herren-hosen-eu",
"value": "17",
"product_size_scale": {
"name": "M"
}
}
]
#Product Size Scale
For a list of available product size scales see Product Size Scales.
| Field | Type | Description | Required |
|---|---|---|---|
| id | int | The product size scale id. | yes* (if handle is missing) |
| handle | string | The product size scale handle which will create new size scale | yes* (if id is missing) |
* You have to choose exactly either id or handle.
#Example of creating a product size label
Request
POST /product-size-labels HTTP/1.1
{
"handle": "1herren-hosen-eu-2",
"name":"1Herren Hosen EU 2",
"product_sizes": [
{
"handle": "1herren-hosen-eu-d-7",
"value": "17",
"product_size_scale": {
"name": "1LKPEQq"
}
},
{
"handle": "1herren-hosen-eu-d-72",
"value": "172",
"product_size_scale": {
"id": 2
}
}
]
}
Response
{
"id": 24,
"handle": "1herren-hosen-eu-6",
"name": "1Herren Hosen EU 6",
"product_sizes": [
17,
16
],
"created_at": "2022-12-15T09:12:47+00:00",
"updated_at": "2022-12-15T09:12:47+00:00"
}