IMS Documentation
IMS API 1.1.0.0 • Business API v1

Business API endpoint reference

All 26 GET operations: 24 ordinary business operations and two separately authorized Partner Data operations.

Examples are synthetic. Replace the host, key and identifiers with approved test values. All operations require one X-IMS-API-Key header, active client/key and company assignment. Company IDs are integers from 1 to 32767. Ordinary external clients additionally need a configured company contract. A scope alone does not grant unrestricted data. Contract policies explain row visibility and the trusted-internal exception.

Every response field listed below is present; nullable fields use JSON null. Numbers are JSON numbers, not strings. Preserve int64 precision. Optional omitted filters impose no additional filter unless stated. Boolean query values are true or false; strings use exact matches after trimming except supplier search. This read-only API does not create or change transactions.

Operation index

  1. Stores
  2. Suppliers
  3. Items
  4. Items Delta
  5. Inventory
  6. Inventory Delta
  7. Inventory Movements
  8. Sales
  9. Purchases
  10. Stock Transfers
  11. Stock Adjustments
  12. Stock Depreciations
  13. Markdowns
  14. Promotions
  15. Promotion Stores
  16. Promotion Items
  17. Promotion Client Categories
  18. Promotion Tiers
  19. Promotion Cashback Stores
  20. Discount Coupon Events
  21. Discount Coupon Event Stores
  22. Customers Catalog
  23. Customer Delta
  24. Footfall
  25. Partner Data Items Catalog
  26. Partner Data Item Changes / Stock Delta

Stores

Build a location selector for an authorized stock or sales report.

GET /api/v1/companies/{companyId}/stores

Required scope: stores.read. Company and policy: Only rows for contract-authorized stores are returned.

Query parameters

No query parameters or pagination.

Ordering, filtering and pagination

Order: storeId. Returns all authorized stores in one response.

Financial and visibility rules

