Variants
Return a Variant
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Variants
Return a Variant
Returns a Variant
GET
/
api
/
v2
/
platform
/
variants
/
{id}
curl --request GET \
--url http://{defaultHost}/api/v2/platform/variants/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "291",
"type": "variant",
"attributes": {
"sku": "SKU-290",
"weight": "185.0",
"height": "33.55",
"depth": "3.78",
"deleted_at": null,
"is_master": false,
"cost_price": "17.0",
"position": 2,
"cost_currency": "USD",
"track_inventory": true,
"updated_at": "2022-11-08T19:35:57.221Z",
"discontinue_on": null,
"created_at": "2022-11-08T19:35:57.218Z",
"public_metadata": {},
"private_metadata": {},
"barcode": null,
"display_price": "$19.99",
"display_compare_at_price": null,
"name": "Product 2153349",
"options_text": "Size: S",
"total_on_hand": 0,
"purchasable": true,
"in_stock": false,
"backorderable": true,
"available": true,
"currency": "USD",
"price": "19.99",
"compare_at_price": null
},
"relationships": {
"product": {
"data": {
"id": "216",
"type": "product"
}
},
"tax_category": {
"data": null
},
"digitals": {
"data": []
},
"images": {
"data": []
},
"option_values": {
"data": [
{
"id": "87",
"type": "option_value"
}
]
},
"stock_items": {
"data": [
{
"id": "307",
"type": "stock_item"
}
]
},
"stock_locations": {
"data": [
{
"id": "189",
"type": "stock_location"
}
]
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Was this page helpful?
curl --request GET \
--url http://{defaultHost}/api/v2/platform/variants/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "291",
"type": "variant",
"attributes": {
"sku": "SKU-290",
"weight": "185.0",
"height": "33.55",
"depth": "3.78",
"deleted_at": null,
"is_master": false,
"cost_price": "17.0",
"position": 2,
"cost_currency": "USD",
"track_inventory": true,
"updated_at": "2022-11-08T19:35:57.221Z",
"discontinue_on": null,
"created_at": "2022-11-08T19:35:57.218Z",
"public_metadata": {},
"private_metadata": {},
"barcode": null,
"display_price": "$19.99",
"display_compare_at_price": null,
"name": "Product 2153349",
"options_text": "Size: S",
"total_on_hand": 0,
"purchasable": true,
"in_stock": false,
"backorderable": true,
"available": true,
"currency": "USD",
"price": "19.99",
"compare_at_price": null
},
"relationships": {
"product": {
"data": {
"id": "216",
"type": "product"
}
},
"tax_category": {
"data": null
},
"digitals": {
"data": []
},
"images": {
"data": []
},
"option_values": {
"data": [
{
"id": "87",
"type": "option_value"
}
]
},
"stock_items": {
"data": [
{
"id": "307",
"type": "stock_item"
}
]
},
"stock_locations": {
"data": [
{
"id": "189",
"type": "stock_location"
}
]
}
}
}
}