Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Get Inventory Variants

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Read Products or the Manage Products permission scope.

POST

https://www.wixapis.com/stores/v2/inventoryItems/{inventoryId}/getVariants

Path Params

NAME
TYPE
DESCRIPTION
inventoryId
Required

string

Inventory item ID

Body Params

NAME
TYPE
DESCRIPTION
variantIds

Array<string>

Variant IDs to query for this inventory item (optional)

Response Object

NAME
TYPE
DESCRIPTION
inventoryItem

object

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl -X POST https://www.wixapis.com/stores/v2/inventoryItems/be547028-fb08-b962-75e8-3f3e56da9ee3/getVariants \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: <AUTH>' \
4 --data-binary '
5 {}
6 }'

Response

json

1
2{"inventoryItem": {
3 "id": "be547028-fb08-b962-75e8-3f3e56da9ee3",
4 "externalId": "41ab8fd7-04f7-469d-8a17-c0c1a925611c",
5 "trackQuantity": false,
6 "variants": [
7 {
8 "variantId": "00000000-0000-0001-0005-9a596c8e6f10",
9 "inStock": true,
10 "quantity": 0
11 },
12 {
13 "variantId": "00000000-0000-0002-0005-9a596c8e6f10",
14 "inStock": true,
15 "quantity": 0
16 }
17 ],
18 "lastUpdated": "2020-01-29T09:22:18.599Z",
19 "numericId": "1576742838020000"
20}}