Variants

Get Variants by Product ID

Get all variants for a product by using the product's Id

get/v1/variants/product/{id}

Request

  • Base URL: https://api.roastify.app
  • URL: https://api.roastify.app/v1/variants/product/{id}
  • Auth: API key in header x-api-key

Path parameters

idstring required

The Id of the resource

Example:clyd67824rn3f78g0f8j9

Response

Get a variant by Id

idstring required

The id of the variant

titlestring required

The title of the variant

sizestring required

The size of the variant

retailPricenumber required

The retail price of the variant (in cents)

skustring required

The SKU of the variant

inStockboolean required

Whether the variant is in stock

stockQtynumber required

The quantity of the variant in stock. 999 for unlimited

planstring required

The plan that is required to purchase the product

Example response

[
  {
    "id": "clyd67824rn3f78g0f8j9",
    "title": "Whole Bean",
    "size": "12oz",
    "retailPrice": 1200,
    "sku": "COF-GND-12O-COL-BOX",
    "inStock": true,
    "stockQty": 999,
    "plan": "pro"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.