Sending GET request to this url, returns collection of PRODUCT VARIANTS resources that belong to given shop and product.

You can narrow down list of resources by passing proper query parameters (list of which you can find below in request params section). You can basically search by:

  • name
  • sku
  • description

`description` fields can be a pattern and we will try to match this phrase.

You can specify which page of results you want and how many results per page should be there. You can also specify sort-order using one or more of allowed fields (listed below in request params section).

Last but not least you can even specify which fields from resource you want to get. If you pass param `fields` with list of fields (separated by comma [,]) we will return list of resources with only those fields (we will always add resource id to ensure that you can use that data later on)

Returns status code

200

Request url

/shops/p/products/P/?query[name]=foo&query[sku]=SKU&query[createdOn][from]=2010-10-13&query[createdOn][to]=2020-03-15

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
name*
sku*
description*
createdOncreatedOn[from]={Y-m-d}&createdOn[to]={Y-m-d} - It can be also UTC format
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
createdOnasc,desc
perPageintNumber results on page
pageintPage number

Example Response

[
    {
        "variantId": "VTB",
        "href": "https://api.getresponse.com/v3/shops/nM/products/9I/variants/VTB",
        "name": "Red Monster Cap",
        "url": "https://somedomain.com/products/456/variant/4",
        "price": 20,
        "priceTax": 23,
        "previousPrice": null,
        "previousPriceTax": null,
        "quantity": 200,
        "position": 1,
        "barcode": "12455687",
        "sku": "SKU-1254-56-457-5689",
        "externalId": "127788",
        "description": "Red Cap with GetResponse Monster print",
        "images": [
            {
                "imageId": "hY",
                "href": "https://api.getresponse.com/v3/shops/nM/images/hY",
                "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
                "position": "1"
            }
        ],
        "metaFields": [
            {
                "metaFieldId": "p0U",
                "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/p0U",
                "name": "colour",
                "value": "red",
                "valueType": "string"
            },
            {
                "metaFieldId": "hyk",
                "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/hyk",
                "name": "size",
                "value": "large",
                "valueType": "string"
            }
        ],
        "taxes": [
            {
                "taxId": "pZz",
                "href": "https://api.getresponse.com/v3/shops/nM/taxes/pZz",
                "name": "VAT",
                "rate": 23
            }
        ],
        "createdOn": "2017-03-29T09:30:46+0000",
        "updatedOn": "2017-04-05T10:29:40+0000"
    }
]

Possible Errors


Method returns PRODUCT VARIANT according to given variantId in context of given shopId and productId

Returns status code

200

Request url

/shops/V/products/P/variants/d?fields=name

Request params

Field nameField typeField description
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma

Example Response

{
    "variantId": "VTB",
    "href": "https://api.getresponse.com/v3/shops/nM/products/9I/variants/VTB",
    "name": "Red Monster Cap",
    "url": "https://somedomain.com/products/456/variant/4",
    "price": 20,
    "priceTax": 23,
    "previousPrice": null,
    "previousPriceTax": null,
    "quantity": 200,
    "position": 1,
    "barcode": "12455687",
    "sku": "SKU-1254-56-457-5689",
    "externalId": "127788",
    "description": "Red Cap with GetResponse Monster print",
    "images": [
        {
            "imageId": "hY",
            "href": "https://api.getresponse.com/v3/shops/nM/images/hY",
            "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
            "position": "1"
        }
    ],
    "metaFields": [
        {
            "metaFieldId": "p0U",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/p0U",
            "name": "colour",
            "value": "red",
            "valueType": "string"
        },
        {
            "metaFieldId": "hyk",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/hyk",
            "name": "size",
            "value": "large",
            "valueType": "string"
        }
    ],
    "taxes": [
        {
            "taxId": "pZz",
            "href": "https://api.getresponse.com/v3/shops/nM/taxes/pZz",
            "name": "VAT",
            "rate": 23
        }
    ],
    "createdOn": "2017-03-29T09:30:46+0000",
    "updatedOn": "2017-04-05T10:29:40+0000"
}

