POST

Get Inventory Variants


Permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Products
Read Products
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/stores-reader/v2/inventoryItems/{inventoryId}/getVariants

Body Params
variantIdsArray <string>

Variant IDs to query for this inventory item (optional).


ONE OF:

inventoryIdstring

Inventory item ID.


externalIdstringdeprecated

Deprecated (use productID instead).


productIdstring

Product ID.

Response Object
inventoryItemInventoryItem

Inventory item.

Get Inventory Variants Example 1
Request
cURL
curl -X POST https://www.wixapis.com/stores/v2/inventoryItems/be547028-fb08-b962-75e8-3f3e56da9ee3/getVariants \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary ' {} }'
Response
JSON
{ "inventoryItem": { "id": "b22b2a79-52b3-e8e2-721e-1779a82dc414", "externalId": "4dd4d586-ad4c-171d-8de1-e88657d23beb", "productId": "4dd4d586-ad4c-171d-8de1-e88657d23beb", "trackQuantity": false, "variants": [ { "variantId": "00000000-0000-0000-0000-000000000000", "inStock": false, "quantity": 0, "availableForPreorder": true } ], "lastUpdated": "2022-11-24T15:10:55.789Z", "numericId": "1669215583914000", "preorderInfo": { "enabled": true, "message": "Expected to ship on June" } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?