Basic information
GET /{shopId}/products/{productId}/variations
Returns links to product variations in a paged item list.
“name” and “value” are used to find a matching variation for the user’s selection. Note that the default resultsPerPage is 100 and max resultsPerPage is 1000 for this resource.
Authorisation
OAuth 2.0 Token required with scopes:
products_read
URI parameters
Name | Type | Description |
---|---|---|
shopId |
string |
The unique identifier of the shop. Required:
true
Example:
DemoShop
|
productId |
string |
The unique identifier of the product. Required:
true
Example:
52F221E0-36F6-DC4E-384A-AC1504050C04
|
Query parameters
Name | Type | Description |
---|---|---|
locale |
string |
Represents the language code according to ISO 639-1 and the country code according to ISO 3166-1. If not provided, the shop’s default language is used. We recommend to always send this parameter with your request. If the default language had been changed in the administration, it might take up to 1 day until this change affects the shop. Required:
false
Example:
en_US
|
page |
integer |
Represents the current page. Required:
false
Default:
1
Minimum:
1
|
resultsPerPage |
integer |
Specifies the maximum number of results per page. Required:
false
Default:
100
Maximum:
1000
|
Response attributes
Name | Type | Description |
---|---|---|
variationAttributes |
array of variationAttribute |
The existing variations of the product, e.g. colour. |
items |
array of variation |
The available variations of the product that are set visible in the administration area of the shop. |
results |
integer |
The number of variations in total. |
resultsPerPage |
integer |
The number of variations returned per page. |
page |
integer |
The page number on which the variation appears. |
links |
array of link |
The links to the product variations. |
Response
HTTP 200
Media type application/json
{ "results": 5, "resultsPerPage": 100, "page": 1, "links": [], "variationAttributes": [ { "name": "Size", "displayName": "Size", "values": [ { "value": "M", "displayValue": "M" }, { "value": "L", "displayValue": "L" } ] }, { "name": "Colour", "displayName": "Colour", "values": [ { "value": "Black", "displayValue": "Black" }, { "value": "White", "displayValue": "White" }, { "value": "Grey", "displayValue": "Grey" } ] } ], "items": [ { "link": { "rel": "variation", "href": "https://pm.epages.com/rs/shops/apidocu/products/5A8FF070-100C-A364-ACAC-AC154546EA1D" }, "attributeSelection": [ { "name": "Size", "displayName" "Size", "value": "M", "displayValue": "M" }, { "name": "Colour", "displayName" "Colour", "value": "Black", "displayValue": "Black" } ] }, { "link": { "rel": "variation", "href": "https://pm.epages.com/rs/shops/apidocu/products/5A8FF070-84EB-22FE-2BC2-AC154546EA0E" }, "attributeSelection": [ { "name": "Size", "displayName" "Size", "value": "L", "displayValue": "L" }, { "name": "Colour", "displayName" "Colour", "value": "Black", "displayValue": "Black" } ] }, { "link": { "rel": "variation", "href": "https://pm.epages.com/rs/shops/apidocu/products/5A8FF071-0D78-7764-CF5C-AC154546EA43" }, "attributeSelection": [ { "name": "Size", "displayName" "Size", "value": "M", "displayValue": "M" }, { "name": "Colour", "displayName" "Colour", "value": "White", "displayValue": "White" } ] }, { "link": { "rel": "variation", "href": "https://pm.epages.com/rs/shops/apidocu/products/5A8FF071-D0B0-0A70-891D-AC154546EA75" }, "attributeSelection": [ { "name": "Size", "displayName" "Size", "value": "L", "displayValue": "L" }, { "name": "Colour", "displayName" "Colour", "value": "White", "displayValue": "White" } ] }, { "link": { "rel": "variation", "href": "https://pm.epages.com/rs/shops/apidocu/products/5A8FF071-FE88-72D1-E672-AC154546EAE1" }, "attributeSelection": [ { "name": "Size", "displayName" "Size", "value": "M", "displayValue": "M" }, { "name": "Colour", "displayName" "Colour", "value": "Grey", "displayValue": "Grey" } ] } ] }