Merchant Variant

Fetching list of merchant variants.

LIST

Returns a collection of merchant variant.

Filtering

You can filter your results as follows:

List of merchant variant for specific id(s)
  • /merchant-variants?filter[id]=1
  • /merchant-variants?filter[id]=1,2,3
List of merchant variant for specific collection(s)
  • /merchant-variants?filter[collection_name]=catalogue
  • /merchant-variants?filter[collection_name]=catalogue,custom,ordered

See: Pagination, Filtering

Expanding relationships

You can expand some resources to show more details.

See: Expanding Objects

Expand merchant variant

You can show the content of the merchant for a variant instead of the id.

  • /merchant-variants?expand=merchant

Available expandable attributes

  • merchant
  • master_variant

Example of fetching merchant variant list

Request

GET /merchant-variants HTTP/1.1

Response

{
	"data": [
		{
			"id": 1,
			"merchant": 1,
			"external_identifier": null,
			"is_available": false,
			"discontinue_at": null,
			"merchant_product": 1,
			"master_variant": 1,
			"option_values": [
				{
					"id": 1,
					"handle": "lime",
					"name": {
						"de": "Limette",
						"en": "lime"
					},
					"option_type": {
						"id": 2,
						"handle": "color",
						"name": {
							"de": "Farbe",
							"en": "Color"
						},
						"created_at": "2023-03-06T07:09:12+00:00",
						"updated_at": "2023-03-06T07:09:12+00:00"
					},
					"media": [],
					"created_at": "2023-03-06T07:09:20+00:00",
					"updated_at": "2023-03-06T07:09:20+00:00"
				},
				{
					"id": 2,
					"handle": "58",
					"name": {
						"de": "58",
						"en": "58"
					},
					"option_type": {
						"id": 1,
						"handle": "size",
						"name": {
							"de": "Größe",
							"en": "Size"
						},
						"created_at": "2023-03-06T07:09:12+00:00",
						"updated_at": "2023-03-06T07:09:12+00:00"
					},
					"media": [],
					"created_at": "2023-03-06T07:09:43+00:00",
					"updated_at": "2023-03-06T07:09:43+00:00"
				}
			],
			"designer": {
                "type": "none",
                "modes": {
                    "free": true,
                    "positioning": true,
                    "production": false
                },
                "only_customized_orderable": false
            },
			"views": [
				{
					"handle": "front",
					"name": "Ansicht vorne",
					"media": [
						{
							"id": 1,
							"collection_name": "view-image",
							"file_name": "view-image-front-lime.png",
							"size": 66200,
							"mime_type": "image/png",
							"download_url": "https://cdn.url/image-front-lime.png",
							"state": "ready",
							"requested": null,
							"failure_message": null,
							"created_at": "2023-03-06T07:09:42+00:00",
							"updated_at": "2023-03-06T07:09:42+00:00"
						}
					],
					"customizations": []
				},
				{
					"handle": "back",
					"name": "Ansicht hinten",
					"media": [],
					"customizations": []
				},
				{
					"handle": "left",
					"name": "Ansicht links",
					"media": [],
					"customizations": []
				},
				{
					"handle": "right",
					"name": "Ansicht rechts",
					"media": [],
					"customizations": []
				}
			],
			"created_at": "2023-03-06T07:09:44+00:00",
			"updated_at": "2023-03-06T07:09:44+00:00"
		},
        {
            "id": 2,
            ...
        },
        {
            "id": 3,
            ...
        }
	],
	"links": {
		"first": null,
		"last": null,
		"prev": null,
		"next": "https://api.smake.io/master-administration/merchant-variants?cursor=eyJwcm9kdWN0aW9uX3ZhcmlhbnRzLmlkIjoyMDIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
	},
	"meta": {
		"path": "https://api.smake.io/master-administration/merchant-variants",
		"per_page": 15,
		"next_cursor": "eyJwcm9kdWN0aW9uX3ZhcmlhbnRzLmlkIjoyMDIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
		"prev_cursor": null
	}
}

GET

Returns a merchant variant of given id = x.

Example of fetching specified merchant variant information

Request

GET /merchant-variants/1 HTTP/1.1

