Product
Fetching list of master products.
#LIST
Return a collection of master products.
#Filtering
You can filter your results as follows:
#Fetch master product list for specific id(s)
-
/products?filter[id]=1 -
/products?filter[id]=1,2,3
#Fetch master product list for specific product handle(s)
-
/products?filter[handle]=12345 -
/products?filter[handle]=12345,bag,67890
#List of product for specific available min date
-
/products?filter[available_at_min]=2026-01-01 13:00:00
#List of product for specific available max date
-
/products?filter[available_at_max]=2026-01-31 13:00:00
#List of product for specific available date at equals
-
/products?filter[available_at_equals]=2026-01-31 13:00:00
#List of product for specific discontinued min date
-
/products?filter[discontinue_at_min]=2026-01-01 13:00:00
#List of product for specific discontinued max date
-
/products?filter[discontinue_at_max]=2026-01-31 13:00:00
#List of product for specific discontinued date at equals
-
/products?filter[discontinue_at_equals]=2026-01-31 13:00:00
See: Pagination, Filtering
#Expanding relationships
You can expand some resources to show more details.
See: Expanding Objects
#Example of fetching master product list
Request
GET /products HTTP/1.1
Response
{
"data": [
{
"id": 6,
"handle": "0TyqQ5jRSDPHbK7G",
"manufacturer_number": "g9CZTR40EpoP9Mf5",
"name": {
"de": "German",
"en": "English",
"fr": "France",
"ja": "Japan",
"nl": "Netherlands"
},
"description": {
"de": "Quam mollitia nisi esse corrupti. Blanditiis occaecati dolor saepe est delectus sapiente qui. Voluptatem sit sit enim laboriosam harum. Veniam ut maiores consequatur laborum modi.",
"en": "Quam mollitia nisi esse corrupti. Blanditiis occaecati dolor saepe est delectus sapiente qui. Voluptatem sit sit enim laboriosam harum. Veniam ut maiores consequatur laborum modi."
},
"country": 72,
"brand": 14,
"material_type": 1,
"variants": [
181,
182,
183,
184,
185,
186,
187,
.....
],
"scale_factors": [
5,
6,
7,
8
],
"production_areas": [
13,
14,
.....
],
"positioning_areas": [
28,
29,
30,
......
],
"available_at": "2023-01-10T10:11:27+00:00",
"discontinue_at": null,
"created_at": "2023-01-10T10:11:27+00:00",
"updated_at": "2023-01-17T10:58:58+00:00"
},
{
"id": 5,
"handle": "0qPk8lxcojwqScL2",
"manufacturer_number": "NuWExwVisAsIFzny",
"name": {
"de": "T-Shirt 5 designbar",
"en": "T-Shirt 5 designable"
},
"description": {
"de": "Unde nulla expedita sed. Accusantium veritatis consectetur aut natus numquam debitis qui. Ut tempora eum impedit ut rerum eaque rerum. Ipsa est aut dolores veniam sed cupiditate occaecati.",
"en": "Unde nulla expedita sed. Accusantium veritatis consectetur aut natus numquam debitis qui. Ut tempora eum impedit ut rerum eaque rerum. Ipsa est aut dolores veniam sed cupiditate occaecati."
},
"country": 135,
"brand": 13,
"material_type": 1,
"variants": [
145,
146,
147,
148,
149,
......
],
"scale_factors": [
1,
2,
3,
4
],
"production_areas": [
1,
2,
.....
],
"positioning_areas": [
1,
2,
......
],
"available_at": "2023-01-10T10:11:26+00:00",
"discontinue_at": null,
"created_at": "2023-01-10T10:11:26+00:00",
"updated_at": "2023-01-10T10:11:26+00:00"
},
.....
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "https://api.smake.io/master-administration/products",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
#Example of fetching master product list with expand
Request
GET /products?expand=country HTTP/1.1
Response
{
"data": [
{
"id": 6,
"handle": "0TyqQ5jRSDPHbK7G",
"manufacturer_number": "g9CZTR40EpoP9Mf5",
"name": {
"de": "German",
"en": "English",
"fr": "France",
"ja": "Japan",
"nl": "Netherlands"
},
"description": {
"de": "Quam mollitia nisi esse corrupti. Blanditiis occaecati dolor saepe est delectus sapiente qui. Voluptatem sit sit enim laboriosam harum. Veniam ut maiores consequatur laborum modi.",
"en": "Quam mollitia nisi esse corrupti. Blanditiis occaecati dolor saepe est delectus sapiente qui. Voluptatem sit sit enim laboriosam harum. Veniam ut maiores consequatur laborum modi."
},
"country": {
"id": 1,
"handle": "GA",
"name": {
"de": "Gabun",
"en": "Gabon"
},
"created_at": "2016-11-14T19:12:38+00:00",
"updated_at": "2017-09-07T14:05:06+00:00"
},
.....
}
]
}
#Available expandable attributes:
- country
- brand
- variants
- material_type
- scale_factors
- production_areas
- production_areas.production_method
- positioning_areas
- positioning_areas.identifier
- positioning_areas.clamping_device
- positioning_areas.production_method
#GET
Returns a master product of given id = x.
#Example of fetching specified master product information
Request
GET /products/2 HTTP/1.1
Response
{
"id": 2,
"handle": "SWn1jwU1XUDfZESy",
"manufacturer_number": "xDj5Mw1Bov1So4H2",
"name": {
"de": "T-Shirt 2 nicht designbar",
"en": "T-Shirt 2 not designable"
},
"description": {
"de": "Occaecati laboriosam occaecati ullam commodi id quasi perferendis. Ratione placeat dolorem in odio rerum temporibus. Sunt commodi praesentium magnam recusandae. Quia ad quis et quia deleniti rerum.",
"en": "Occaecati laboriosam occaecati ullam commodi id quasi perferendis. Ratione placeat dolorem in odio rerum temporibus. Sunt commodi praesentium magnam recusandae. Quia ad quis et quia deleniti rerum."
},
"country": 220,
"brand": 10,
"material_type": 1,
"variants": [
37,
38,
.......
],
"scale_factors": [],
"production_areas": [],
"positioning_areas": [],
"available_at": "2023-01-10T10:11:21+00:00",
"discontinue_at": null,
"created_at": "2023-01-10T10:11:21+00:00",
"updated_at": "2023-01-10T10:11:21+00:00"
}
#Expand relation
To get a expanded relations please take a look into Expanding objects.
Allowed expansion country, brand, variants, material_type, scale_factors, production_areas, production_areas.production_method, positioning_areas, positioning_areas.identifier, positioning_areas.clamping_device, positioning_areas.production_method.
#Example of expanded relation
Request
GET /products/2?expand=variants HTTP/1.1
Response
{
"id": 2,
"handle": "SWn1jwU1XUDfZESy",
"manufacturer_number": "xDj5Mw1Bov1So4H2",
"name": {
"de": "T-Shirt 2 nicht designbar",
"en": "T-Shirt 2 not designable"
},
"description": {
"de": "Occaecati laboriosam occaecati ullam commodi id quasi perferendis. Ratione placeat dolorem in odio rerum temporibus. Sunt commodi praesentium magnam recusandae. Quia ad quis et quia deleniti rerum.",
"en": "Occaecati laboriosam occaecati ullam commodi id quasi perferendis. Ratione placeat dolorem in odio rerum temporibus. Sunt commodi praesentium magnam recusandae. Quia ad quis et quia deleniti rerum."
},
"country": 220,
"brand": 10,
"material_type": 1,
"variants": [
{
"id": 37,
"product_id": 2,
"sku": "production-variant-37",
"external_identifier": "product-2-white-S",
"hs_tariff_code": "9791994518336",
"price": 171.4,
"cost_price": 44.73,
"tax_rate": 7,
"is_master": false,
"option_values": [
{
"id": 5,
"handle": "white",
"name": {
"de": "white",
"en": "white"
},
"option_type": {
"id": 2,
"handle": "color",
"name": {
"de": "ut",
"en": "consequuntur"
},
"created_at": "2023-01-10T10:11:10+00:00",
"updated_at": "2023-01-10T10:11:10+00:00"
},
"media": [
{
"id": 159,
"collection_name": "preview",
"file_name": "production-option-value-white.png",
"size": 292,
"mime_type": "image\/png",
"download_url": "https:\/\/api.smake.test\/temporary-url?expires=1674407678&path=files%2Fc5cc45920d5b4bef98ea9e509b07fa1c%2Fproduction-option-value-white.png&signature=066d6bb9b2ab3a254990e318dc8d8f2116626b151b41c927c7c011ddc1d5a94a",
"state": "pending",
"requested": null,
"failure_message": null,
"created_at": "2023-01-10T10:11:18+00:00",
"updated_at": "2023-01-10T10:11:18+00:00"
}
],
"media_state": "empty",
"created_at": "2023-01-10T10:11:18+00:00",
"updated_at": "2023-01-10T10:11:18+00:00"
},
]
............
}
],
"scale_factors": [],
"production_areas": [],
"positioning_areas": [],
"available_at": "2023-01-10T10:11:21+00:00",
"discontinue_at": null,
"created_at": "2023-01-10T10:11:21+00:00",
"updated_at": "2023-01-10T10:11:21+00:00"
}
#CREATE
Create a new master product.
#Example of create a new master product
Request
POST /async/products HTTP/1.1
{
"handle": "my-product-1",
"name": {
"de": "Mein Produkt 1",
"en": "My product 1"
},
"description": {
"de": "Beschreibung zu meinem Produkt 1",
"en": "Description for my product 1"
},
"variants": [
{
"sku": "my-variant-8",
"external_identifier": "my-product-1-variant-1",
"price": 15.00,
"cost_price": 8.0,
"tax_rate": 19,
"discontinue_at": null,
"option_values": [
{
"id": 1
},
{
"id": 2
}
],
"views": [
{
"handle": "front",
"media": [
{
"url": "https://smake-public.s3.eu-west-1.amazonaws.com/testfiles/logo.png",
"collection": "view-image"
}
]
},
{
"handle": "back",
"media": [
{
"url": "https://smake-public.s3.eu-west-1.amazonaws.com/testfiles/logo.png",
"collection": "view-image"
}
]
}
]
}
],
"available_at": "2026-01-01T00:00:01+00:00",
"discontinue_at": null
}
Response
{
"id": 18,
"handle": "my-product-1",
"variants": [
{
"id": 1024,
"sku": "my-variant-8"
}
]
}
#UPDATE
Update a master product.
#Example of update a specified master product
Request
PUT /async/products/18 HTTP/1.1
{
"handle": "my-product-11",
"name": {
"de": "Mein Produkt 11",
"en": "My product 11"
},
"description": {
"de": "Beschreibung zu meinem Produkt 11",
"en": "Description for my product 11"
},
"variants": [],
"available_at": "2026-01-01T00:00:01+00:00",
"discontinue_at": null
}
Response
{
"id": 18,
"handle": "my-product-1",
"variants": [
{
"id": 1024,
"sku": "my-variant-8"
}
]
}
#SYNC PRODUCT INTO MERCHANT
#Example of syncing a specified master product into merchant
Request
PUT /products/18/sync-to-merchants HTTP/1.1
Response
HTTP/1.1 200 Ok
#DELETE
#Example of deleting a specified master product
Request
DELETE /products/2 HTTP/1.1
Response
HTTP/1.1 204 No Content
Validation Errors
404 Not Found – Production Product Not Found
{
"message": "No results found for Production Product"
}
Possible causes:
- The value in the URL (
{productionProductId}) does not point to a valid Production Product or is invalid.
423 Locked – Production Product is being processed
{
"message": "The product: 1 is being processed"
}
Possible causes:
- To prevent the same product from being processed multiple times simultaneously, we lock the process until it is completed
500 Internal Server Error – Unexpected Error
{
"message": "An unknown error occurred."
}
Possible causes:
- Internal server error
- Faulty system dependency
- Database or service outage
Note: The error is automatically recorded and reported on the server side.
#DELETE VARIANT
#Example of deleting a specified master product variant
Request
DELETE /products/2/variants/1 HTTP/1.1
Response
HTTP/1.1 204 No Content
Validation Errors
404 Not Found – Production Product Not Found
{
"message": "No results found for Production Product"
}
Possible causes:
- The value in the URL (
{productionProductId}) does not point to a valid Production Product or is invalid.
404 Not Found – Production Variant Not Found
{
"message": "No results found for Production Variant"
}
Possible causes:
- The value in the URL (
{productionVariantId}) does not point to a valid Production Variant or is invalid.
423 Locked – Production Product is being processed
{
"message": "The product: 2 is being processed"
}
Possible causes:
- To prevent the same product from being processed multiple times simultaneously, we lock the process until it is completed
500 Internal Server Error – Unexpected Error
{
"message": "An unknown error occurred."
}
Possible causes:
- Internal server error
- Faulty system dependency
- Database or service outage
Note: The error is automatically recorded and reported on the server side.