Without financial-data permission, these fields are null: monthlyRent. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/stores HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "count": 1,
  "data": [
    {
      "storeId": 101,
      "storeName": "Example Store",
      "storeNameAr": "متجر تجريبي",
      "locationId": null,
      "locationName": null,
      "phone": "+00000000000",
      "address": null,
      "areaSqm": null,
      "monthlyRent": null,
      "isActive": true,
      "transactionsEnabled": true,
      "isMainStore": false,
      "isOnlineStore": false,
      "isDamageStore": false,
      "vcountEnabled": false
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringNoStore Name.
storeNameArstringNoStore Name Ar.
locationIdinteger (int32)YesLocation identifier in this company.
locationNamestringYesLocation Name.
phonestringYesRecorded contact phone, including the country code when available.
addressstringYesAddress.
areaSqmnumber (decimal)YesArea Sqm.
monthlyRentnumber (decimal)YesMonthly Rent.
isActivebooleanNoWhether the store is active.
transactionsEnabledbooleanNoWhether the store permits transactions.
isMainStorebooleanNoMain-store designation.
isOnlineStorebooleanNoOnline-store designation.
isDamageStorebooleanNoDamage-store designation.
vcountEnabledbooleanNoWhether the store has V-Count enabled.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

Integration scenario

Hypothetical example: Build a location selector for an authorized stock or sales report. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It uses these authorized IDs when constructing later requests.

Suppliers

Resolve supplier IDs and VAT registration details for purchase reporting.

GET /api/v1/companies/{companyId}/suppliers

Required scope: purchases.read. Company and policy: Only rows for contract-authorized suppliers are returned.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
supplierIdinteger (int32)Optional; omitted means no additional filter.
searchstringOptional; case-insensitive supplier-name search; % and _ are search wildcards.
vatRegisteredbooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: supplierId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/suppliers?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "supplierNameAr": null,
      "vatRegistered": null,
      "vatAccountNo": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
supplierIdinteger (int32)NoSupplier identifier in this company.
supplierNamestringYesSupplier Name.
supplierNameArstringYesSupplier Name Ar.
vatRegisteredbooleanYesVat registered flag.
vatAccountNostringYesVat Account No; combine with company and document type/location for identity.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve supplier IDs and VAT registration details for purchase reporting. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Items

Maintain a merchandise lookup with descriptions, classifications and current retail prices.

GET /api/v1/companies/{companyId}/items

Required scope: items.read. Company and policy: Only rows for contract-authorized suppliers are returned.

For incremental mirroring, use Items Delta. A missing brand name uses the supplier name when available; this does not create a brand ID.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
itemIdstringOptional; omitted means no additional filter.
barcodestringOptional; omitted means no additional filter.
stylestringOptional; omitted means no additional filter.
supplierIdinteger (int32)Optional; omitted means no additional filter.
brandIdinteger (int32)Optional; omitted means no additional filter.
categoryIdinteger (int32)Optional; omitted means no additional filter.
subcategoryIdinteger (int32)Optional; omitted means no additional filter.
itemStateinteger (int32)Optional; omitted means no additional filter.
isOnlinebooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: itemId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

Without financial-data permission, these fields are null: averageLocalCost, lastPurchasePrice, lastPurchaseCurrencyId, lastPurchaseCurrency, lastPurchaseDate. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/items?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "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
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
itemIdstringNoItem identifier in this company.
barcodestringYesPrimary item barcode, where recorded.
stylestringYesStyle.
themestringYesTheme.
itemNamestringYesItem Name.
itemNameArstringYesItem Name Ar.
itemTypeinteger (int32)NoItem-type code; 1 denotes merchandise. Sales netQuantity excludes other types.
colorCodestringYesColor Code.
colorNamestringYesColor Name.
sizestringYesSize.
unitinteger (int32)YesUnit identifier.
supplierIdinteger (int32)YesSupplier identifier in this company.
supplierNamestringYesSupplier Name.
brandIdinteger (int32)YesBrand identifier in this company.
brandNamestringYesRecorded brand name, falling back to supplierName when the brand name is null or empty. May be null if the fallback is unavailable; brandId is unchanged.
categoryIdinteger (int32)YesCategory identifier in this company.
categoryNamestringYesCategory Name.
subcategoryIdinteger (int32)YesSubcategory identifier in this company.
subcategoryNamestringYesSubcategory Name.
productGroupIdinteger (int32)YesProduct Group identifier in this company.
productGroupNamestringYesProduct Group Name.
productSubgroupIdinteger (int32)YesProduct Subgroup identifier in this company.
productSubgroupNamestringYesProduct Subgroup Name.
receivedSeasonIdstringYesSeason identifier returned as text; preserve its formatting.
receivedSeasonstringYesReceived Season.
salesPeriodIdstringYesSales-period identifier returned as text; preserve its formatting.
salesPeriodstringYesSales Period.
ageRangeIdinteger (int32)YesAge Range identifier in this company.
ageRangestringYesAge Range.
genderIdinteger (int32)YesGender identifier in this company.
genderstringYesGender.
countryIdinteger (int32)YesCountry identifier in this company.
countryNamestringYesCountry Name.
itemStateinteger (int32)NoItem-state code. The filter uses exact integer equality; no fixed enum range is imposed by this API.
isOnlinebooleanNoItem online designation; not an available-stock quantity.
originalPricenumber (decimal)YesOriginal Price.
currentPricenumber (decimal)YesCurrent Price.
averageLocalCostnumber (decimal)YesCurrent average local item cost; subject to financial masking.
lastPurchaseDatestring (YYYY-MM-DD)YesLast Purchase Date in the source business record.
lastPurchaseCurrencyIdinteger (int32)YesLast Purchase Currency identifier in this company.
lastPurchaseCurrencystringYesLast Purchase Currency.
lastPurchasePricenumber (decimal)YesLast recorded purchase price; subject to financial masking.
firstDisplayDatestring (YYYY-MM-DD)YesFirst Display Date in the source business record.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. These envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Maintain a merchandise lookup with descriptions, classifications and current retail prices. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Items Delta

Maintain an authorized item master mirror using current snapshots rather than historical changes.

GET /api/v1/companies/{companyId}/items/changes

Required scope: items.read. Company and policy: Same authorization, supplier restrictions and financial masking as the ordinary full endpoint. No Partner Data policy or new scope is required.

Query parameters

ParameterTypeRequirement / default / allowed values
sinceoffset date-timeOptional for initial handshake; required to retrieve changes.
throughoffset date-timeOptional on first poll; required on continuation. Reuse server value.
policyVersionstringUse server-returned value with since; missing version requires full synchronization. Required for a fixed window or continuation.
afterItemIdstringOptional keyset cursor; nonblank item ID, maximum 15 characters. Requires since, through and policyVersion.
afterStoreIdinteger (int32)Not accepted by Items Delta. Omit.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: itemId. Keyset pagination only; no page numbers, totals or ordinary resource filters. Both change-time bounds are inclusive. Reuse the fixed through, since and policyVersion until all pages are applied. Tracked item-master or stock changes can select an item.

Financial and visibility rules

Exactly the same fields and null masking as the full items contract. Brand fallback follows the full item contract.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/items/changes?pageSize=200 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 capturing the baseline and completing the full export, poll using the returned values. Fictional example:

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": false,
  "nextAfterItemId": null,
  "nextAfterStoreId": null,
  "nextSince": "2026-10-01T10:05: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
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
itemIdstringNoItem identifier in this company.
barcodestringYesPrimary item barcode, where recorded.
stylestringYesStyle.
themestringYesTheme.
itemNamestringYesItem Name.
itemNameArstringYesItem Name Ar.
itemTypeinteger (int32)NoItem-type code; 1 denotes merchandise. Sales netQuantity excludes other types.
colorCodestringYesColor Code.
colorNamestringYesColor Name.
sizestringYesSize.
unitinteger (int32)YesUnit identifier.
supplierIdinteger (int32)YesSupplier identifier in this company.
supplierNamestringYesSupplier Name.
brandIdinteger (int32)YesBrand identifier in this company.
brandNamestringYesRecorded brand name, falling back to supplierName when the brand name is null or empty. May be null if the fallback is unavailable; brandId is unchanged.
categoryIdinteger (int32)YesCategory identifier in this company.
categoryNamestringYesCategory Name.
subcategoryIdinteger (int32)YesSubcategory identifier in this company.
subcategoryNamestringYesSubcategory Name.
productGroupIdinteger (int32)YesProduct Group identifier in this company.
productGroupNamestringYesProduct Group Name.
productSubgroupIdinteger (int32)YesProduct Subgroup identifier in this company.
productSubgroupNamestringYesProduct Subgroup Name.
receivedSeasonIdstringYesSeason identifier returned as text; preserve its formatting.
receivedSeasonstringYesReceived Season.
salesPeriodIdstringYesSales-period identifier returned as text; preserve its formatting.
salesPeriodstringYesSales Period.
ageRangeIdinteger (int32)YesAge Range identifier in this company.
ageRangestringYesAge Range.
genderIdinteger (int32)YesGender identifier in this company.
genderstringYesGender.
countryIdinteger (int32)YesCountry identifier in this company.
countryNamestringYesCountry Name.
itemStateinteger (int32)NoItem-state code. The filter uses exact integer equality; no fixed enum range is imposed by this API.
isOnlinebooleanNoItem online designation; not an available-stock quantity.
originalPricenumber (decimal)YesOriginal Price.
currentPricenumber (decimal)YesCurrent Price.
averageLocalCostnumber (decimal)YesCurrent average local item cost; subject to financial masking.
lastPurchaseDatestring (YYYY-MM-DD)YesLast Purchase Date in the source business record.
lastPurchaseCurrencyIdinteger (int32)YesLast Purchase Currency identifier in this company.
lastPurchaseCurrencystringYesLast Purchase Currency.
lastPurchasePricenumber (decimal)YesLast recorded purchase price; subject to financial masking.
firstDisplayDatestring (YYYY-MM-DD)YesFirst Display Date in the source business record.

The two envelope shapes and continuation rules are documented in the ordinary Delta field dictionary. The nextAfterStoreId field is always null for Items Delta. Both continuation keys are null when hasMore is false.

Errors and safe 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.

HTTP 200 with fullSyncRequired=true instructs a full rebuild. HTTP 400 invalid_delta_cursor or invalid_delta_window: retain the last durable cursor and correct the request; HTTP 409 non_unique_delta_key or HTTP 503 business_delta_contract_unavailable: contact the administrator. Standard authentication, authorization, company and rate-limit errors also apply.

Integration scenario

Capture the baseline before exporting every full page; apply incremental rows idempotently by (companyId, itemId). Advance nextSince only after a complete window succeeds. See the synchronization procedure.

Inventory

Read current stock balances by item and store for replenishment.

GET /api/v1/companies/{companyId}/inventory

Required scope: inventory.read. Company and policy: Only rows for contract-authorized stores are returned. Items must also belong to authorized suppliers.

For incremental mirroring, use Inventory Delta. Delta retains zero and negative balances and returns current rows keyed by store and item.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
storeIdinteger (int32)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.
isMainStorebooleanOptional; omitted means no additional filter.
isOnlineStorebooleanOptional; omitted means no additional filter.
isDamageStorebooleanOptional; omitted means no additional filter.
isActivebooleanOptional; omitted means no additional filter.
nonZeroOnlybooleanOptional; true excludes zero/null balances; false or omitted does not restrict quantity.

Ordering, filtering and pagination

Order: storeId, itemId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, stockValue. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/inventory?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "storeId": 101,
      "storeName": "Example Store",
      "isMainStore": false,
      "isOnlineStore": false,
      "isDamageStore": false,
      "isActive": true,
      "itemId": "DEMO-SHIRT-M",
      "onHandQty": 7,
      "unitCost": null,
      "stockValue": null,
      "currentRetailPrice": 18,
      "retailValue": 126
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.
isMainStorebooleanNoMain-store designation.
isOnlineStorebooleanNoOnline-store designation.
isDamageStorebooleanNoDamage-store designation.
isActivebooleanNoWhether the store is active.
itemIdstringNoItem identifier in this company.
onHandQtynumber (decimal)YesCurrent on-hand item balance at the store.
unitCostnumber (decimal)YesUnit Cost.
stockValuenumber (decimal)YesOn-hand quantity × unit cost, subject to financial masking.
currentRetailPricenumber (decimal)YesCurrent Retail Price.
retailValuenumber (decimal)YesOn-hand quantity × current retail price.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. These envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Read current stock balances by item and store for replenishment. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Inventory Delta

Maintain an authorized item/store stock and valuation mirror using current snapshots rather than historical changes.

GET /api/v1/companies/{companyId}/inventory/changes

Required scope: inventory.read. Company and policy: Same authorization, supplier/store restrictions and financial masking as the ordinary full endpoint. No Partner Data policy or new scope is required.

Query parameters

ParameterTypeRequirement / default / allowed values
sinceoffset date-timeOptional for initial handshake; required to retrieve changes.
throughoffset date-timeOptional on first poll; required on continuation. Reuse server value.
policyVersionstringUse server-returned value with since; missing version requires full synchronization. Required for a fixed window or continuation.
afterItemIdstringOptional keyset cursor; nonblank item ID, maximum 15 characters. Requires since, through and policyVersion.
afterStoreIdinteger (int32)Required together with afterItemId for inventory continuation; omit both on first poll.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: storeId, itemId. Keyset pagination only; no page numbers, totals or ordinary resource filters. Both change-time bounds are inclusive. Reuse the fixed through, since and policyVersion until all pages are applied. A tracked stock change selects the corresponding item/store; a tracked item-master change selects authorized stock rows for that item. Zero and negative stock are returned.

Financial and visibility rules

Exactly the same fields and null masking as the full inventory contract. Actual store balances, not partner availability.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/inventory/changes?pageSize=200 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 capturing the baseline and completing the full export, poll using the returned values. Fictional example:

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": false,
  "nextAfterItemId": null,
  "nextAfterStoreId": null,
  "nextSince": "2026-10-01T10:05: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
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.
isMainStorebooleanNoMain-store designation.
isOnlineStorebooleanNoOnline-store designation.
isDamageStorebooleanNoDamage-store designation.
isActivebooleanNoWhether the store is active.
itemIdstringNoItem identifier in this company.
onHandQtynumber (decimal)YesCurrent on-hand item balance at the store.
unitCostnumber (decimal)YesUnit Cost.
stockValuenumber (decimal)YesOn-hand quantity × unit cost, subject to financial masking.
currentRetailPricenumber (decimal)YesCurrent Retail Price.
retailValuenumber (decimal)YesOn-hand quantity × current retail price.

The two envelope shapes and continuation rules are documented in the ordinary Delta field dictionary. The nextAfterStoreId field is always null for Items Delta. Both continuation keys are null when hasMore is false.

Errors and safe 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.

HTTP 200 with fullSyncRequired=true instructs a full rebuild. HTTP 400 invalid_delta_cursor or invalid_delta_window: retain the last durable cursor and correct the request; HTTP 409 non_unique_delta_key or HTTP 503 business_delta_contract_unavailable: contact the administrator. Standard authentication, authorization, company and rate-limit errors also apply.

Integration scenario

Capture the baseline before exporting every full page; apply incremental rows idempotently by (companyId, storeId, itemId). Advance nextSince only after a complete window succeeds. See the synchronization procedure.

Inventory Movements

Reconcile dated stock flows across sales, receipts, transfers and adjustments.

GET /api/v1/companies/{companyId}/inventory/movements

Required scope: inventory.read. Company and policy: Only rows for contract-authorized suppliers are returned. The ordinary contract applies item-supplier membership here; storeId and relatedStoreId are optional request filters.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required with toDate in date mode; inclusive.
toDatestring (YYYY-MM-DD)Required with fromDate in date mode; inclusive; not earlier than fromDate.
fromTimestampstring (local date-time)Required with toTimestamp in timestamp mode; inclusive; no offset or Z.
toTimestampstring (local date-time)Required with fromTimestamp in timestamp mode; exclusive; later than fromTimestamp.
movementTypestringOptional; SALE, SALE_RETURN, PURCHASE, PURCHASE_RETURN, TRANSFER_OUT, TRANSFER_IN, STOCK_ADJUSTMENT, STOCK_DEPRECIATION; case-insensitive.
transactionTypeinteger (int32)Optional; allowed 1, 2, 51, 52, 53, 54, 81.
storeIdinteger (int32)Optional; omitted means no additional filter.
relatedStoreIdinteger (int32)Optional; omitted means no additional filter.
documentCenterIdinteger (int32)Optional; omitted means no additional filter.
documentNointeger (int64)Optional; omitted means no additional filter.
lineNointeger (int64)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: movementDate, movementTime, storeId, documentCenterId, documentNo, lineNo, movementType. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Supply either both fromDate and toDate (inclusive company business dates) or both fromTimestamp and toTimestamp (company-local timestamps without a UTC offset or Z). Do not mix the pairs. The timestamp start is inclusive and the end exclusive; the start must precede the end. Timestamp selection uses stockEffectiveAt. For purchase and purchase-return rows this is the recorded stock-affecting time when available; for other movement types it is the recorded transaction timestamp. The original movementDate and movementTime remain unchanged.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, stockValueMovement. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/inventory/movements?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "fromTimestamp": null,
  "toTimestamp": null,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "movementDate": "2026-10-01",
      "stockEffectiveAt": "2026-10-01T10:00:00",
      "movementTime": "10:00:00",
      "movementType": "SALE",
      "transactionType": 51,
      "storeId": 101,
      "relatedStoreId": null,
      "documentCenterId": 101,
      "documentNo": 9001,
      "lineNo": 1,
      "itemId": "DEMO-SHIRT-M",
      "movementQty": -2,
      "unitCost": null,
      "stockValueMovement": null
    }
  ]
}

