Measura API documentation · v1
Read the existing adjustment logs for one product variant at one location.
GET /api/v1/products/{productId}/variants/{variantId}/inventory-adjustments
Headers:
Authorization: Bearer <api-key>Scroll horizontally to see all columns.
| Parameter | Type | Description |
|---|---|---|
productId | string | Required positive numeric Shopify product REST ID. |
variantId | string | Required positive numeric Shopify variant REST ID belonging to the product. |
Scroll horizontally to see all columns.
| Parameter | Type | Description |
|---|---|---|
location_id | string | Required positive numeric Shopify location REST ID. No default location or cross-location aggregation. |
from | string (optional) | Inclusive UTC shard date, YYYY-MM-DD. Omit for no lower date bound. |
to | string (optional) | Inclusive UTC shard date, YYYY-MM-DD. Omit for no upper date bound. Must not precede from. |
reason | string (optional) | received, stock_count, correction, damaged, theft, store_use, or other. Omit to include uncategorized entries. Sale/refund report reasons are not accepted. |
limit | integer (optional) | Maximum returned logs, default 25; valid range 1–100. Invalid values return 400. |
cursor | string (optional) | Opaque nextCursor from the previous page. Keep the same shop, product, variant, location and filters; limit may change. |
{
"success": true,
"data": {
"logs": [
{
"createdAt": "2026-11-19T10:00:00.000Z",
"delta": -0.25,
"unit": "kg",
"reason": "other",
"note": "Count correction",
"productId": "123",
"variantId": "456"
}
]
},
"error": null,
"meta": { "nextCursor": null, "hasMore": false }
}Scroll horizontally to see all columns.
| Field | Type | Description |
|---|---|---|
data.logs | array | Existing variant logs, newest UTC day first and newest-first within each daily log. |
data.logs[].createdAt | string | Recorded adjustment timestamp. |
data.logs[].delta | number | Signed measured quantity change, not rounded Shopify integer stock. |
data.logs[].unit | string | Recorded measurement unit, for example kg or m. |
data.logs[].adjustmentId | string (optional) | Adjustment identifier when recorded; several variant logs can share one adjustment. |
data.logs[].reason | string (optional) | Merchant-selected category when recorded. Older or automatic entries may omit it. |
data.logs[].note | string (optional) | Recorded merchant note. |
data.logs[] product snapshots | optional fields | productId, variantId, productTitle, variantTitle, variantDisplayName, sku, unitCost and currencyCode, when recorded. |
data.logs[] activity references | optional fields | order { id, name }, kitId, assemblyId, reverseFulfillmentOrder { id }, isOrderEdit, isOrderCancellationRestock and isRefundRestock, when recorded. |
meta.nextCursor | string | null | Continuation, or null when traversal is complete. Not a permanent incremental-sync checkpoint. |
meta.hasMore | boolean | Whether traversal can continue. A short or empty logs array may still have hasMore=true. |
Scroll horizontally to see all columns.
| Status code | Description |
|---|---|
| 400 | Invalid IDs, missing/invalid location_id, invalid dates/reason/limit, or a cursor incompatible with the request. |
| 401 | Missing or invalid API key. |
| 403 | Public API access is unavailable for this shop. |
| 404 | Variant or location not found, or variant belongs to another product. |
| 405 | Writes are unsupported. Allow: GET, HEAD. |
| 500 | Upstream failure or malformed stored history; not a successful empty history. |
Note
Example: /api/v1/products/123/variants/456/inventory-adjustments?location_id=123456&limit=25. Use the same public API authentication and entitlement; no inventory-write permission or separate report entitlement is introduced. Responses use Cache-Control: no-store.
This reads per-variant adjustment history, including previously recorded uncategorized and public-API adjustments. It does not use the cross-product adjustment report or reconstruct every Shopify inventory change. Current selling assignments are not required to read past history. Missing history returns an empty logs array.
Omitting both dates reads all indexed history. Date filters select inclusive UTC daily shards. Optional fields remain absent when they were not recorded; before/after balances and actor names are not inferred.
Follow meta.nextCursor until it is null, even after an empty page. At most 25 daily shards are scanned per request, so sparse reason filters can return fewer than limit entries. No total count or backward cursor is returned.
Cursors continue through new prepended adjustments, including equal timestamps, but are not a point-in-time snapshot. Start a fresh traversal to see new entries ahead of a continuation. After manual history deletion or reordering, restart traversal. Logs do not include a per-row id; pagination uses opaque cursors. Recorded adjustmentId and resource references retain their existing meanings.
Related: