Skip to content

Stock of every variant, by product title

GET
/api/v1/workspaces/{workspaceId}/inventory-items
curl --request GET \
--url 'https://api.crossmart.io/api/v1/workspaces/example/inventory-items?stockLevel=in_stock&sort=title&direction=asc&limit=50'
workspaceId
required
string
search
string

Matches the SKU or the product title

stockLevel
string
Allowed values: in_stock low_stock out_of_stock untracked
sort
string
Allowed values: title available updated_at
direction
string
Allowed values: asc desc
cursor
string format: uuid

nextCursor from the previous page

page
number
>= 1

1-based page number, for tables with page numbers. It wins over cursor.

limit
number
default: 50 >= 1 <= 100
Media typeapplication/json
object
items
required
Array<object>
object
inventoryItemId
required
string format: uuid
variantId
required
string format: uuid
productId
required
string format: uuid
productTitle
required
string
optionValues
required

One value per product option, in order

Array<string>
sku
required
string
nullable
imageUrl
required

The product’s first image

string
nullable
tracked
required

Whether Crossmart tracks stock for this variant

boolean
onHand
required

Units in stock: available plus reserved

number
reserved
required

Units held for open orders

number
available
required

Units that can still be sold, and what channels receive

number
stockLevel
required
string
Allowed values: in_stock low_stock out_of_stock untracked
updatedAt
required
string format: date-time
nextCursor
required

Null on the last page

string
nullable
total
required

How many match in all, for page numbers

number

Example

{
"items": [
{
"stockLevel": "in_stock"
}
]
}