GET
/
v1
/
variants
/
product
/
{id}
Get Variants by Product ID
curl --request GET \
  --url https://api.roastify.app/v1/variants/product/{id} \
  --header 'x-api-key: <api-key>'
[
  {
    "id": "clyd67824rn3f78g0f8j9",
    "title": "Whole Bean",
    "size": "12oz",
    "retailPrice": 1200,
    "sku": "COF-GND-12O-COL-BOX",
    "inStock": true,
    "stockQty": 999,
    "plan": "pro"
  }
]

Authorizations

x-api-key
string
header
required

The API key to authenticate requests provided by Roastify. A Base or Pro plan is required to use the API.

Path Parameters

id
string
required

The Id of the resource

Minimum length: 1
Example:

"clyd67824rn3f78g0f8j9"

Response

Get a variant by Id

id
string
required

The id of the variant

Example:

"clyd67824rn3f78g0f8j9"

title
string
required

The title of the variant

Example:

"Whole Bean"

size
string
required

The size of the variant

Example:

"12oz"

retailPrice
number
required

The retail price of the variant (in cents)

Example:

1200

sku
string
required

The SKU of the variant

Example:

"COF-GND-12O-COL-BOX"

inStock
boolean
required

Whether the variant is in stock

Example:

true

stockQty
number
required

The quantity of the variant in stock. 999 for unlimited

Example:

999

plan
string
required

The plan that is required to purchase the product

Example:

"pro"