Merchant Product
Fetching list of merchant products.
#LIST
Returns a collection of merchant products.
#Filtering
You can filter your results as follows:
#List of merchant products for specific id(s)
-
/merchant-products?filter[id]=1 -
/merchant-products?filter[id]=1,2,3
#List of merchant products for specific merchant(s)
-
/merchant-products?filter[merchant]=1 -
/merchant-products?filter[merchant]=1,2
#List of merchant products for specific master product handle(s)
-
/merchant-products?filter[master_product.handle]=B -
/merchant-products?filter[master_product.handle]=B,I
See: Pagination, Filtering
#Expanding relationships
You can expand some resources to show more details.
See: Expanding Objects
#Expand merchant product
You can show the content of the merchant for a product instead of the id.
-
/merchant-products?expand=merchant
#Available expandable attributes
- merchant
- scale_factors
- production_areas
- positioning_areas
- merchant_variants
- master_product
#Example of fetching merchant product list
Request
GET /merchant-products HTTP/1.1
Response
{
"data": [
{
"id": 1,
"merchant": 1,
"title": {
"de": "T-Shirt 1",
"en": "T-Shirt 1"
},
"is_available": false,
"available_at": "2023-03-06T07:09:42+00:00",
"discontinue_at": null,
"master_product": 7,
"designer": null,
"scale_factors": [],
"production_areas": [],
"positioning_areas": [],
"merchant_variants": [
1,
2
],
"created_at": "2023-03-06T07:09:42+00:00",
"updated_at": "2023-03-06T07:09:42+00:00"
},
{
"id": 2,
"merchant": 1,
"title": {
"de": "T-Shirt 2",
"en": "T-Shirt 2"
},
"is_available": false,
"available_at": "2023-03-06T07:09:42+00:00",
"discontinue_at": null,
"master_product": 7,
"designer": null,
"scale_factors": [],
"production_areas": [],
"positioning_areas": [],
"merchant_variants": [
3,
4
],
"created_at": "2023-03-06T07:09:42+00:00",
"updated_at": "2023-03-06T07:09:42+00:00"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": "https://api.smake.io/master-administration/merchant-products?cursor=eyJwcm9kdWN0aW9uX3ZhcmlhbnRzLmlkIjoyMDIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
},
"meta": {
"path": "https://api.smake.io/master-administration/merchant-products",
"per_page": 15,
"next_cursor": "eyJwcm9kdWN0aW9uX3ZhcmlhbnRzLmlkIjoyMDIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"prev_cursor": null
}
}
#GET
Returns a merchant product of given id = x.
#Example of fetching specified merchant product information
Request
GET /merchant-products/1 HTTP/1.1
Response
{
"id": 1,
"merchant": 1,
"title": {
"de": "T-Shirt 1",
"en": "T-Shirt 1"
},
"is_available": false,
"available_at": "2023-03-06T07:09:42+00:00",
"discontinue_at": null,
"master_product": 7,
"designer": null,
"scale_factors": [],
"production_areas": [],
"positioning_areas": [],
"merchant_variants": [
1,
2,
],
"created_at": "2023-03-06T07:09:42+00:00",
"updated_at": "2023-03-06T07:09:42+00:00"
}
#Expanding relationships
To get a expanded relations please take a look into Expanding objects.
Allowed expansion merchant, scale_factors, merchant_variants, production_areas, positioning_areas and master_product.
#Example of expanded relation
Request
GET /merchant-products/1?expand=merchant HTTP/1.1
Response
{
"id": 1,
"merchant": {
"id": 1,
"name": "earum",
"created_at": "2023-03-06T07:09:12+00:00",
"updated_at": "2023-03-06T07:09:44+00:00"
},
"title": {
"de": "T-Shirt 13 pattern boxed",
"en": "T-Shirt 13 pattern boxed"
},
...
}
#CREATE
Create a new Merchant Product.
#Attributes
| Field | Type | Description | Required |
|---|---|---|---|
| title | json | A json object of localized title. | No |
| description | json | A json object of localized description. | No |
| available_at | datetime | UTC Datetime format | No |
| discontinue_at | datetime | UTC Datetime format | No |
| merchant | array | An array of Merchant Object. | No |
| master_product | array | An array of Master Product Object. | No |
| merchant_variants | array | An array of Merchant Variants Object. | No |
#Merchant Object
| Field | Type | Description | Required |
|---|---|---|---|
| id | integer | The merchant id to which the merchant product should be assigned. | Yes |
#Master Product Object
| Field | Type | Description | Required |
|---|---|---|---|
| id | integer | The master product id from which the data should be taken. | Yes |
#Merchant Variants Object
| Field | Type | Description | Required |
|---|---|---|---|
| external_identifier | string | A string for external identifier | No |
| master_variant | array | An array of Master Variant Object. | Yes |
#Master Variant Object
| Field | Type | Description | Required |
|---|---|---|---|
| id | integer | Master Variant id |
No |
| sku | string | A string for SKU | No |
#Example of creating a new merchant product
Request
POST /merchant-products HTTP/1.1
{
"merchant": {
"id": 1
},
"master_product": {
"id": 8
},
"merchant_variants": [
{
"external_identifier": "2026-X-0001",
"master_variant": {
"id": 1
}
},
{
"external_identifier": "2026-X-0002",
"master_variant": {
"id": 2
}
}
]
}
Response
{
"id": 1,
"merchant": 1,
"title": {
"de": "T-Shirt designbar",
"en": "T-Shirt designable"
},
"is_available": false,
"available_at": null,
"discontinue_at": null,
"master_product": 1,
"designer": null,
"scale_factors": [
1
],
"production_areas": [
1,
2,
3,
4,
5
],
"positioning_areas": [
1,
2,
3,
4,
5
],
"merchant_variants": [
2,
3
],
"created_at": "2026-02-04T12:40:07+00:00",
"updated_at": "2026-02-04T12:40:07+00:00"
}
#UPDATE
Update an existing Merchant Product.
#Attributes
| Field | Type | Description | Required |
|---|---|---|---|
| title | json | A json object of localized title. | No |
| description | json | A json object of localized description. | No |
| available_at | datetime | UTC Datetime format | No |
| discontinue_at | datetime | UTC Datetime format | No |
| designer | array | An array of Designer Object. | No |
#Designer Object
| Field | Type | Description | Required |
|---|---|---|---|
| type | string | Allowed types none, default, detail-page |
Yes |
| only_customized_orderable | boolean | Is merchant product only customized orderable | Yes |
#Example of updating an existing merchant product
Request
PATCH /merchant-products/1 HTTP/1.1
{
"title": {
"de": "T-Shirt",
"en": "T-Shirt"
},
"description": {
"de": "T-Shirt",
"en": "T-Shirt"
},
"available_at": "2026-02-04 11:00:00",
"discontinue_at": "2026-02-04 13:00:00",
"designer": {
"type": "none",
"only_customized_orderable": false
}
}
Response
{
"id": 1,
"merchant": 1,
"title": {
"de": "T-Shirt",
"en": "T-Shirt"
},
"is_available": false,
"available_at": null,
"discontinue_at": null,
"master_product": 1,
"designer": null,
"scale_factors": [
1
],
"production_areas": [
1,
2,
3,
4,
5
],
"positioning_areas": [
1,
2,
3,
4,
5
],
"merchant_variants": [
2,
3
],
"created_at": "2026-02-04T12:00:00+01:00",
"updated_at": "2026-02-04T14:00:00+01:00"
}