IMS Documentation
IMS API 1.1.0.0 • Business API v1

Items and Inventory Delta

Keep authorized ordinary item-master and stock-balance mirrors current with incremental snapshots, using the same company contracts and fields as the full exports.

EndpointScopeRow identity / output
/items/changesitems.read(companyId, itemId): ordinary item master fields
/inventory/changesinventory.read(companyId, storeId, itemId): ordinary inventory quantities and valuations

Use the same authorized key, company and ordinary contract as the corresponding full endpoint. These operations do not use the Partner Data availability policy. Inventory rows preserve actual on-hand quantities, including zero and negative values, and financial-data permission still applies to costs. Items retain classifications and permitted purchase/cost information. See Items Delta reference and Inventory Delta reference.

Initial full synchronization

  1. Call the applicable changes endpoint without since. Capture its baselineSince and policyVersion before exporting the ordinary full resource.
  2. Read every page of /items?page=1&pageSize=200 or /inventory?page=1&pageSize=200. Do not filter out zero, inactive or damage stock if maintaining a complete authorized inventory mirror. Stage or apply the full export; reconcile removals only once the entire export succeeds.
  3. Poll the same changes endpoint with since set to its saved baselineSince and its saved policyVersion. Omit through and continuation keys on the first poll.
  4. Apply every incremental page as an idempotent upsert. If fullSyncRequired arrives, restart the corresponding full synchronization using the newly supplied baseline and version.

Parameters and cursor rules

Worked synchronization examples

All examples are fictional. Substitute the actual values returned by your own authorized API. The two examples illustrate separate, independent synchronization sequences.

Items Delta

Initial request:

GET https://api.example.com/api/v1/companies/1/items/changes HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "fullSyncRequired": true,
  "reason": "initial_sync_required",
  "baselineSince": "2026-10-01T10:00:00+00:00",
  "policyVersion": "EXAMPLE_ITEMS_SERVER_VERSION",
  "count": 0,
  "data": []
}

After the full items export succeeds, request the first incremental page:

GET https://api.example.com/api/v1/companies/1/items/changes?since=2026-10-01T10%3A00%3A00Z&policyVersion=EXAMPLE_ITEMS_SERVER_VERSION&pageSize=1 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "USD",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "policyVersion": "EXAMPLE_ITEMS_SERVER_VERSION",
  "count": 1,
  "hasMore": true,
  "nextAfterItemId": "DEMO-SHIRT-M",
  "nextAfterStoreId": null,
  "nextSince": "2026-10-01T10:00:00+00:00",
  "data": [
    {
      "itemId": "DEMO-SHIRT-M",
      "barcode": "DEMO000001",
      "style": "DEMO-SHIRT",
      "theme": null,
      "itemName": "Example shirt",
      "itemNameAr": null,
      "itemType": 1,
      "colorCode": null,
      "colorName": null,
      "size": "M",
      "unit": 1,
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "brandId": null,
      "brandName": "Example Supplier",
      "categoryId": null,
      "categoryName": null,
      "subcategoryId": null,
      "subcategoryName": null,
      "productGroupId": null,
      "productGroupName": null,
      "productSubgroupId": null,
      "productSubgroupName": null,
      "receivedSeasonId": null,
      "receivedSeason": null,
      "salesPeriodId": null,
      "salesPeriod": null,
      "ageRangeId": null,
      "ageRange": null,
      "genderId": null,
      "gender": null,
      "countryId": null,
      "countryName": null,
      "itemState": 0,
      "isOnline": false,
      "originalPrice": 20,
      "currentPrice": 18,
      "averageLocalCost": null,
      "lastPurchaseDate": null,
      "lastPurchaseCurrencyId": null,
      "lastPurchaseCurrency": null,
      "lastPurchasePrice": null,
      "firstDisplayDate": null
    }
  ]
}

Apply the row. Continue with exactly the same window, version and returned key:

GET https://api.example.com/api/v1/companies/1/items/changes?since=2026-10-01T10%3A00%3A00Z&policyVersion=EXAMPLE_ITEMS_SERVER_VERSION&pageSize=1&through=2026-10-01T10%3A05%3A00Z&afterItemId=DEMO-SHIRT-M HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json

Illustrative final response:

{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "USD",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "policyVersion": "EXAMPLE_ITEMS_SERVER_VERSION",
  "count": 1,
  "hasMore": false,
  "nextAfterItemId": null,
  "nextAfterStoreId": null,
  "nextSince": "2026-10-01T10:05:00+00:00",
  "data": [
    {
      "itemId": "DEMO-SHIRT-S",
      "barcode": "DEMO000002",
      "style": "DEMO-SHIRT",
      "theme": null,
      "itemName": "Example shirt",
      "itemNameAr": null,
      "itemType": 1,
      "colorCode": null,
      "colorName": null,
      "size": "S",
      "unit": 1,
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "brandId": null,
      "brandName": "Example Supplier",
      "categoryId": null,
      "categoryName": null,
      "subcategoryId": null,
      "subcategoryName": null,
      "productGroupId": null,
      "productGroupName": null,
      "productSubgroupId": null,
      "productSubgroupName": null,
      "receivedSeasonId": null,
      "receivedSeason": null,
      "salesPeriodId": null,
      "salesPeriod": null,
      "ageRangeId": null,
      "ageRange": null,
      "genderId": null,
      "gender": null,
      "countryId": null,
      "countryName": null,
      "itemState": 0,
      "isOnline": false,
      "originalPrice": 20,
      "currentPrice": 18,
      "averageLocalCost": null,
      "lastPurchaseDate": null,
      "lastPurchaseCurrencyId": null,
      "lastPurchaseCurrency": null,
      "lastPurchasePrice": null,
      "firstDisplayDate": null
    }
  ]
}