Alternative timestamp request (same row schema):

GET https://api.example.com/api/v1/companies/1/inventory/movements?fromTimestamp=2026-10-01T00:00:00&toTimestamp=2026-10-02T00:00:00&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json

The response echoes fromTimestamp and toTimestamp; fromDate and toDate are null in this mode.

Response-row fields

FieldJSON typeNullableMeaning
movementDatestring (YYYY-MM-DD)YesMovement Date in the source business record.
stockEffectiveAtstring (local date-time)YesRecorded stock-affecting timestamp for purchases/returns, when available; recorded transaction timestamp for other movement types.
movementTimestring (HH:mm:ss)YesMovement Time.
movementTypestringNoMovement Type.
transactionTypeinteger (int32)YesTransaction Type.
storeIdinteger (int32)NoStore identifier in this company.
relatedStoreIdinteger (int32)YesRelated Store identifier in this company.
documentCenterIdinteger (int32)NoDocument Center identifier in this company.
documentNointeger (int64)NoDocument No; combine with company and document type/location for identity.
lineNointeger (int64)NoLine number within the document.
itemIdstringNoItem identifier in this company.
movementQtynumber (decimal)YesMovement Qty.
unitCostnumber (decimal)YesUnit Cost.
stockValueMovementnumber (decimal)YesSigned movement quantity valued at the movement unit cost.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate/toDate and fromTimestamp/toTimestamp echo the accepted bounds; the unused pair is null. The other listed envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_transaction_type or invalid_movement_type: choose a value from the query table; no custom movement labels are accepted. 400 date_range_required or invalid_date_range: supply valid inclusive date bounds in date mode. 400 invalid_timestamp_range: supply a valid local timestamp pair without date filters. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Reconcile dated stock flows across sales, receipts, transfers and adjustments. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Sales

Import sales and return lines into an authorized store sales analysis.

GET /api/v1/companies/{companyId}/sales

Required scope: sales.read. Company and policy: Only rows for contract-authorized stores are returned. This resource does not additionally filter by contract supplier IDs.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required with toDate in date mode; inclusive.
toDatestring (YYYY-MM-DD)Required with fromDate in date mode; inclusive; not earlier than fromDate.
fromTimestampstring (local date-time)Required with toTimestamp in timestamp mode; inclusive; no offset or Z.
toTimestampstring (local date-time)Required with fromTimestamp in timestamp mode; exclusive; later than fromTimestamp.
storeIdinteger (int32)Optional; omitted means no additional filter.
transactionTypeinteger (int32)Optional; allowed 51, 52, 53, 54.
invoiceNointeger (int64)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.
itemTypeinteger (int32)Optional; omitted means no additional filter.
salespersonIdinteger (int32)Optional; omitted means no additional filter.
customerIdinteger (int32)Optional; omitted means no additional filter.
loyaltyCustomerIdinteger (int32)Optional; omitted means no additional filter.
promotionIdinteger (int32)Optional; omitted means no additional filter.
markdownIdinteger (int32)Optional; omitted means no additional filter.
couponEventIdinteger (int32)Optional; omitted means no additional filter.
isReturnbooleanOptional; omitted means no additional filter.
isDiscountedbooleanOptional; omitted means no additional filter.
isItemDiscountedbooleanOptional; omitted means no additional filter.
isInvoiceDiscountedbooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: saleDate, saleTimestamp, storeId, transactionType, invoiceNo, lineNo. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Supply either both fromDate and toDate (inclusive company business dates) or both fromTimestamp and toTimestamp (company-local timestamps without a UTC offset or Z). Do not mix the pairs. The timestamp start is inclusive and the end exclusive; the start must precede the end. Timestamp selection uses saleTimestamp, not saleDate. It can include backdated invoices; it is not a last-modified feed.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, cogsAmount. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/sales?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "fromTimestamp": null,
  "toTimestamp": null,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "saleDate": "2026-10-01",
      "saleTimestamp": "2026-10-01T10:00:00",
      "storeId": 101,
      "storeName": "Example Store",
      "transactionType": 51,
      "transactionTypeName": null,
      "invoiceNo": 9001,
      "lineNo": 1,
      "itemId": "DEMO-SHIRT-M",
      "itemType": 1,
      "salespersonId": null,
      "salespersonName": null,
      "customerId": null,
      "loyaltyCustomerId": null,
      "promotionId": 10,
      "markdownId": null,
      "couponEventId": 20,
      "quantity": 2,
      "originalUnitPrice": 20,
      "discountPercent": 10,
      "discountAmount": 2,
      "invoiceDiscountAmount": 0,
      "lineAmount": 36,
      "unitCost": null,
      "saleState": null,
      "isReturn": false,
      "isDiscounted": true,
      "isItemDiscounted": true,
      "isInvoiceDiscounted": false,
      "netQuantity": 2,
      "grossSalesAmount": 40,
      "netSalesAmount": 36,
      "cogsAmount": null
    }
  ]
}

Alternative timestamp request (same row schema):

GET https://api.example.com/api/v1/companies/1/sales?fromTimestamp=2026-10-01T00:00:00&toTimestamp=2026-10-02T00:00:00&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json

The response echoes fromTimestamp and toTimestamp; fromDate and toDate are null in this mode.

Response-row fields

