IMS Documentation
IMS API 1.1.0.0 • Business API v1

Partner Data & Stock Delta

Company-scoped supplier catalogs, controlled physical-store availability and incremental stock synchronization for partner integrations.

Independent authorizationBoth endpoints require an API key with an active company assignment, partner-data.read and an active Partner Data policy. items.read and inventory.read do not grant Partner Data access. Your key should be limited to the scopes and companies required for your integration; general Business API resources are not restricted by the Partner policy and may expose costs.

Access prerequisites

Before integrating, obtain the API base URL, company ID and a valid key with partner-data.read. Your administrator must activate the company policy and required Partner Data contracts. Ask them to confirm the authorized suppliers, physical stock sources, item-selection mode, quantity reductions and discount ceiling. See IMS Global API Administration for setup.

Partner keys cannot change these settings. Policy changes can require a full synchronization; follow the handshake and invalidation rules below.

Full catalog

GET /api/v1/companies/{companyId}/partner-data/items

Optional query parameters: page (default 1, minimum 1), pageSize (default 200, range 1–1000), itemId, barcode, style. String filters are trimmed exact matches. Results are ordered by itemId.

The envelope contains companyId, companyCode, companyName, currencyCode, page, pageSize, count, totalCount, totalPages and data. Empty results have zero totalPages.

Item fields

FieldType / default
itemIdstring
barcodestring?
itemNamestring?
itemNameArstring?
stylestring?
colorCodestring?
colorNamestring?
sizestring?
supplierIdint
supplierNamestring?
originalPricedecimal
currentPricedecimal
discountPercentdecimal
availableQtydecimal

The Partner response does not return cost, COGS, purchase cost or database credentials. Price and quantity fields are nonnullable JSON numbers; no fixed rounding or scale is promised.

Catalog membership and available quantity

  1. A merchandise item must belong to the authorized company and an allowed supplier. SELECTED mode also requires an active item selection. Removing a supplier excludes its catalog items while preserving saved selections and reductions for later re-enablement.
  2. Stock is summed across the policy-selected stores that currently satisfy physical-store eligibility. The per-item quantity reduction is deducted once after aggregation, then negative results are clamped to zero.
  3. If the actual discount percentage is strictly greater than the configured ceiling, availability becomes zero. An equal discount is allowed. The item remains in the catalog and retains its actual price and discount fields.
  4. Zero stock, a reduction larger than stock, or an over-ceiling discount does not remove an otherwise eligible item or reduce totalCount.

Discount is zero when the original price is not positive or current price is not below original price; otherwise it is (originalPrice - currentPrice) * 100 / originalPrice. For example, eligible stores holding 5 and 4 units with Reduce By Qty 2 yield availability 7. If a 20% discount exceeds a 15% ceiling, that item's availability is 0 while its prices remain visible.

An active policy with no configured supplier or stock source returns an empty catalog, as does SELECTED mode without active selections. A missing or inactive policy instead returns 403 partner_data_policy_not_available.

Request and illustrative response

curl "https://api.example.com/api/v1/companies/1/partner-data/items?page=1&pageSize=200"   -H "X-IMS-API-Key: YOUR_API_KEY"
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "currencyCode": "USD",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "itemId": "SHIRT-BLUE-M",
      "barcode": "1234567890123",
      "itemName": "Cotton shirt",
      "itemNameAr": null,
      "style": "SHIRT",
      "colorCode": "BLUE",
      "colorName": "Blue",
      "size": "M",
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "originalPrice": 20,
      "currentPrice": 18,
      "discountPercent": 10,
      "availableQty": 7
    }
  ]
}

Partner Stock Delta

GET /api/v1/companies/{companyId}/partner-data/items/changes

Query parameters: since and through (offset timestamps), afterItemId, policyVersion, and pageSize (default 200, range 1–1000). There is no page-number parameter and no itemId, barcode or style filter on this endpoint. Treat policyVersion as opaque and always send it after the initial handshake.

Initial full-sync handshake

  1. Call /changes without since. The server returns HTTP 200 with fullSyncRequired=true, reason, baselineSince, policyVersion, companyId, count=0 and an empty data array.
  2. Capture baselineSince and policyVersion before exporting the catalog. Do not use your own clock to choose a baseline.
  3. Retrieve and successfully apply every page of the unfiltered full catalog. Rebuild or reconcile the entire mirror, removing records absent from the new eligible catalog.
  4. After all catalog pages are applied, call changes with the captured since=baselineSince and policyVersion. Apply the incremental pages as below.
  5. If fullSyncRequired appears again, restart with the new handshake values. A handshake is a rebuild instruction, not a completed empty synchronization.

A full-sync handshake is returned for initial synchronization (initial_sync_required), when history is unavailable (history_not_available), or when policy or eligible catalog membership changes (policy_or_catalog_changed). Use the returned baselineSince; do not calculate or guess a new baseline.

{
  "companyId": 1,
  "fullSyncRequired": true,
  "reason": "initial_sync_required",
  "baselineSince": "2026-10-13T10:00:00+00:00",
  "policyVersion": "OPAQUE_VERSION_FROM_SERVER",
  "count": 0,
  "data": []
}