After all pages are durably applied, save nextSince and policyVersion. Clear continuation keys. Poll again using nextSince as since, the same version, and no through or after key.

Inventory Delta

Initial request:

GET https://api.example.com/api/v1/companies/1/inventory/changes HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "fullSyncRequired": true,
  "reason": "initial_sync_required",
  "baselineSince": "2026-10-01T10:00:00+00:00",
  "policyVersion": "EXAMPLE_INVENTORY_SERVER_VERSION",
  "count": 0,
  "data": []
}

After the full inventory export succeeds, request the first incremental page:

GET https://api.example.com/api/v1/companies/1/inventory/changes?since=2026-10-01T10%3A00%3A00Z&policyVersion=EXAMPLE_INVENTORY_SERVER_VERSION&pageSize=1 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "USD",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "policyVersion": "EXAMPLE_INVENTORY_SERVER_VERSION",
  "count": 1,
  "hasMore": true,
  "nextAfterItemId": "DEMO-SHIRT-M",
  "nextAfterStoreId": 101,
  "nextSince": "2026-10-01T10:00:00+00:00",
  "data": [
    {
      "storeId": 101,
      "storeName": "Example Store",
      "isMainStore": false,
      "isOnlineStore": false,
      "isDamageStore": false,
      "isActive": true,
      "itemId": "DEMO-SHIRT-M",
      "onHandQty": 0,
      "unitCost": null,
      "stockValue": null,
      "currentRetailPrice": 18,
      "retailValue": 0
    }
  ]
}

Apply the row. Continue with exactly the same window, version and returned key pair:

GET https://api.example.com/api/v1/companies/1/inventory/changes?since=2026-10-01T10%3A00%3A00Z&policyVersion=EXAMPLE_INVENTORY_SERVER_VERSION&pageSize=1&through=2026-10-01T10%3A05%3A00Z&afterItemId=DEMO-SHIRT-M&afterStoreId=101 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json

Illustrative final response:

{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "USD",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "policyVersion": "EXAMPLE_INVENTORY_SERVER_VERSION",
  "count": 1,
  "hasMore": false,
  "nextAfterItemId": null,
  "nextAfterStoreId": null,
  "nextSince": "2026-10-01T10:05:00+00:00",
  "data": [
    {
      "storeId": 102,
      "storeName": "Example Store 2",
      "isMainStore": false,
      "isOnlineStore": false,
      "isDamageStore": false,
      "isActive": true,
      "itemId": "DEMO-SHIRT-M",
      "onHandQty": 7,
      "unitCost": null,
      "stockValue": null,
      "currentRetailPrice": 18,
      "retailValue": 126
    }
  ]
}

After all pages are durably applied, save nextSince and policyVersion. Clear continuation keys. Poll again using nextSince as since, the same version, and no through or after keys.

Envelope field dictionary

Fields appear only in the stated envelope shape. All fields are nonnull except the continuation keys; data is an array even for empty results.

FieldType / shapeMeaning
companyIdinteger; both shapesAuthorized company.
fullSyncRequiredboolean; both shapesTrue instructs a full rebuild; false is incremental.
reasonstring; full-sync onlyinitial_sync_required, history_not_available, policy_version_required or policy_or_catalog_changed.
baselineSinceoffset timestamp; full-sync onlyCapture before exporting the full ordinary resource.
policyVersionstring; both shapesOpaque endpoint-, client-, company- and policy-specific synchronization version.
companyCode / currencyCodestrings; incremental onlyCompany code and currency code; no companyName in Delta.
since / throughoffset timestamps; incremental onlyAccepted fixed window bounds.
countinteger; both shapesRows in data; zero for full-sync instruction.
hasMoreboolean; incremental onlyWhether another page is available.
nextAfterItemIdstring or null; incremental onlyLast item key when hasMore; otherwise null.
nextAfterStoreIdinteger or null; incremental onlyLast store key for Inventory Delta when hasMore; null otherwise and always null for Items Delta.
nextSinceoffset timestamp; incremental onlysince while hasMore=true; through on completion.
dataarray; both shapesOrdinary item or inventory rows; empty on full-sync instruction.

Full synchronization and recovery

Initial requests, unavailable historical change coverage, missing policyVersion, and changed policy or authorized catalog membership can return fullSyncRequired=true. The policy can change when catalog members are added, removed or reassigned, when applicable permissions change, or when the inventory store catalog changes. Do not simply replace the policyVersion on an old cursor; rebuild the relevant complete mirror. No removal tombstones are emitted.

If a request or local write fails, retain the last durable cursor and replay. Persist a continuation key only together with the exact window and version and after its rows are durably applied. A completed empty incremental window still advances nextSince. Boundary rows may repeat; upsert rather than accumulate them.

During company maintenance, requests may return 503 with Retry-After. Retry the same request, without advancing the cursor. Maintenance alone does not invalidate policyVersion and does not require a full export. Follow a full-sync instruction if the actual policy or catalog has changed.

What Delta does and does not represent

Items Delta returns current item snapshots for tracked item-master or stock changes. Inventory Delta returns current balances for tracked store/item stock changes and authorized rows affected by tracked item-master changes, such as price changes. This is not a field-by-field change journal or a list of stock movements. Values are current when read and are not frozen historically at through. The safe window selects changes; each page is a separate request.

Some updates outside the supported change-tracked operations, lookup changes, cost-only background changes or direct removals of stock rows may require a deliberate full refresh. Reconcile periodically according to your integration's needs. A full export is paged, not a single frozen cross-request snapshot.

Use inventory movements for transaction flow and timestamp filters for recorded sales, purchases and movement events; these are distinct from Delta snapshots.