Commerce
Get a product's stock
Stock per variant and location: available, on hand, committed to orders and incoming.
PlatformsShopify
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
accountId*string
Connected store SocialAccount id.
productId*string
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.listCommerceInventory({ query: { accountId: 'account_abc123', productId: 'product_abc123', },});console.log(data);{ "inventory": [ { "productId": "string", "variantId": "string", "sku": "string", "tracked": true, "levels": [ { "locationId": "string", "available": 0, "onHand": 0, "committed": 0, "incoming": 0 } ] } ]}Was this page helpful?