Skip to content

Get variants

GET
/listings/{id}/variants
curl --request GET \
--url 'https://acme.mykreezalid.com/api/v1/listings/1/variants?page=1&limit=25&fields=id%2Csku%2Cquantity' \
--header 'Authorization: Basic <credentials>'

Returns the variants of a listing. The list is paginated with page and limit, without a pagination block in the response. Use fields to keep only some fields of each variant.

id
required
integer

Listing’s unique identifier

page
integer
default: 1 >= 1

Page number, starting at 1.

limit
integer
default: 25 >= 1 <= 100

Number of results per page (at most 100).

fields
string

Example

id,sku,quantity

Comma-separated list of the fields to return for each variant.

The variants of the listing

Media typeapplication/json
object
variants
Array<object>

A version of a listing that differs by size, color or any other characteristic, with its own price, SKU and stock.

object
id

Variant’s unique identifier

integer
object
string
default: Variant
external_id

Your own reference for the variant

string
nullable
listing_id

Unique identifier of the listing the variant belongs to

integer
price
number
nullable
price_unit
integer
nullable
quantity

The quantity of the variant that is available for sale

number
nullable
sort_priority

Sorts the variants with the lowest number first. Negative numbers are allowed.

number
nullable
sku
string
nullable
title
required
string
weight
number
cover_id

Unique identifier of the listing image used for this variant

integer
nullable

Example

{
"variants": [
{
"id": 432432,
"object": "Variant",
"external_id": "INTERNAL_REF_234324",
"listing_id": 324353,
"price": 123.5,
"price_unit": null,
"quantity": 10,
"sort_priority": 10,
"sku": "BASKT-XYZ-BLN-41",
"title": "Blue Shoes Size 41",
"weight": 0.8,
"cover_id": 4242
}
]
}

Missing or wrong API credentials, or variants are not enabled for your marketplace (then the body carries an error message)

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

The requested page does not exist