Possible Errors


Sending a POST request to this url, will create a new PRODUCT VARIANT resource.

In order to create a new PRODUCT VARIANT, you need to send PRODUCT VARIANT resource in BODY of the request (remember that you need to serialize body into JSON string)

There is no need to create every elements (like: image, meta-field, tax) one by one by their own endpoints, all these elements can be created during this method. 

Returns status code

201

Example Request Body

{
    "name": "Red Monster Cap",
    "url": "https://somedomain.com/products/456/variant/4",
    "price": 20,
    "priceTax": 23,
    "previousPrice": null,
    "previousPriceTax": null,
    "quantity": 200,
    "position": 1,
    "barcode": "12455687",
    "sku": "SKU-1254-56-457-5689",
    "externalId": "127788",
    "description": "Red Cap with GetResponse Monster print",
    "images": [
        {
            "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
            "position": "1"
        }
    ],
    "metaFields": [
        {
            "name": "colour",
            "value": "red",
            "valueType": "string"
        },
        {
            "name": "size",
            "value": "large",
            "valueType": "string"
        }
    ],
    "taxes": [
        {
            "name": "VAT",
            "rate": 23
        }
    ]
}

Body params

Field nameField typeField description
name (required)stringName of the variant
urlstringExternal url of the variant
price (required)floatPrice
priceTax (required)floatPrice including tax
sku (required)stringStock-keeping unit of variant. Must be unique within product
previousPricefloatPrice before change
previousPriceTaxfloatPrice before change including tax
quantityintegerQuantity of variant items. Set 1 by default
positionintegerPosition of variant
barcodestringBarcode of variant, maximum 255 characters
descriptionstringDescription of variant, maximum 1000 characters
externalIdstringVariant external ID
imagescollectionCollection of variant images
Field nameField typeField description
src (required)stringSource url of image
position (required)integerPosition of image
metaFieldscollectionCollection of variant meta fields
Field nameField typeField description
name (required)stringName, minLength=3, maxLength=63
value (required)stringMeta value , minLength=0, maxLength=65000
valueType (required)stringOne of values: 'string' or 'integer'
descriptionstringMeta description minLength=0, maxLength=255
taxescollectionCollection of variant taxes
Field nameField typeField description
name (required)stringName
rate (required)stringRate value, min=0, max=99.9

Example Response

{
    "variantId": "VTB",
    "href": "https://api.getresponse.com/v3/shops/nM/products/9I/variants/VTB",
    "name": "Red Monster Cap",
    "url": "https://somedomain.com/products/456/variant/4",
    "price": 20,
    "priceTax": 23,
    "previousPrice": null,
    "previousPriceTax": null,
    "quantity": 200,
    "position": 1,
    "barcode": "12455687",
    "sku": "SKU-1254-56-457-5689",
    "externalId": "127788",
    "description": "Red Cap with GetResponse Monster print",
    "images": [
        {
            "imageId": "hY",
            "href": "https://api.getresponse.com/v3/shops/nM/images/hY",
            "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
            "position": "1"
        }
    ],
    "metaFields": [
        {
            "metaFieldId": "p0U",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/p0U",
            "name": "colour",
            "value": "red",
            "valueType": "string"
        },
        {
            "metaFieldId": "hyk",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/hyk",
            "name": "size",
            "value": "large",
            "valueType": "string"
        }
    ],
    "taxes": [
        {
            "taxId": "pZz",
            "href": "https://api.getresponse.com/v3/shops/nM/taxes/pZz",
            "name": "VAT",
            "rate": 23
        }
    ],
    "createdOn": "2017-03-29T09:30:46+0000",
    "updatedOn": "2017-04-05T10:29:40+0000"
}

Possible Errors


