Examples & Downloads
Practical examples for common clients plus complete request collections for Business API v1.
curl
curl "https://api.example.com/api/v1/companies/1/inventory?nonZeroOnly=true&page=1&pageSize=200" -H "X-IMS-API-Key: YOUR_API_KEY" -H "Accept: application/json"
PowerShell
$headers = @{ "X-IMS-API-Key" = "YOUR_API_KEY" }
$uri = "https://api.example.com/api/v1/companies/1/sales?fromDate=2026-09-01&toDate=2026-09-30&page=1&pageSize=200"
$response = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers
C# HttpClient
using var http = new HttpClient();
http.BaseAddress = new Uri("https://api.example.com/");
http.DefaultRequestHeaders.Add("X-IMS-API-Key", "YOUR_API_KEY");
var response = await http.GetAsync(
"api/v1/companies/1/sales?fromDate=2026-09-01&toDate=2026-09-30&page=1&pageSize=200");
response.EnsureSuccessStatusCode();
string json = await response.Content.ReadAsStringAsync();
Customers: monthly full-catalog export
These examples use synthetic placeholders and fictional response values. Replace the host, company ID and API key with approved values. The key needs customers.read. The monthly schedule belongs to your integration. Retrieve every page for a full export. For incremental synchronization, follow Customer Delta; the full-catalog route has no date filters or push delivery.
curl
curl "https://api.example.com/api/v1/companies/1/customers?page=1&pageSize=200" \
-H "X-IMS-API-Key: YOUR_API_KEY" \
-H "Accept: application/json"
PowerShell: collect all pages before reconciliation
$baseUrl = "https://api.example.com"
$companyId = 1
$headers = @{ "X-IMS-API-Key" = "YOUR_API_KEY"; "Accept" = "application/json" }
$page = 1
$customers = [System.Collections.Generic.List[object]]::new()
do {
$uri = "$baseUrl/api/v1/companies/$companyId/customers?page=$page&pageSize=200"
$response = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -ErrorAction Stop
foreach ($customer in $response.data) { $customers.Add($customer) }
$page++
} while ($page -le $response.totalPages)
# Reconcile only after the entire download succeeds.
# Each request has its own snapshot; this is not an export-wide snapshot.
# Do not log or publish customer payloads or API keys.
HTTP request
GET /api/v1/companies/1/customers?page=1&pageSize=200 HTTP/1.1
Host: api.example.com
X-IMS-API-Key: YOUR_API_KEY
Accept: application/json
Synthetic response
Both rows below contain all twelve fields. The first has missing enrichment; the second illustrates a real zero discount. Preserve this distinction.
{
"companyId": 1,
"companyCode": "EXAMPLE",
"companyName": "Example Company",
"page": 1,
"pageSize": 200,
"count": 2,
"totalCount": 2,
"totalPages": 1,
"data": [
{
"id": 10001,
"firstName": "Example",
"lastName": "Customer",
"gender": null,
"dateOfBirth": null,
"phone": "00000000001",
"email": "customer@example.invalid",
"nationality": null,
"city": null,
"starRewardsRegistered": true,
"customerCategory": null,
"discountPercent": null
},
{
"id": 10002,
"firstName": "Sample",
"lastName": "Customer",
"gender": null,
"dateOfBirth": null,
"phone": "00000000002",
"email": null,
"nationality": null,
"city": null,
"starRewardsRegistered": true,
"customerCategory": "Example category",
"discountPercent": 0
}
]
}id identifies the loyalty customer, not an ERP customer. See identity, matching and export consistency.
Transaction timestamp requests
Use either date filters or local timestamp filters. The timestamp end is exclusive; these are not change-tracking windows.
Sales
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
Purchases
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
Inventory movements
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/jsonPurchase and movement rows include nullable stockEffectiveAt; see data semantics.
Ordinary Delta examples
GET https://api.example.com/api/v1/companies/1/items/changes HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/json
GET https://api.example.com/api/v1/companies/1/inventory/changes HTTP/1.1
X-IMS-API-Key: YOUR_AUTHORIZED_TEST_API_KEY
Accept: application/jsonCapture each endpoint's returned baselineSince and policyVersion, perform the full ordinary export, then use the complete polling and continuation sequence. The HTTP and Postman downloads include placeholders for the returned values; set these locally, not to the example values. During company maintenance, follow 503 retry guidance.
Downloads
Examples for all 26 operations
The endpoint reference includes one complete request and response for each operation, plus both Delta envelope shapes. The HTTP collection and Postman collection cover the same 26 routes, plus alternative timestamp requests and ordinary Delta poll/continuation examples. The four Delta routes begin with the full-sync handshake. See Customer Delta for a multipage customer sequence and Partner Stock Delta for partner item continuation. See ordinary Delta examples for item and composite store/item continuation.