Product Variants API Routes
A product variant is a saleable form of the product.
Each variant has different option values. For example, a "Shirt" product may have a "Blue" variant and a "Green" variant. Customers choose from these variants when they buy the product.
These API routes allow admin users to manage product variants.
GET /admin/product-variants#
List Product Variants
Retrieve a list of product variants. The product variants can be filtered by fields such as id. The product variants can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionalmanage_inventorybooleanOptionalmanage_inventory is enabled.allow_backorderbooleanOptionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionaleanstring | string[]Optionalupcstring | string[]Optionalbarcodestring | string[]Optionalskustring | string[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumbervariantsobject[]The product variant's variants.
variantsobject[]400, 401, 404, 409, 422, 500: an error response is returned.