Product variations, such as sizes or grinds, with their properties, stock and images, and the variation groups they belong to. Create variations through the product's variations endpoint.
List variations
Returns the variations of all products, newest first, without deleted ones. List items leave out color, size, type and properties: get a variation for those. To create a variation, use the product's variations endpoint.
query Parameters
codes[]Returns variations whose variation_code is one of these codes. The match is exact but ignores case. Repeat the parameter for each code (codes[]=COF-ETH-250-WB&codes[]=COF-ETH-250-G); codes=COF-ETH-250-WB also works for a single code.
eans[]Returns variations whose ean_code is one of these codes. The match is exact but ignores case. Repeat the parameter for each code; eans=6412345678910 also works for a single code.
erp_idReturns variations with this ERP id (exact match). An empty value is ignored.
hiddentrue returns only hidden variations, false only visible ones. 1, 0, yes, no, on and off also work; any other value returns 400.
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List variations › Responses
A page of variations.
Get a variation
Returns one variation with its property values.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Get a variation › Responses
The variation.
hrefThe URL of the request.
The variation, as the only element.
Update a variation
Updates the fields you send and keeps the others. In names and descriptions, languages you leave out keep their stored values. To set the stock of many variations at once, use Update stock in bulk.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Update a variation › Request Body
product_idMoves the variation to this product. The product must exist and not be deleted, else 400.
group_idThe variation group. It must exist and not be deleted, else 400.
Names to add or change, one element per language. Languages you leave out keep their stored values. A language the variation has no name for yet needs a non-empty name.
Descriptions to add or change, one element per language.
additional_pricestockcolorThe color code. The shop may store it as a mapped color code if it has a color mapping for the product's supplier.
sizeThe size. The shop may store it as a mapped size if it has a size mapping for the product's supplier.
typeAn empty string or string; any other value returns 400.
erp_idvariation_codeean_codehiddenpositionThe sort position. 0 is ignored.
visible_out_of_stockbuyable_out_of_stockUpdate a variation › Responses
The updated variation.
hrefThe URL of the request.
The variation, as the only element.
Delete a variation
Marks the variation deleted. After that it is left out of lists and its endpoints return 404. The response shows the variation as it was before the delete.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Delete a variation › Responses
The deleted variation.
hrefThe URL of the request.
The variation, as the only element.
List a variation's properties
Returns the variation's property values, newest first.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List a variation's properties › Responses
A page of property values.
Add a property to a variation
Gives the variation a value for a property. The request returns 400 if:
- the property doesn't exist, has no options, or doesn't apply to variations (
property_of_variation); - the property isn't available in the product's main category or one of its secondary categories;
- the variation already has a value for the property (use PUT to change it);
option_idshas an option of another property, or more than one option for a property that isn'tmultichoice.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Add a property to a variation › Request Body
property_idThe property to set.
option_idsThe ids of the property's options to give the variation, at least one; an empty array returns 400. More than one only if the property is multichoice.
Add a property to a variation › Responses
The variation's new property value.
hrefThe URL of the request.
The property value, as the only element.
Get a variation's property
Returns one property value of the variation.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
variation-property-idThe id of the variation's property value (the id in the variation's property list, not the property's id).
Get a variation's property › Responses
The property value.
hrefThe URL of the request.
The property value, as the only element.
Update a variation's property
Replaces the options the variation has for this property with option_ids. Every id must be an option of the property, and more than one needs a multichoice property, else 400.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
variation-property-idThe id of the variation's property value (the id in the variation's property list, not the property's id).
Update a variation's property › Request Body
option_idsThe full list of option ids the variation should have for this property. Options not in the list are removed; an empty array removes them all. More than one only if the property is multichoice.
Update a variation's property › Responses
The updated property value.
hrefThe URL of the request.
The property value, as the only element.
Remove a property from a variation
Removes the property value and its options from the variation. The property itself is not changed. The response shows the value as it was.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
variation-property-idThe id of the variation's property value (the id in the variation's property list, not the property's id).
Remove a property from a variation › Responses
The removed property value.
hrefThe URL of the request.
The property value, as the only element.
Get a variation's stock
Returns the variation's stock and sales counters. To change the stock, use Update a variation or Update stock in bulk.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Get a variation's stock › Responses
The variation's stock.
hrefThe URL of the request.
The stock, as the only element.
List a variation's stock history
Returns the variation's stock changes, newest first.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List a variation's stock history › Responses
A page of stock changes.
List variation groups
Returns the variation groups, such as size or color, newest first, without deleted ones. A variation belongs to one group (its group_id).
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List variation groups › Responses
A page of variation groups.
Create a variation group
Creates a variation group. names needs at least one element with a non-empty name. Fields you leave out get their defaults.
Create a variation group › Request Body
The group's name per language. Each element needs a non-empty name.
coderequiredpositionThe group's sort position. If you leave it out or send 0, the group gets 999.
hide_product_if_no_stockCreate a variation group › Responses
The created variation group.
hrefThe URL of the request.
The variation group, as the only element.
Get a variation group
Returns one variation group. A deleted group returns 404.
path Parameters
group-idThe variation group's id.
Get a variation group › Responses
The variation group.
hrefThe URL of the request.
The variation group, as the only element.
Update a variation group
Updates the fields you send and keeps the others. In names, languages you leave out keep their stored values.
path Parameters
group-idThe variation group's id.
Update a variation group › Request Body
Names to add or change, one element per language. Languages you leave out keep their stored values. A language the group has no name for yet needs a non-empty name.
coderequiredpositionhide_product_if_no_stockUpdate a variation group › Responses
The updated variation group.
hrefThe URL of the request.
The variation group, as the only element.
List a variation's images
Returns the variation's images, newest first. To add an image, use Upload a variation image.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List a variation's images › Responses
A page of images.
Get a variation image
Returns one image of the variation.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
image-idThe image's id. An unknown or deleted image, or an image of another variation, returns 404.
Get a variation image › Responses
The image.
hrefThe URL of the request.
The image, as the only element.
Update a variation image
Updates the fields you send and keeps the others. In titles and descriptions, languages you leave out keep their stored values. is_default and is_teaser set or clear the variation's main and teaser image.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
image-idThe image's id. An unknown or deleted image, or an image of another variation, returns 404.
Update a variation image › Request Body
is_defaulttrue makes this the variation's main image; false clears the main image if it is this one.
is_teasertrue makes this the variation's teaser image; false clears the teaser image if it is this one.
positionTitles to add or change, one element per language. Languages you leave out keep their stored values. A language the image has no title for yet needs a non-empty title.
Descriptions to add or change, one element per language.
Update a variation image › Responses
The updated image.
hrefThe URL of the request.
The image, as the only element.
Delete a variation image
Deletes the image from the variation permanently. If it was the variation's main or teaser image, that is cleared. The response shows the image as it was; is_default and is_teaser tell whether it was the main or teaser image.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
image-idThe image's id. An unknown or deleted image, or an image of another variation, returns 404.
Delete a variation image › Responses
The deleted image.
hrefThe URL of the request.
The image, as the only element.
Upload a variation image
Adds an image to the variation. The body is JSON (Content-Type: application/json) in one of two shapes:
- From a URL:
file_url_pathwith anhttp(s)://URL of an image on a public host, orimg:<id>to reuse an image already in the shop, plus optional titles, descriptions,is_default,is_teaserandposition. - Base64: only
base64, the image file encoded as base64.
If the variation already has an image with the same stored file, no new image is created: the response is the
existing image, with is_default: true and is_teaser: true applied. Its is_default and is_teaser show
whether it is the variation's main and teaser image after the request. Re-uploading the same base64 bytes is
therefore safe.
path Parameters
variation-idThe variation's id. A deleted variation returns 404.
Upload a variation image › Request Body
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: file_url_path | |
| type = object · requires: base64 |
file_url_pathAn http:// or https:// URL of an image on a public host, or img:<id> to reuse an image that is already in the shop. A refused URL, a failed download or a file that isn't an image returns 400 Parameter 'file_url_path' has invalid value.
The image's title per language. Without titles, the title is the stored file name, in one language. A language with an empty title is skipped.
The image's description per language.
is_defaultMakes the image the variation's main image.
is_teaserMakes the image the variation's teaser image.
positionThe sort position. If you leave it out or send 0, the image goes last.
Upload a variation image › Responses
The new image, or the existing image with the same file.
hrefThe URL of the request.
The image, as the only element.