FieldJSON typeNullableMeaning
saleDatestring (YYYY-MM-DD)YesSale Date in the source business record.
saleTimestampstring (ISO date-time)YesSale Timestamp in the source business record.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.
transactionTypeinteger (int32)NoTransaction Type.
transactionTypeNamestringYesTransaction Type Name.
invoiceNointeger (int64)NoInvoice No; combine with company and document type/location for identity.
lineNointeger (int32)NoLine number within the document.
itemIdstringNoItem identifier in this company.
itemTypeinteger (int32)NoItem-type code; 1 denotes merchandise. Sales netQuantity excludes other types.
salespersonIdinteger (int32)YesSalesperson identifier in this company.
salespersonNamestringYesSalesperson Name.
customerIdinteger (int32)YesERP customer identifier; a separate namespace from loyaltyCustomerId.
loyaltyCustomerIdinteger (int32)YesLoyalty customer identifier associated with the sale.
promotionIdinteger (int32)YesPromotion identifier in this company.
markdownIdinteger (int32)YesMarkdown identifier in this company.
couponEventIdinteger (int32)YesCoupon Event identifier in this company.
quantitynumber (decimal)YesTransaction-line quantity before signed business interpretation.
originalUnitPricenumber (decimal)YesSaved sales-line unit price before discounts.
discountPercentnumber (decimal)YesPercentage points (10 means 10%).
discountAmountnumber (decimal)YesSaved item-level discount amount.
invoiceDiscountAmountnumber (decimal)YesSaved invoice-discount amount allocated to this sales line.
lineAmountnumber (decimal)YesSaved sales-line total before subtracting invoiceDiscountAmount.
unitCostnumber (decimal)YesUnit Cost.
saleStateinteger (int32)YesSale-line state code; not a delivery or payment status.
isReturnbooleanNoTrue for a return transaction.
isDiscountedbooleanNoTrue when either item or invoice discount applies.
isItemDiscountedbooleanNoTrue when a saved item-level discount applies.
isInvoiceDiscountedbooleanNoTrue when a saved invoice-level discount applies.
netQuantitynumber (decimal)YesSigned business quantity; sales merchandise returns and purchase returns reverse sign. See Data Semantics.
grossSalesAmountnumber (decimal)YesSigned merchandise quantity × original unit price, or saved total for non-merchandise.
netSalesAmountnumber (decimal)YesSigned line amount minus saved invoice discount.
cogsAmountnumber (decimal)YesSigned quantity × item cost; null when financial data is not permitted.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate/toDate and fromTimestamp/toTimestamp echo the accepted bounds; the unused pair is null. The other listed envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_transaction_type: use 51/52 for sales or 53/54 for returns. 400 date_range_required or invalid_date_range: supply valid inclusive date bounds in date mode. 400 invalid_timestamp_range: supply a valid local timestamp pair without date filters. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Import sales and return lines into an authorized store sales analysis. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Purchases

Reconcile purchase and purchase-return line quantities and permitted acquisition values.

GET /api/v1/companies/{companyId}/purchases

Required scope: purchases.read. Company and policy: Only rows for contract-authorized suppliers are returned. The purchase center must be an authorized contract store; receivingStoreId is a separate optional filter.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required with toDate in date mode; inclusive.
toDatestring (YYYY-MM-DD)Required with fromDate in date mode; inclusive; not earlier than fromDate.
fromTimestampstring (local date-time)Required with toTimestamp in timestamp mode; inclusive; no offset or Z.
toTimestampstring (local date-time)Required with fromTimestamp in timestamp mode; exclusive; later than fromTimestamp.
purchaseCenterIdinteger (int32)Optional; omitted means no additional filter.
receivingStoreIdinteger (int32)Optional; omitted means no additional filter.
transactionTypeinteger (int32)Optional; allowed 1, 2.
documentStateinteger (int32)Optional; integer 0–3.
supplierIdinteger (int32)Optional; omitted means no additional filter.
purchaseNointeger (int64)Optional; omitted means no additional filter.
supplierInvoiceNostringOptional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.
statisticalPeriodIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: purchaseDate, purchaseCenterId, transactionType, purchaseNo, lineNo. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Supply either both fromDate and toDate (inclusive company business dates) or both fromTimestamp and toTimestamp (company-local timestamps without a UTC offset or Z). Do not mix the pairs. The timestamp start is inclusive and the end exclusive; the start must precede the end. Timestamp selection uses stockEffectiveAt and includes finalized vouchers only when that timestamp is known. Date selection still includes other document states unless filtered. Newly finalized purchases may have a null stockEffectiveAt until scheduled processing completes; use date-based reconciliation when needed.

Financial and visibility rules

Without financial-data permission, these fields are null: currencyId, currencyName, currencySymbol, exchangeRate, costRate, unitPurchasePrice, lineForeignAmount, foreignCostAmount, localCostAmount, landedCostAmount, landedExpenseAmount, documentForeignTotal, documentDiscountEarned, documentNetForeignAmount, documentExpenses. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/purchases?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "fromTimestamp": null,
  "toTimestamp": null,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "purchaseDate": "2026-10-01",
      "stockEffectiveAt": "2026-10-01T11:00:00",
      "purchaseCenterId": 101,
      "purchaseCenterName": null,
      "transactionType": 1,
      "transactionTypeName": "Purchase",
      "purchaseNo": 9002,
      "lineNo": 1,
      "documentState": 2,
      "documentStateName": "Finalized",
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "supplierInvoiceNo": null,
      "supplierInvoiceDate": null,
      "supplierVatNo": null,
      "receivingStoreId": 101,
      "receivingStoreName": null,
      "statisticalPeriodId": null,
      "statisticalPeriod": null,
      "shipmentNo": null,
      "currencyId": null,
      "currencyName": null,
      "currencySymbol": null,
      "exchangeRate": null,
      "costRate": null,
      "itemId": "DEMO-SHIRT-M",
      "unit": 1,
      "quantity": 2,
      "unitPurchasePrice": null,
      "lineForeignAmount": null,
      "currentRetailPrice": 18,
      "netQuantity": 2,
      "foreignCostAmount": null,
      "localCostAmount": null,
      "landedCostAmount": null,
      "landedExpenseAmount": null,
      "documentForeignTotal": null,
      "documentDiscountEarned": null,
      "documentNetForeignAmount": null,
      "documentExpenses": null
    }
  ]
}

Alternative timestamp request (same row schema):

GET https://api.example.com/api/v1/companies/1/purchases?fromTimestamp=2026-10-01T00:00:00&toTimestamp=2026-10-02T00:00:00&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json

The response echoes fromTimestamp and toTimestamp; fromDate and toDate are null in this mode.

Response-row fields

FieldJSON typeNullableMeaning
purchaseDatestring (YYYY-MM-DD)YesPurchase Date in the source business record.
stockEffectiveAtstring (local date-time)YesRecorded stock-affecting timestamp for finalized purchases/returns, when available. Null for other states or when not yet recorded.
purchaseCenterIdinteger (int32)NoPurchase Center identifier in this company.
purchaseCenterNamestringYesPurchase Center Name.
transactionTypeinteger (int32)NoTransaction Type.
transactionTypeNamestringYesTransaction Type Name.
purchaseNointeger (int64)NoPurchase No; combine with company and document type/location for identity.
lineNointeger (int32)NoLine number within the document.
documentStateinteger (int32)NoPurchase state: 0 Open, 1 On Hold, 2 Finalized, 3 Deleted.
documentStateNamestringYesReadable purchase-state label corresponding to documentState.
supplierIdinteger (int32)NoSupplier identifier in this company.
supplierNamestringYesSupplier Name.
supplierInvoiceNostringYesSupplier Invoice No; combine with company and document type/location for identity.
supplierInvoiceDatestring (YYYY-MM-DD)YesSupplier Invoice Date in the source business record.
supplierVatNostringYesSupplier Vat No; combine with company and document type/location for identity.
receivingStoreIdinteger (int32)YesReceiving Store identifier in this company.
receivingStoreNamestringYesReceiving Store Name.
statisticalPeriodIdinteger (int32)YesStatistical Period identifier in this company.
statisticalPeriodstringYesStatistical Period.
shipmentNostringYesShipment No; combine with company and document type/location for identity.
currencyIdinteger (int32)YesCurrency identifier in this company.
currencyNamestringYesCurrency Name.
currencySymbolstringYesCurrency Symbol.
exchangeRatenumber (decimal)YesPurchase foreign-to-local currency conversion rate.
costRatenumber (decimal)YesLanded-cost conversion rate.
itemIdstringNoItem identifier in this company.
unitinteger (int32)YesUnit identifier.
quantitynumber (decimal)YesTransaction-line quantity before signed business interpretation.
unitPurchasePricenumber (decimal)YesUnit Purchase Price.
lineForeignAmountnumber (decimal)YesRaw purchase-line amount in document currency.
currentRetailPricenumber (decimal)YesCurrent Retail Price.
netQuantitynumber (decimal)YesSigned business quantity; sales merchandise returns and purchase returns reverse sign. See Data Semantics.
foreignCostAmountnumber (decimal)YesSigned purchase-line amount in foreign currency.
localCostAmountnumber (decimal)YesSigned line amount × exchangeRate.
landedCostAmountnumber (decimal)YesSigned line amount × costRate.
landedExpenseAmountnumber (decimal)YesLanded cost minus local cost.
documentForeignTotalnumber (decimal)YesWhole purchase-document foreign total, repeated on its rows.
documentDiscountEarnednumber (decimal)YesRepeated document discount; not allocated to line acquisition cost.
documentNetForeignAmountnumber (decimal)YesWhole purchase-document net foreign amount, repeated on its rows.
documentExpensesnumber (decimal)YesWhole purchase-document expenses, repeated on its rows.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate/toDate and fromTimestamp/toTimestamp echo the accepted bounds; the unused pair is null. The other listed envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_transaction_type: use 1 Purchase or 2 Purchase Return. 400 invalid_document_state: use 0 Open, 1 On Hold, 2 Finalized or 3 Deleted. 400 date_range_required or invalid_date_range: supply valid inclusive date bounds in date mode. 400 invalid_timestamp_range: supply a valid local timestamp pair without date filters. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Reconcile purchase and purchase-return line quantities and permitted acquisition values. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Stock Transfers

Track item movements between stores and reconcile each side of a transfer.

GET /api/v1/companies/{companyId}/transfers

Required scope: transfers.read. Company and policy: Only rows for contract-authorized suppliers are returned. Either the source or destination store must be authorized.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
fromStoreIdinteger (int32)Optional; omitted means no additional filter.
toStoreIdinteger (int32)Optional; omitted means no additional filter.
transferNointeger (int64)Optional; omitted means no additional filter.
lineNointeger (int32)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.
statisticalPeriodIdinteger (int32)Optional; omitted means no additional filter.
supplierIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: transferDate, transferTime (source ordering value), fromStoreId, transferNo, lineNo. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering includes both endpoints of the business date interval.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, transferCostAmount. For every external ordinary client, even with financial permission, documentTotalQty, documentTotalRetail, documentTotalCost are null because visible lines may not represent a whole document. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/transfers?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "transferDate": "2026-10-01",
      "transferTimestamp": "2026-10-01T10:00:00",
      "transactionType": 81,
      "transactionTypeName": null,
      "fromStoreId": 101,
      "fromStoreName": null,
      "toStoreId": 102,
      "toStoreName": null,
      "transferNo": 9003,
      "lineNo": 1,
      "itemId": "DEMO-SHIRT-M",
      "unit": 1,
      "statisticalPeriodId": null,
      "statisticalPeriod": null,
      "supplierId": 7,
      "transferQty": 2,
      "sourceMovementQty": -2,
      "destinationMovementQty": 2,
      "unitCost": null,
      "transferCostAmount": null,
      "currentRetailPrice": 18,
      "transferRetailAmount": 36,
      "documentTotalQty": null,
      "documentTotalCost": null,
      "documentTotalRetail": null,
      "notes": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
transferDatestring (YYYY-MM-DD)YesTransfer Date in the source business record.
transferTimestampstring (ISO date-time)YesTransfer Timestamp in the source business record.
transactionTypeinteger (int32)NoTransaction Type.
transactionTypeNamestringYesTransaction Type Name.
fromStoreIdinteger (int32)NoFrom Store identifier in this company.
fromStoreNamestringYesFrom Store Name.
toStoreIdinteger (int32)YesTo Store identifier in this company.
toStoreNamestringYesTo Store Name.
transferNointeger (int64)NoTransfer No; combine with company and document type/location for identity.
lineNointeger (int32)NoLine number within the document.
itemIdstringNoItem identifier in this company.
unitinteger (int32)YesUnit identifier.
statisticalPeriodIdinteger (int32)YesStatistical Period identifier in this company.
statisticalPeriodstringYesStatistical Period.
supplierIdinteger (int32)YesSupplier identifier in this company.
transferQtynumber (decimal)YesTransfer Qty.
sourceMovementQtynumber (decimal)YesTransfer quantity negated for the source store.
destinationMovementQtynumber (decimal)YesTransfer quantity for the destination store.
unitCostnumber (decimal)YesUnit Cost.
transferCostAmountnumber (decimal)YesTransfer Cost Amount.
currentRetailPricenumber (decimal)YesCurrent Retail Price.
transferRetailAmountnumber (decimal)YesTransfer Retail Amount.
documentTotalQtynumber (decimal)YesWhole-document quantity; null for external ordinary contracts.
documentTotalCostnumber (decimal)YesWhole-document cost; null for external ordinary contracts.
documentTotalRetailnumber (decimal)YesWhole-document retail total; null for external ordinary contracts.
notesstringYesNotes.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Track item movements between stores and reconcile each side of a transfer. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Stock Adjustments

Import signed stock adjustment lines for inventory reconciliation.

GET /api/v1/companies/{companyId}/stock-adjustments

Required scope: adjustments.read. Company and policy: Only rows for contract-authorized suppliers are returned. Store selection is an optional request filter.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
storeIdinteger (int32)Optional; omitted means no additional filter.
adjustmentNointeger (int64)Optional; omitted means no additional filter.
lineNointeger (int32)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: adjustmentDate, adjustmentTimestamp, storeId, adjustmentNo, lineNo. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering includes both endpoints of the business date interval.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, costAmount. For every external ordinary client, even with financial permission, documentTotalQty, documentTotalRetail, documentTotalCost are null because visible lines may not represent a whole document. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/stock-adjustments?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "adjustmentDate": "2026-10-01",
      "adjustmentTimestamp": "2026-10-01T10:00:00",
      "storeId": 101,
      "storeName": "Example Store",
      "adjustmentNo": 9004,
      "lineNo": 1,
      "itemId": "DEMO-SHIRT-M",
      "unit": 1,
      "adjustmentQty": 2,
      "unitCost": null,
      "unitRetailPrice": 18,
      "costAmount": null,
      "retailAmount": 36,
      "documentTotalQty": null,
      "documentTotalCost": null,
      "documentTotalRetail": null,
      "notes": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
adjustmentDatestring (YYYY-MM-DD)YesAdjustment Date in the source business record.
adjustmentTimestampstring (ISO date-time)YesAdjustment Timestamp in the source business record.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.
adjustmentNointeger (int64)NoAdjustment No; combine with company and document type/location for identity.
lineNointeger (int32)NoLine number within the document.
itemIdstringNoItem identifier in this company.
unitinteger (int32)YesUnit identifier.
adjustmentQtynumber (decimal)YesAdjustment Qty.
unitCostnumber (decimal)YesUnit Cost.
unitRetailPricenumber (decimal)YesUnit Retail Price.
costAmountnumber (decimal)YesCost Amount.
retailAmountnumber (decimal)YesRetail Amount.
documentTotalQtynumber (decimal)YesWhole-document quantity; null for external ordinary contracts.
documentTotalCostnumber (decimal)YesWhole-document cost; null for external ordinary contracts.
documentTotalRetailnumber (decimal)YesWhole-document retail total; null for external ordinary contracts.
notesstringYesNotes.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Import signed stock adjustment lines for inventory reconciliation. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Stock Depreciations

Read stock write-off lines for inventory loss reporting.

GET /api/v1/companies/{companyId}/stock-depreciations

Required scope: adjustments.read. Company and policy: Only rows for contract-authorized suppliers are returned. Store selection is an optional request filter.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
storeIdinteger (int32)Optional; omitted means no additional filter.
depreciationNointeger (int64)Optional; omitted means no additional filter.
lineNointeger (int32)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: depreciationDate, depreciationTimestamp, storeId, depreciationNo, lineNo. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering includes both endpoints of the business date interval.

Financial and visibility rules

Without financial-data permission, these fields are null: unitCost, costAmount. For every external ordinary client, even with financial permission, documentTotalQty, documentTotalCost are null because visible lines may not represent a whole document. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/stock-depreciations?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "depreciationDate": "2026-10-01",
      "depreciationTimestamp": "2026-10-01T10:00:00",
      "storeId": 101,
      "storeName": "Example Store",
      "depreciationNo": 9005,
      "lineNo": 1,
      "itemId": "DEMO-SHIRT-M",
      "unit": 1,
      "quantity": 2,
      "unitCost": null,
      "stockMovementQty": -2,
      "costAmount": null,
      "documentTotalQty": null,
      "documentTotalCost": null,
      "notes": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