Update properties of PRODUCTS VARIANT. You should send only those fields that need to be changed. The rest of properties will stay the same. However In case of updateing metaFields, images and taxes You must send entire collections, individual fields cannot be updated. If You want to update individual fields of metaFields or taxes resources You can do so by POSTING to their particular endpoints, i.e:

  • taxes - /v3/shops/{shopId}/taxes/{taxeId}
  • metaFields - /v3/shops/{shopId}/meta-fields/{metaFieldId}

Returns status code

200

Example Request Body

{
    "name": "Red Monster Cap",
    "url": "https://somedomain.com/products/456/variant/4",
    "price": 20,
    "priceTax": 23,
    "previousPrice": null,
    "previousPriceTax": null,
    "quantity": 200,
    "position": 1,
    "barcode": "12455687",
    "sku": "SKU-1254-56-457-5689",
    "externalId": "127788",
    "description": "Red Cap with GetResponse Monster print",
    "images": [
        {
            "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
            "position": "1"
        }
    ],
    "metaFields": [
        {
            "name": "colour",
            "value": "red",
            "valueType": "string"
        },
        {
            "name": "size",
            "value": "large",
            "valueType": "string"
        }
    ],
    "taxes": [
        {
            "name": "VAT",
            "rate": 23
        }
    ]
}

Body params

Field nameField typeField description
namestringName of the variant
urlstringExternal url of the variant
pricefloatPrice
priceTaxfloatPrice including tax
skustringStock-keeping unit of variant. Must be unique within product
previousPricefloatPrice before change
previousPriceTaxfloatPrice before change including tax
quantityintegerQuantity of variant items. Set 1 by default
positionintegerPosition of variant
barcodestringBarcode of variant, maximum 255 characters
externalIdstringVariant external ID
descriptionstringDescription of variant, maximum 1000 characters
imagescollectionCollection of variant images
Field nameField typeField description
src (required)stringSource url of image
position (required)integerPosition of image
metaFieldscollectionCollection of variant meta fields
Field nameField typeField description
name (required)stringName, minLength=3, maxLength=63
value (required)stringMeta value , minLength=0, maxLength=65000
valueType (required)stringOne of values: 'string' or 'integer'
descriptionstringMeta description minLength=0, maxLength=255
taxescollectionCollection of variant taxes
Field nameField typeField description
name (required)stringName
rate (required)stringRate value, min=0, max=99.9

Example Response

{
    "variantId": "VTB",
    "href": "https://api.getresponse.com/v3/shops/nM/products/9I/variants/VTB",
    "name": "Red Monster Cap",
    "url": "https://somedomain.com/products/456/variant/4",
    "price": 20,
    "priceTax": 23,
    "previousPrice": null,
    "previousPriceTax": null,
    "quantity": 200,
    "position": 1,
    "barcode": "12455687",
    "sku": "SKU-1254-56-457-5689",
    "externalId": "127788",
    "description": "Red Cap with GetResponse Monster print",
    "images": [
        {
            "imageId": "hY",
            "href": "https://api.getresponse.com/v3/shops/nM/images/hY",
            "src": "http://somedomain.com/images/src/img58db7ec64bab9.png",
            "position": "1"
        }
    ],
    "metaFields": [
        {
            "metaFieldId": "p0U",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/p0U",
            "name": "colour",
            "value": "red",
            "valueType": "string"
        },
        {
            "metaFieldId": "hyk",
            "href": "https://api.getresponse.com/v3/shops/nM/meta-fields/hyk",
            "name": "size",
            "value": "large",
            "valueType": "string"
        }
    ],
    "taxes": [
        {
            "taxId": "pZz",
            "href": "https://api.getresponse.com/v3/shops/nM/taxes/pZz",
            "name": "VAT",
            "rate": 23
        }
    ],
    "createdOn": "2017-03-29T09:30:46+0000",
    "updatedOn": "2017-04-05T10:29:40+0000"
}

Possible Errors


Returns status code

204

Possible Errors