Stock value, stock levels and each store’s listings, as of now
GET
/api/v1/workspaces/{workspaceId}/analytics/inventory
const url = 'https://api.crossmart.io/api/v1/workspaces/example/analytics/inventory';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.crossmart.io/api/v1/workspaces/example/analytics/inventoryValues are in the workspace currency; variants without a cost are counted apart.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
currencyCode
required
string
value
required
object
atCost
required
Units on hand times cost; no-cost variants left out
string
atPrice
required
Units on hand times price
string
unitsOnHand
required
Available plus held for orders
number
variantsWithoutCost
required
Variants with stock on hand but no cost
number
stockLevels
required
object
inStock
required
number
lowStock
required
number
outOfStock
required
number
untracked
required
Variants that do not track stock
number
lowStockThreshold
required
Available units at or below which stock counts as low
number
stores
required
Every store, oldest first
Array<object>
object
connectionId
required
string format: uuid
channel
required
string
displayName
required
string
status
required
string
lastSyncedAt
required
string format: date-time
listings
required
Every listing status, in order
Array<object>
object
status
required
string
count
required
number
Example
{ "currencyCode": "USD", "value": { "atCost": "4120.50", "atPrice": "9800.00" }, "stores": [ { "channel": "shopify", "displayName": "Demo Store", "status": "CONNECTED", "listings": [ { "status": "PENDING" } ] } ]}