Retrieve variant
GET
/variants/{id}
const url = 'https://acme.mykreezalid.com/api/v1/variants/1';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://acme.mykreezalid.com/api/v1/variants/1 \ --header 'Authorization: Basic <credentials>'Returns one variant.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Variant’s unique identifier
Responses
Section titled “Responses”Variant’s details
Media typeapplication/json
object
variant
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
external_id
Your own reference for the variant
string
listing_id
Unique identifier of the listing the variant belongs to
integer
price
number
price_unit
integer
quantity
The quantity of the variant that is available for sale
number
sort_priority
Sorts the variants with the lowest number first. Negative numbers are allowed.
number
sku
string
title
required
string
weight
number
cover_id
Unique identifier of the listing image used for this variant
integer
Example
{ "variant": { "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"}No variant has this identifier