Measura API documentation · v1

Variant inventory adjustment history

Read the existing adjustment logs for one product variant at one location.

Code example
GET /api/v1/products/{productId}/variants/{variantId}/inventory-adjustments

Headers:
  Authorization: Bearer <api-key>

Path parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
productIdstringRequired positive numeric Shopify product REST ID.
variantIdstringRequired positive numeric Shopify variant REST ID belonging to the product.

Query parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
location_idstringRequired positive numeric Shopify location REST ID. No default location or cross-location aggregation.
fromstring (optional)Inclusive UTC shard date, YYYY-MM-DD. Omit for no lower date bound.
tostring (optional)Inclusive UTC shard date, YYYY-MM-DD. Omit for no upper date bound. Must not precede from.
reasonstring (optional)received, stock_count, correction, damaged, theft, store_use, or other. Omit to include uncategorized entries. Sale/refund report reasons are not accepted.
limitinteger (optional)Maximum returned logs, default 25; valid range 1–100. Invalid values return 400.
cursorstring (optional)Opaque nextCursor from the previous page. Keep the same shop, product, variant, location and filters; limit may change.

Response example (200 success)

Code example
{
  "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 }
}

Response fields

Scroll horizontally to see all columns.

FieldTypeDescription
data.logsarrayExisting variant logs, newest UTC day first and newest-first within each daily log.
data.logs[].createdAtstringRecorded adjustment timestamp.
data.logs[].deltanumberSigned measured quantity change, not rounded Shopify integer stock.
data.logs[].unitstringRecorded measurement unit, for example kg or m.
data.logs[].adjustmentIdstring (optional)Adjustment identifier when recorded; several variant logs can share one adjustment.
data.logs[].reasonstring (optional)Merchant-selected category when recorded. Older or automatic entries may omit it.
data.logs[].notestring (optional)Recorded merchant note.
data.logs[] product snapshotsoptional fieldsproductId, variantId, productTitle, variantTitle, variantDisplayName, sku, unitCost and currencyCode, when recorded.
data.logs[] activity referencesoptional fieldsorder { id, name }, kitId, assemblyId, reverseFulfillmentOrder { id }, isOrderEdit, isOrderCancellationRestock and isRefundRestock, when recorded.
meta.nextCursorstring | nullContinuation, or null when traversal is complete. Not a permanent incremental-sync checkpoint.
meta.hasMorebooleanWhether traversal can continue. A short or empty logs array may still have hasMore=true.

Error responses

Scroll horizontally to see all columns.

Status codeDescription
400Invalid IDs, missing/invalid location_id, invalid dates/reason/limit, or a cursor incompatible with the request.
401Missing or invalid API key.
403Public API access is unavailable for this shop.
404Variant or location not found, or variant belongs to another product.
405Writes are unsupported. Allow: GET, HEAD.
500Upstream 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.