Get a variant
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/product-variants/v1-product-variant-show.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
GET/
Returns one live variant by its id, with its own sale state (phased_out, phased_out_at, phased_out_by).
Business rules
- The product id in the path is not checked: any live variant of the team is returned, whichever product it belongs to.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The product's id (
idfrom List products). A hash id from an earlier answer; unique keys and document numbers (such asPO0042) don't work here.- Example
EDhVUaC6jbLbed
- Example
The variant's id (
idfrom List a product's variants, orattr_data[].idfrom Load a product for a sales order line). A hash id from an earlier answer; unique keys and document numbers (such asPO0042) don't work here.- Example
uAu3dAKIaHyAYk
- Example
Request body
This operation takes no request body.
Response
200Successful response.
Child fields (23)
- Always
"variant_option"
- Always
This variant's selling price. Never null. Thousandths, an older encoding:
12500is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5is 1.2345), or as a string ("1234.5") when you sendX-Yoprint-Decimal-Format: exact-v1. See Money and quantities.The variant id: the
db_variantline's product id.barcodestring | nullbrandstring | nullThe parent product's brand.
color_hexstring | nullcolor_idstring | nullcolor_labelstring | nulldescriptionstring | nullThe parent product's description.
enablebooleanphased_out_atstring (date-time) | nullphased_out_byobject | nullWho did it, as
{id, name}; null when on sale or nobody was recorded.price_dataobject | arrayPrices for pricing groups, as saved: keyed by the pricing group's internal number (not its hash id), each
{"price": <thousandths>}. An empty list[]when there are none.size_idstring | nullsize_labelstring | nullsupplier_idstring | nulltaxablebooleanThe parent product's
taxable.titlestring | nullThe parent product's title.
track_inventorybooleanvendor_idstringThe vendor id, or an empty string when none.
weightnumber | string | null
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- No live variant with this id.
error.codeis null anderror.messagenames the record type. - Fix
- Check the id; deleted variants are not returned.
Related
- PUTUpdate a variant
/v1/ api/ store/ {team_slug}/ product/ {hash_id}/ variant/ {id}