depreciationDatestring (YYYY-MM-DD)YesDepreciation Date in the source business record.
depreciationTimestampstring (ISO date-time)YesDepreciation Timestamp in the source business record.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.
depreciationNointeger (int64)NoDepreciation No; combine with company and document type/location for identity.
lineNointeger (int32)NoLine number within the document.
itemIdstringNoItem identifier in this company.
unitinteger (int32)YesUnit identifier.
quantitynumber (decimal)YesTransaction-line quantity before signed business interpretation.
unitCostnumber (decimal)YesUnit Cost.
stockMovementQtynumber (decimal)YesDepreciation quantity negated for stock movement.
costAmountnumber (decimal)YesCost Amount.
documentTotalQtynumber (decimal)YesWhole-document quantity; null for external ordinary contracts.
documentTotalCostnumber (decimal)YesWhole-document cost; null for external ordinary contracts.
notesstringYesNotes.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Read stock write-off lines for inventory loss reporting. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Markdowns

Inspect temporary item retail-price reductions overlapping a reporting period.

GET /api/v1/companies/{companyId}/markdowns

Required scope: promotions.read. Company and policy: Only rows for contract-authorized suppliers are returned.

Query parameters

ParameterTypeRequirement / default / allowed values
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
markdownIdinteger (int32)Optional; omitted means no additional filter.
statisticalPeriodIdinteger (int32)Optional; omitted means no additional filter.
itemIdstringOptional; omitted means no additional filter.
returnToFullPricebooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: startDate, markdownId, itemId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering selects definitions whose startDate ≤ toDate and endDate ≥ fromDate (overlap).

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/markdowns?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "markdownId": 1,
      "markdownName": null,
      "statisticalPeriodId": null,
      "statisticalPeriod": null,
      "startDate": "2026-10-01",
      "endDate": "2026-10-31",
      "returnToFullPrice": false,
      "itemId": "DEMO-SHIRT-M",
      "originalPrice": 20,
      "markdownPrice": 18,
      "markdownAmount": 2,
      "markdownPercent": 10
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
markdownIdinteger (int32)NoMarkdown identifier in this company.
markdownNamestringYesMarkdown Name.
statisticalPeriodIdinteger (int32)YesStatistical Period identifier in this company.
statisticalPeriodstringYesStatistical Period.
startDatestring (YYYY-MM-DD)YesStart Date in the source business record.
endDatestring (YYYY-MM-DD)YesEnd Date in the source business record.
returnToFullPricebooleanNoWhether the markdown configuration restores full price.
itemIdstringNoItem identifier in this company.
originalPricenumber (decimal)YesOriginal Price.
markdownPricenumber (decimal)YesMarkdown Price.
markdownAmountnumber (decimal)YesOriginal price minus markdown price.
markdownPercentnumber (decimal)Yes(1 − markdownPrice / originalPrice) × 100; null when original price is missing or zero.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Inspect temporary item retail-price reductions overlapping a reporting period. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotions

Find applicable promotion definitions, then retrieve their related stores, items and tiers.

GET /api/v1/companies/{companyId}/promotions

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized.

Query parameters

ParameterTypeRequirement / default / allowed values
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
promotionIdinteger (int32)Optional; omitted means no additional filter.
promotionTypestringOptional; BUY_GET, BUNDLE, DISCOUNT, INVOICE_DISCOUNT, SPECIAL_PRICE, STEP_DISCOUNT, STEP_BUY_GET, CASH_BACK; case-insensitive.
allStoresbooleanOptional; omitted means no additional filter.
allClientCategoriesbooleanOptional; omitted means no additional filter.
allItemsbooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: startDate, promotionId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering selects definitions whose startDate ≤ toDate and endDate ≥ fromDate (overlap).

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 10,
      "promotionName": "Example October Discount",
      "promotionType": "DISCOUNT",
      "startDate": "2026-10-01",
      "endDate": "2026-10-31",
      "buyQty": null,
      "getValue": 10,
      "listBQty": null,
      "isDiscount": true,
      "isStepDiscount": false,
      "isSpecialPrice": false,
      "isBundle": false,
      "isInvoiceDiscount": false,
      "fullPriceOnly": false,
      "overrideLowerDiscount": false,
      "removeClientDiscount": false,
      "minimumTotalExcess": null,
      "roundTotal": null,
      "stepAsBuyGet": false,
      "getOnAny": false,
      "allStores": false,
      "allClientCategories": false,
      "allItems": false,
      "isCashBack": false,
      "cashBackIsPercent": false,
      "cashBackAllStores": false,
      "cashBackApplyOnCurrentReceipt": false,
      "cashBackStepOnAmount": false,
      "cashBackExpiryDate": null,
      "cashBackExpiryAfterDays": null,
      "cashBackTerms": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
promotionNamestringYesPromotion Name.
promotionTypestringNoBUY_GET, BUNDLE, DISCOUNT, INVOICE_DISCOUNT, SPECIAL_PRICE, STEP_DISCOUNT, STEP_BUY_GET or CASH_BACK.
startDatestring (YYYY-MM-DD)YesStart Date in the source business record.
endDatestring (YYYY-MM-DD)YesEnd Date in the source business record.
buyQtyinteger (int32)YesConfigured qualifying quantity for Buy/Get or step rules.
getValuenumber (decimal)YesConfigured reward value; interpret using promotionType and its rule flags.
listBQtyinteger (int32)YesConfigured reward-list quantity.
isDiscountbooleanNoTrue when the promotion uses the discount flag.
isStepDiscountbooleanNoTrue when the promotion uses stepped rewards.
isSpecialPricebooleanNoTrue when the promotion uses special-price rules.
isBundlebooleanNoTrue when the promotion is a bundle offer.
isInvoiceDiscountbooleanNoTrue when the discount applies to invoice total.
fullPriceOnlybooleanNoTrue when eligibility is limited to full-price items.
overrideLowerDiscountbooleanNoTrue when configured to override a lower discount.
removeClientDiscountbooleanNoTrue when the offer removes the customer discount.
minimumTotalExcessnumber (decimal)YesConfigured minimum excess-total condition for the offer.
roundTotalnumber (decimal)YesConfigured promotion total-rounding value.
stepAsBuyGetbooleanNoTrue when step rewards use Buy/Get behavior.
getOnAnybooleanNoConfigured Get On Any reward-item option.
allStoresbooleanNoTrue when the definition applies to all stores; returned data still follows authorization.
allClientCategoriesbooleanNoTrue when customer category is unrestricted by this promotion.
allItemsbooleanNoTrue when promotion item eligibility is not limited to its item list.
isCashBackbooleanNoTrue for promotional cashback.
cashBackIsPercentbooleanNoTrue when cashback reward values are percentages.
cashBackAllStoresbooleanNoTrue when cashback-store applicability is unrestricted by the offer.
cashBackApplyOnCurrentReceiptbooleanNoTrue when cashback applies to the current receipt.
cashBackStepOnAmountbooleanNoTrue when cashback uses amount thresholds.
cashBackExpiryDatestring (YYYY-MM-DD)YesConfigured fixed cashback expiry date.
cashBackExpiryAfterDaysinteger (int32)YesConfigured cashback validity in days.
cashBackTermsstringYesCustomer-facing cashback terms.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion_type: choose one of the eight documented values. 400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Find applicable promotion definitions, then retrieve their related stores, items and tiers. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotion Stores

Resolve the store list attached to a promotion.

GET /api/v1/companies/{companyId}/promotions/{promotionId}/stores

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized. Returned stores must be authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
storeIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: storeId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions/10/stores?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "promotionId": 10,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 10,
      "storeId": 101,
      "storeName": "Example Store"
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. promotionId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve the store list attached to a promotion. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotion Items

Resolve qualifying and reward items or item-specific special prices.

GET /api/v1/companies/{companyId}/promotions/{promotionId}/items

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized. Both qualifying and nonnull reward-item suppliers must be authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
itemIdstringOptional; omitted means no additional filter.
rewardItemIdstringOptional; omitted means no additional filter.
hasSpecialPricebooleanOptional; true selects nonnull special prices; false selects null special prices.

Ordering, filtering and pagination

Order: itemId, rewardItemId (nulls last), specialPrice (nulls last). Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions/10/items?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "promotionId": 10,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 10,
      "itemId": "DEMO-SHIRT-M",
      "rewardItemId": null,
      "specialPrice": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
