Skip to content

List stock changes

GET
/api/v1/commerce/inventory/history
curl --request GET \
--url https://digize.com/api/v1/commerce/inventory/history \
--header 'x-api-key: <x-api-key>'

Every change to stock on hand, the newest first, a page at a time: the variant, location, change, reason and who made it, with the order, transfer or purchase order behind it.

Needs the commerce:read permission.

variantId
string
>= 1 characters <= 64 characters
locationId
string
>= 1 characters <= 64 characters
reasons
Array<string>
<= 10 items
Allowed values: received count damaged correction sold returned cancelled transfer lost
cursor

The nextCursor of the page before. Leave it out for the first page.

string
<= 400 characters

The nextCursor of the page before. Leave it out for the first page.

limit

Rows on the page: 50 unless it says, 100 at most.

integer
>= 1 <= 100

Rows on the page: 50 unless it says, 100 at most.

Done

Media typeapplication/json
object
rows
required
Array<object>
object
id
required
string
variantId
required
string
productId
required
string
product
required
string
variant
required
string
sku
required
string
locationId
required
string
location
required
string
delta
required

Added to on hand, or taken off when negative.

number
reason
required
string
Allowed values: received count damaged correction sold returned cancelled transfer lost
onHandAfter
required
number
orderId
required
string | null
orderNumber
required
number | null
transferId
required
string | null
purchaseOrderId
required
string | null
note
required
string | null
actorName
required
string
at
required
string format: date-time
nextCursor
required

Pass it as cursor for the next page; null on the last.

string | null
total
required
number

Example

{
"rows": [
{
"reason": "received"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}