Response

{
    "id": 1,
    "merchant": 1,
    "external_identifier": null,
    "is_available": false,
    "discontinue_at": null,
    "merchant_product": 1,
    "master_variant": 1,
    "option_values": [
        {
            "id": 1,
            "handle": "lime",
            "name": {
                "de": "Limette",
                "en": "lime"
            },
            "option_type": {
                "id": 2,
                "handle": "color",
                "name": {
                    "de": "Farbe",
                    "en": "Color"
                },
                "created_at": "2023-03-06T07:09:12+00:00",
                "updated_at": "2023-03-06T07:09:12+00:00"
            },
            "media": [],
            "created_at": "2023-03-06T07:09:20+00:00",
            "updated_at": "2023-03-06T07:09:20+00:00"
        },
        {
            "id": 2,
            "handle": "58",
            "name": {
                "de": "58",
                "en": "58"
            },
            "option_type": {
                "id": 1,
                "handle": "size",
                "name": {
                    "de": "Größe",
                    "en": "Size"
                },
                "created_at": "2023-03-06T07:09:12+00:00",
                "updated_at": "2023-03-06T07:09:12+00:00"
            },
            "media": [],
            "created_at": "2023-03-06T07:09:43+00:00",
            "updated_at": "2023-03-06T07:09:43+00:00"
        }
    ],
    "designer": {
		"type": "none",
		"modes": {
			"free": true,
			"positioning": true,
			"production": false
		},
		"only_customized_orderable": false
	},
    "views": [
        {
            "handle": "front",
            "name": "Ansicht vorne",
            "media": [
                {
                    "id": 1,
                    "collection_name": "view-image",
                    "file_name": "view-image-front-lime.png",
                    "size": 66200,
                    "mime_type": "image/png",
                    "download_url": "https://cdn.url/image-front-lime.png",
                    "state": "ready",
                    "requested": null,
                    "failure_message": null,
                    "created_at": "2023-03-06T07:09:42+00:00",
                    "updated_at": "2023-03-06T07:09:42+00:00"
                }
            ],
            "customizations": []
        },
        {
            "handle": "back",
            "name": "Ansicht hinten",
            "media": [],
            "customizations": []
        },
        {
            "handle": "left",
            "name": "Ansicht links",
            "media": [],
            "customizations": []
        },
        {
            "handle": "right",
            "name": "Ansicht rechts",
            "media": [],
            "customizations": []
        }
    ],
    "created_at": "2023-03-06T07:09:44+00:00",
    "updated_at": "2023-03-06T07:09:44+00:00"
}

Expanding relationships

To get a expanded relations please take a look into Expanding objects. Allowed expansion merchant and master_variant.

Example of expanded relation

Request

GET /merchant-variants/1?expand=merchant HTTP/1.1

Response

{
  "data": [
    {
      "id": 1,
      "merchant": {
        "id": 1,
        "name": "Shop",
        "created_at": "2026-02-19T08:47:43+00:00",
        "updated_at": "2026-02-19T08:48:57+00:00"
      },
      "external_identifier": "merchant-product-1-yellow-XS",
      "is_available": true,
      "discontinue_at": null,
      ...
    }
  ]
}

UPDATE

Update an existing Merchant Variant.

Attributes

Field Type Description Required
external_identifier string Unique identifier for the intended use. No
discontinue_at datetime UTC Datetime format No

Example of updating an existing merchant variant

Request

PATCH /merchant-variants/1 HTTP/1.1

{
    "external_identifier": "1234567890",
    "available_at": "2026-02-04 11:00:00",
}

Response