itemIdstringNoItem identifier in this company.
rewardItemIdstringYesReward Item identifier in this company.
specialPricenumber (decimal)YesSpecial Price.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. promotionId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve qualifying and reward items or item-specific special prices. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotion Client Categories

Resolve the customer-category eligibility attached to a promotion.

GET /api/v1/companies/{companyId}/promotions/{promotionId}/client-categories

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
clientCategoryIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: clientCategoryId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions/10/client-categories?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "promotionId": 10,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 10,
      "clientCategoryId": 3,
      "clientCategoryName": null
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
clientCategoryIdinteger (int32)NoClient Category identifier in this company.
clientCategoryNamestringYesClient Category Name.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. promotionId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve the customer-category eligibility attached to a promotion. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotion Tiers

Read amount thresholds and rewards for tier-based promotion interpretation.

GET /api/v1/companies/{companyId}/promotions/{promotionId}/tiers

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: amountThreshold. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions/12/tiers?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "promotionId": 12,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 12,
      "amountThreshold": 50,
      "rewardValue": 5
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
amountThresholdnumber (decimal)YesConfigured amount threshold for this promotion tier.
rewardValuenumber (decimal)YesConfigured reward at amountThreshold; interpret in the promotion’s units.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. promotionId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Read amount thresholds and rewards for tier-based promotion interpretation. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Promotion Cashback Stores

Resolve stores associated with a promotion’s cashback rules.

GET /api/v1/companies/{companyId}/promotions/{promotionId}/cashback-stores

Required scope: promotions.read. Company and policy: The promotion must qualify through an authorized store (or all-stores/cashback-all-stores eligibility). Item eligibility requires all-items applicability or at least one qualifying item row whose supplier is authorized and whose optional reward-item supplier is also authorized. Returned stores must be authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
storeIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: storeId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/promotions/12/cashback-stores?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "promotionId": 12,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "promotionId": 12,
      "storeId": 101,
      "storeName": "Example Store"
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
promotionIdinteger (int32)NoPromotion identifier in this company.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. promotionId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_promotion: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve stores associated with a promotion’s cashback rules. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Discount Coupon Events

Read coupon campaign metadata and restrictions without exposing coupon codes.

GET /api/v1/companies/{companyId}/discount-coupon-events

Required scope: promotions.read. Company and policy: An event must apply to all stores or have at least one authorized store.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
couponEventIdinteger (int32)Optional; omitted means no additional filter.
expiryFromstring (YYYY-MM-DD)Optional inclusive expiry bound; if both supplied expiryFrom ≤ expiryTo.
expiryTostring (YYYY-MM-DD)Optional inclusive expiry bound; if both supplied expiryFrom ≤ expiryTo.
isSingleCodebooleanOptional; omitted means no additional filter.
applyOnDiscountedItemsbooleanOptional; omitted means no additional filter.
requiresStarCardbooleanOptional; omitted means no additional filter.
allStoresbooleanOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: expiryDate descending, couponEventId descending. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/discount-coupon-events?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "couponEventId": 20,
      "eventName": null,
      "eventNotes": null,
      "isSingleCode": false,
      "couponCount": 100,
      "discountPercent": 10,
      "expiryDate": "2026-10-31",
      "applyOnDiscountedItems": false,
      "requiresStarCard": false,
      "allStores": true
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
couponEventIdinteger (int32)NoCoupon Event identifier in this company.
eventNamestringYesEvent Name.
eventNotesstringYesEvent Notes.
isSingleCodebooleanNoTrue for a coupon event using a shared code.
couponCountinteger (int32)YesConfigured coupon count.
discountPercentnumber (decimal)YesPercentage points (10 means 10%).
expiryDatestring (YYYY-MM-DD)YesExpiry Date in the source business record.
applyOnDiscountedItemsbooleanNoTrue when the coupon permits already-discounted items.
requiresStarCardbooleanNoTrue when the coupon requires a Star Card.
allStoresbooleanNoTrue when the definition applies to all stores; returned data still follows authorization.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_expiry_range: correct the expiry bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Read coupon campaign metadata and restrictions without exposing coupon codes. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Discount Coupon Event Stores

Resolve eligible stores for a coupon event.

GET /api/v1/companies/{companyId}/discount-coupon-events/{couponEventId}/stores

Required scope: promotions.read. Company and policy: The event must qualify for the contract; returned store rows must also be authorized.

The parent path ID is a positive int32. An empty result means no matching authorized relationship rows; it is not a parent-existence check.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
storeIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: storeId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/discount-coupon-events/20/stores?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "couponEventId": 20,
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "couponEventId": 20,
      "storeId": 101,
      "storeName": "Example Store"
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
couponEventIdinteger (int32)NoCoupon Event identifier in this company.
storeIdinteger (int32)NoStore identifier in this company.
storeNamestringYesStore Name.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. couponEventId is the requested positive integer. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_coupon_event: use a positive parent ID. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Resolve eligible stores for a coupon event. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Customers Catalog

Build an approved full customer mirror before applying Customer Delta.

GET /api/v1/companies/{companyId}/customers

Required scope: customers.read. Company and policy: A configured ordinary company contract is required; customer rows are company-wide, without supplier/store row filtering. Protect all returned personal data.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: id. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/customers?page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "id": 10001,
      "firstName": "Example",
      "lastName": null,
      "gender": null,
      "dateOfBirth": null,
      "phone": "+00000000000",
      "email": null,
      "nationality": null,
      "city": null,
      "starRewardsRegistered": true,
      "customerCategory": null,
      "discountPercent": 10
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
idinteger (int64)NoLoyalty customer identifier; not the ERP customer ID.
firstNamestringNoFirst Name.
lastNamestringYesLast Name.
genderstringYesGender.
dateOfBirthstring (YYYY-MM-DD)YesDate Of Birth in the source business record.
phonestringNoRecorded contact phone, including the country code when available.
emailstringYesEmail.
nationalitystringYesNationality.
citystringYesCity.
starRewardsRegisteredbooleanNoWhether the loyalty customer is registered for Star Rewards.
customerCategorystringYesERP category enrichment only when exactly one active telephone match exists.
discountPercentinteger (int32)YesPercentage points (10 means 10%).

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Build an approved full customer mirror before applying Customer Delta. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Customer Delta

Keep an approved customer mirror current after a full synchronization.

GET /api/v1/companies/{companyId}/customers/changes

Required scope: customers.read. Company and policy: A configured ordinary company contract is required; customer rows are company-wide, without supplier/store row filtering. Protect all returned personal data.

Query parameters

ParameterTypeRequirement / default / allowed values
sincestring (ISO date-time with offset)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
throughstring (ISO date-time with offset)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
afterCustomerIdinteger (int64)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
revisioninteger (int64)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: id. Uses keyset pagination; no page-number or total-page fields. Keep the server’s fixed window while reading subsequent pages.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/customers/changes?pageSize=200 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",
  "revision": 4,
  "count": 0,
  "data": []
}

After a completed full export, a completed incremental page has this different envelope. Use actual baseline/version values returned by your server.

