Skip to content

getProductVariants.v1

POST
/shopgate.catalog.getProductVariants.v1

This pipeline retrieves variant-products and the characteristics to distinguish these.

Media typeapplication/json
object
productId
required
string
showInactive

Only active products would be fetched by default, to fetch inactive products too, set this to true

boolean

Successful response.

Media typeapplication/json
Variants

A collection of variant-data for one product

object
products

List of variant values that identify the different variant products

Array<object>
object
id
required

The product id of this variant

string
hasOptions
required

A flag that determines if this variant has options too, that should be loadead on the detail page

boolean
characteristics

A list of characteristic values that uniquely identify this variant

object
key
additional properties

The property key uniquely identifies the characteristic attribute (e.g. color or size) and the value identifies the value id (e.g. red or large)

string
stock
required
object
info

A custom text concerning stock (see available_text in old cake system)

string
orderable

A boolean flag that determines if the product it orderable at all

boolean
quantity

The amount of products that are available

integer format: int32
maxOrderQuantity

The maximum of amount of items that are orderable in one order

integer format: int32
minOrderQuantity

The minimu amount of items that have to be ordered of this product

integer format: int32
default: 1
ignoreQuantity

If true, this will allow the customer to buy more products than are available in stock

boolean
default: true
availability
required
object
text

Text to describe the availability of this product

string
state

A kind of flag, that describes the availability state of this product

string
Allowed values: ok warning alert
metadata
string | object
characteristics

A list of the available characteristics of the variants of this product

Array<object>
object
id
required

The unique id of this characteristic

string
label
required

The name that should be displayed to the customer, like “color” or “size”

string
values
required

A list of values for this characteristic, already sorted

Array<object>
object
id
required

The unique id of this value

string
label
required

The label that should be display to the customer, like “red” or “xl”

string
Example
{
"products": [
{
"id": 123,
"hasOptions": false,
"characteristics": {
"1": "2"
},
"stock": {
"ignoreQuantity": false,
"quantity": 1,
"available": true,
"info": "Sofort lieferbar",
"orderable": true,
"minOrderQuantity": 0,
"maxOrderQuantity": 0
},
"availability": {
"state": "ok",
"text": "its ok"
}
}
],
"characteristics": [
{
"id": "1",
"label": "Color",
"values": [
{
"id": "2",
"label": "red"
}
]
}
]
}