Incremental pages and safe cursor advancement

  1. Begin with the last fully applied nextSince as since and the saved policyVersion. Omit through and afterItemId; the server supplies the safe through value.
  2. Apply each returned item as an idempotent replacement/upsert keyed by itemId. These are current price and availability snapshots, not quantity differences; never add availableQty to your old balance.
  3. When hasMore=true, keep exactly the same since, through and policyVersion. Continue with afterItemId=nextAfterItemId. nextSince remains equal to since while more pages remain.
  4. Only after every page is successfully applied, persist the final nextSince, which equals through, and clear afterItemId. This also applies to an empty completed window. If a page fails, do not advance the durable cursor beyond unapplied data.

The incremental envelope contains companyId, companyCode, currencyCode, fullSyncRequired=false, since, through, policyVersion, count, hasMore, nextAfterItemId, nextSince and data. It does not contain companyName, totalCount, totalPages or ordinary page metadata. Item fields match the full catalog. nextAfterItemId is nonnull only when another page exists.

GET /api/v1/companies/1/partner-data/items/changes?since=2026-10-13T10%3A00%3A00Z&policyVersion=OPAQUE_VERSION_FROM_SERVER&pageSize=200

# Continuation: reuse the response through and nextAfterItemId exactly.
GET /api/v1/companies/1/partner-data/items/changes?since=2026-10-13T10%3A00%3A00Z&through=2026-10-13T10%3A05%3A00Z&policyVersion=OPAQUE_VERSION_FROM_SERVER&afterItemId=SHIRT-BLUE-M&pageSize=200

Illustrative completed empty incremental window:

{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "USD",
  "fullSyncRequired": false,
  "since": "2026-10-13T10:00:00+00:00",
  "through": "2026-10-13T10:05:00+00:00",
  "policyVersion": "OPAQUE_VERSION_FROM_SERVER",
  "count": 0,
  "hasMore": false,
  "nextAfterItemId": null,
  "nextSince": "2026-10-13T10:05:00+00:00",
  "data": []
}

Safe synchronization window

The server chooses a safe upper time boundary for each Delta window. Ongoing activity can delay that boundary; use the returned through value without guessing or advancing it. Both ends of the change-time interval are inclusive, so boundary rows may repeat.

Rows are latest-state snapshots, not a historical snapshot frozen at through. Live changes may appear in a later state and converge in subsequent windows. Full-catalog pages also do not share one frozen export snapshot. Apply idempotently and honor every full-sync instruction; no exactly-once or immutable multi-page guarantee applies.

Policy and catalog invalidation

The server checks policy and eligible catalog membership on every Delta request. Supplier, item or eligible-store membership changes, quantity reductions and discount-ceiling changes can change policyVersion. These changes require a full rebuild, including deletion of stale mirror records. Delta does not emit removal records. Ordinary descriptive-field changes require supported change tracking or deliberate reconciliation; do not treat this as an all-field historical event feed.

Availability and reconciliation prerequisites

Ask your administrator to confirm that Partner Data and Delta are available for the company before starting synchronization. See IMS Global API Administration. A software version alone does not establish company activation.

Changes made outside supported IMS operations may not appear in incremental results. Arrange an authorized full refresh when necessary; Delta is not a complete historical event feed. Cost-only updates are outside this feed.

Partner errors and recovery

Maintenance: This operation may temporarily return HTTP 503 during company maintenance. Retain the last applied page or cursor and retry the same request after the indicated delay. See maintenance protection.

Status / codeAction
403 partner_data_policy_not_availableAsk the administrator to check the active company policy; do not fall back to broader data scopes.
400 incomplete_delta_cursorA nonempty afterItemId needs through and a nonblank policyVersion. Reuse the complete continuation tuple.
400 invalid_delta_windowthrough must be between since and the server's current safe window boundary. Retain your last valid durable cursor and check the supplied timestamps.
503 maintenance_active / maintenance_status_unavailableRetain the current catalog page or Delta cursor and retry after Retry-After. Maintenance alone does not invalidate the policy version.
503 partner_delta_contract_unavailableThe company Delta capability is unavailable. Ask the administrator to verify its setup; do not skip a window or advance the cursor.

Common authentication, company, validation and rate-limit errors also apply. Other failures may return 500. See Errors & Rate Limits.

Complete operation and envelope reference

See Partner Items Catalog and Partner Item Changes for complete query/row field dictionaries, request examples and populated incremental responses. Both operations require partner-data.read and an active policy for the company.

Envelope types: companyId, page, pageSize and count are nonnullable integers; totalCount and totalPages are nonnullable int64 integers; companyCode, companyName and currencyCode are nonnullable strings. Catalog data is a nonnull array of item rows. Delta fullSyncRequired and hasMore are nonnullable booleans; reason and policyVersion are nonnullable strings; baselineSince, since, through and nextSince are nonnullable offset timestamps. nextAfterItemId is a nullable string and data is always an array. Fields exist only in their documented catalog, full-sync or incremental shape; absent fields are not returned as null.

The opaque policyVersion identifies policy/catalog membership for this client and company. It must be copied exactly, including on later polls. A since later than the safe watermark cannot form a valid window and returns 400 invalid_delta_window. Do not repair a failed synchronization by guessing a policy version or watermark.

For ordinary item classifications and per-store actual stock and permitted financial values, use Items and Inventory Delta with the ordinary scopes instead of this partner availability contract.