{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "revision": 4,
  "count": 1,
  "hasMore": false,
  "nextAfterCustomerId": null,
  "nextSince": "2026-10-01T10:05:00+00:00",
  "data": [
    {
      "id": 10001,
      "firstName": "Example",
      "lastName": null,
      "gender": null,
      "dateOfBirth": null,
      "phone": "+00000000000",
      "email": null,
      "nationality": null,
      "city": null,
      "starRewardsRegistered": true,
      "customerCategory": null,
      "discountPercent": 10
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
idinteger (int64)NoLoyalty customer identifier; not the ERP customer ID.
firstNamestringNoFirst Name.
lastNamestringYesLast Name.
genderstringYesGender.
dateOfBirthstring (YYYY-MM-DD)YesDate Of Birth in the source business record.
phonestringNoRecorded contact phone, including the country code when available.
emailstringYesEmail.
nationalitystringYesNationality.
citystringYesCity.
starRewardsRegisteredbooleanNoWhether the loyalty customer is registered for Star Rewards.
customerCategorystringYesERP category enrichment only when exactly one active telephone match exists.
discountPercentinteger (int32)YesPercentage points (10 means 10%).

Envelope fields: see the full-sync and cursor contract; row fields above apply to incremental data.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

HTTP 200 with fullSyncRequired=true is a full rebuild instruction, not an empty completed Delta. Follow the synchronization sequence.

400 delta_revision_required, incomplete_delta_cursor, invalid_delta_cursor or invalid_delta_window: preserve the last valid window and use server-provided revision/cursors. 503 customer_delta_not_installed: ask the administrator to resolve availability.

Integration scenario

Hypothetical example: Keep an approved customer mirror current after a full synchronization. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It applies each current row as an idempotent replacement and saves the final nextSince only after all pages succeed.

Footfall

Compare hourly aggregated traffic with store sales, without identifying visitors.

GET /api/v1/companies/{companyId}/footfall

Required scope: footfall.read. Company and policy: Only rows for contract-authorized stores are returned. Supplier restrictions and financial masking do not alter these aggregate counts.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
fromDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
toDatestring (YYYY-MM-DD)Required; inclusive date bounds, fromDate ≤ toDate.
storeIdinteger (int32)Optional; omitted means no additional filter.

Ordering, filtering and pagination

Order: countDate, storeId, countHour. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Date filtering includes both endpoints of the business date interval.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/footfall?fromDate=2026-10-01&toDate=2026-10-01&page=1&pageSize=200 HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "companyName": "Example Company",
  "fromDate": "2026-10-01",
  "toDate": "2026-10-01",
  "page": 1,
  "pageSize": 200,
  "count": 1,
  "totalCount": 1,
  "totalPages": 1,
  "data": [
    {
      "storeId": 101,
      "countDate": "2026-10-01",
      "countHour": 10,
      "peopleCount": 42
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
storeIdinteger (int32)NoStore identifier in this company.
countDatestring (YYYY-MM-DD)NoCount Date in the source business record.
countHourinteger (int32)NoHour bucket of the store’s count date (0–23).
peopleCountinteger (int32)NoAggregated number of people counted in this hour; not a customer identifier.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. fromDate and toDate are the accepted YYYY-MM-DD bounds. These envelope fields are nonnullable.

Errors and safe recovery

401: correct the authorized key; 403: ask the administrator to verify scope and company contract; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

503 footfall_view_not_installed: ask the administrator to restore company availability, then repeat the same request. Hourly counts are aggregated traffic; they contain no customer identity and cannot be joined to an individual shopper.

400 date_range_required or invalid_date_range: supply both valid inclusive bounds. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Compare hourly aggregated traffic with store sales, without identifying visitors. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Partner Data Items Catalog

Build a partner product and available-stock catalog.

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

Required scope: partner-data.read. Company and policy: Requires an active, separate Partner Data policy for this client and company. Policy suppliers, selected items, selected stock stores, quantity reductions and discount ceiling apply. Ordinary contract permissions do not replace this policy.

Query parameters

ParameterTypeRequirement / default / allowed values
pageinteger (int32)Optional; default 1, minimum 1. Offset = (page − 1) × pageSize.
pageSizeinteger (int32)Optional; default 200; 1–1000.
itemIdstringOptional; omitted means no additional filter.
barcodestringOptional; omitted means no additional filter.
stylestringOptional; omitted means no additional filter.

Ordering, filtering and pagination

Order: itemId. Use page and pageSize; count is the current page length and totalCount is the filtered authorized row count. Separate page requests are not one frozen export snapshot.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

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

Response-row fields

FieldJSON typeNullableMeaning
itemIdstringNoItem identifier in this company.
barcodestringYesPrimary item barcode, where recorded.
itemNamestringYesItem Name.
itemNameArstringYesItem Name Ar.
stylestringYesStyle.
colorCodestringYesColor Code.
colorNamestringYesColor Name.
sizestringYesSize.
supplierIdinteger (int32)NoSupplier identifier in this company.
supplierNamestringYesSupplier Name.
originalPricenumber (decimal)NoOriginal Price.
currentPricenumber (decimal)NoCurrent Price.
discountPercentnumber (decimal)NoPercentage points (10 means 10%).
availableQtynumber (decimal)NoCurrent authorized availability after store aggregation, one item reduction, a zero floor and discount-ceiling rules; not a movement delta.

Envelope fields: companyId (integer), companyCode and companyName (strings) identify the authorized company; count (integer) is this response’s row count; data is the row array. page and pageSize are integers; totalCount and totalPages are int64 integers, with totalPages zero for an empty result. currencyCode is the company currency string. These envelope fields are nonnullable.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and Partner Data policy; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

403 partner_data_policy_not_available: ask the administrator to check the active policy. 400 invalid_page or invalid_page_size: page must be ≥1 and pageSize 1–1000.

Integration scenario

Hypothetical example: Build a partner product and available-stock catalog. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It retrieves every remaining page before treating the export as complete.

Partner Data Item Changes / Stock Delta

Refresh partner item price and available-stock snapshots after the initial catalog export.

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

Required scope: partner-data.read. Company and policy: Requires the same active Partner Data policy as the catalog. Preserve policyVersion and honor fullSyncRequired; no ordinary financial-data grant broadens this payload.

Query parameters

ParameterTypeRequirement / default / allowed values
sincestring (ISO date-time with offset)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
throughstring (ISO date-time with offset)Optional for initial handshake; continuation rules below are mandatory once synchronizing.
afterItemIdstringOptional for initial handshake; continuation rules below are mandatory once synchronizing.
policyVersionstringOptional for initial handshake; continuation rules below are mandatory once synchronizing.
pageSizeinteger (int32)Optional; default 200; 1–1000.

Ordering, filtering and pagination

Order: itemId. Uses keyset pagination; no page-number or total-page fields. Keep the server’s fixed window while reading subsequent pages.

Financial and visibility rules

This response has no additional ordinary financial mask. The company and policy rules above apply before pagination.

Complete request and representative response

GET https://api.example.com/api/v1/companies/1/partner-data/items/changes?pageSize=200 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_SERVER_VERSION",
  "count": 0,
  "data": []
}

After a completed full export, a completed incremental page has this different envelope. Use actual baseline/version values returned by your server.

{
  "companyId": 1,
  "companyCode": "EXAMPLE",
  "currencyCode": "KWD",
  "fullSyncRequired": false,
  "since": "2026-10-01T10:00:00+00:00",
  "through": "2026-10-01T10:05:00+00:00",
  "policyVersion": "EXAMPLE_SERVER_VERSION",
  "count": 1,
  "hasMore": false,
  "nextAfterItemId": null,
  "nextSince": "2026-10-01T10:05:00+00:00",
  "data": [
    {
      "itemId": "DEMO-SHIRT-M",
      "barcode": "DEMO000001",
      "itemName": "Example shirt",
      "itemNameAr": null,
      "style": "DEMO-SHIRT",
      "colorCode": null,
      "colorName": null,
      "size": "M",
      "supplierId": 7,
      "supplierName": "Example Supplier",
      "originalPrice": 20,
      "currentPrice": 18,
      "discountPercent": 10,
      "availableQty": 7
    }
  ]
}

Response-row fields

FieldJSON typeNullableMeaning
itemIdstringNoItem identifier in this company.
barcodestringYesPrimary item barcode, where recorded.
itemNamestringYesItem Name.
itemNameArstringYesItem Name Ar.
stylestringYesStyle.
colorCodestringYesColor Code.
colorNamestringYesColor Name.
sizestringYesSize.
supplierIdinteger (int32)NoSupplier identifier in this company.
supplierNamestringYesSupplier Name.
originalPricenumber (decimal)NoOriginal Price.
currentPricenumber (decimal)NoCurrent Price.
discountPercentnumber (decimal)NoPercentage points (10 means 10%).
availableQtynumber (decimal)NoCurrent authorized availability after store aggregation, one item reduction, a zero floor and discount-ceiling rules; not a movement delta.

Envelope fields: see the full-sync and cursor contract; row fields above apply to incremental data.

Errors and safe 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.

401: correct the authorized key; 403: ask the administrator to verify scope and Partner Data policy; 404: verify company access; 400: correct query types, range or cursor; 429: wait for Retry-After. On a server/network failure, retain the last fully applied page or cursor and retry with bounded backoff. Do not broaden scopes or advance past unapplied data. See error codes and recovery.

HTTP 200 with fullSyncRequired=true is a full rebuild instruction, not an empty completed Delta. Follow the synchronization sequence.

403 partner_data_policy_not_available; 400 incomplete_delta_cursor or invalid_delta_window; 503 partner_delta_contract_unavailable. Keep the saved cursor and follow the Partner Data recovery guide.

Integration scenario

Hypothetical example: Refresh partner item price and available-stock snapshots after the initial catalog export. A company-1 integration first checks its permitted scope and contract, reads the matching resource using the request above, and stores rows with companyId as part of its key. It applies each current row as an idempotent replacement and saves the final nextSince only after all pages succeed.