{
  "id": 1,
  "merchant": 1,
  "external_identifier": "test-1234",
  "is_available": false,
  "discontinue_at": null,
  "merchant_product": 33,
  "master_variant": 1023,
  "option_values": [
    {
      "id": 11,
      "handle": "white",
      "name": {
        "de": "white",
        "en": "white"
      },
      "option_type": {
        "id": 2,
        "handle": "color",
        "name": {
          "de": "Farbe",
          "en": "Color"
        },
        "created_at": "2026-02-20T08:15:38+00:00",
        "updated_at": "2026-02-20T08:15:38+00:00"
      },
      "media": [
        658
      ],
      "created_at": "2026-02-20T08:15:45+00:00",
      "updated_at": "2026-02-20T08:15:45+00:00"
    },
    {
      "id": 73,
      "handle": "58N",
      "name": {
        "de": "58N",
        "en": "58N"
      },
      "option_type": {
        "id": 1,
        "handle": "size",
        "name": {
          "de": "Größe",
          "en": "Size"
        },
        "created_at": "2026-02-20T08:15:38+00:00",
        "updated_at": "2026-02-20T08:15:38+00:00"
      },
      "media": [],
      "created_at": "2026-02-20T08:17:42+00:00",
      "updated_at": "2026-02-20T08:17:42+00:00"
    }
  ],
  "designer": {
    "type": "none",
    "modes": {
      "free": false,
      "positioning": false,
      "production": false
    },
    "only_customized_orderable": false
  },
  "views": [
    {
      "handle": "front",
      "name": "Ansicht vorne",
      "media": [
        {
          "id": 5167,
          "collection_name": "view-image",
          "file_name": "view-image-front-white.png",
          "size": 29497,
          "mime_type": "image/png",
          "download_url": "https://api.smake.test/storage/files/2b7316ffed3a44898fa8fef6ebd89c76/view-image-front-white.png?expires=1772187214&signature=436d16313f880a9ba5a7692501dcebf819e4365185dc62bfceda23d9c7208dc6",
          "state": "pending",
          "requested": null,
          "failure_message": null,
          "created_at": "2026-02-20T08:17:29+00:00",
          "updated_at": "2026-02-20T08:17:29+00:00"
        }
      ],
      "customizations": []
    },
    {
      "handle": "back",
      "name": "Ansicht hinten",
      "media": [
        {
          "id": 5168,
          "collection_name": "view-image",
          "file_name": "view-image-back-white.png",
          "size": 22290,
          "mime_type": "image/png",
          "download_url": "https://api.smake.test/storage/files/13a9746da9b4489ba362a48769ad5161/view-image-back-white.png?expires=1772187214&signature=db48ac1e05b490fe3d8bdcb5069f93aa70666d49917d7862be7efcdb85da33a9",
          "state": "pending",
          "requested": null,
          "failure_message": null,
          "created_at": "2026-02-20T08:17:29+00:00",
          "updated_at": "2026-02-20T08:17:29+00:00"
        }
      ],
      "customizations": []
    },
    {
      "handle": "left",
      "name": "Ansicht links",
      "media": [
        {
          "id": 5169,
          "collection_name": "view-image",
          "file_name": "view-image-left-white.png",
          "size": 16584,
          "mime_type": "image/png",
          "download_url": "https://api.smake.io/storage/files/79dd568d05ed41058f857c2d4506cfb2/view-image-left-white.png?expires=1772187214&signature=fef93f6345c1fa3e508e4794cb6df17dc08e5c85054f7bd5e936141ae3be05b8",
          "state": "pending",
          "requested": null,
          "failure_message": null,
          "created_at": "2026-02-20T08:17:29+00:00",
          "updated_at": "2026-02-20T08:17:29+00:00"
        }
      ],
      "customizations": []
    },
    {
      "handle": "right",
      "name": "Ansicht rechts",
      "media": [
        {
          "id": 5170,
          "collection_name": "view-image",
          "file_name": "view-image-right-white.png",
          "size": 17038,
          "mime_type": "image/png",
          "download_url": "https://api.smake.io/storage/files/d8001089a68c4e34b25f18ae47a95217/view-image-right-white.png?expires=1772187214&signature=4c029424b81d0136fada2474bd0c189b666979f8dd46a67dfc7d43bb7a765e83",
          "state": "pending",
          "requested": null,
          "failure_message": null,
          "created_at": "2026-02-20T08:17:29+00:00",
          "updated_at": "2026-02-20T08:17:29+00:00"
        }
      ],
      "customizations": []
    }
  ],
  "collection_name": "catalogue",
  "created_at": "2026-02-20T08:17:42+00:00",
  "updated_at": "2026-02-20T10:13:34+00:00"
}