These APIs are part of a system for:
Additionally, an Exponential Backoff retry strategy is suggested for handling transient failures.
The system supports multiple ways to indicate the context under which you want to update EPC states:
X-REALM-SELECTED-URN header for context switching.tenant:brand:countrycode:external-store-number (e.g., gdynamite:grg:ca:ca0294).GET /userRealms to find or confirm the correct realmNetworkNamespace.X-EXTERNAL-STORE-ID header for context switching.US0001./userRealms.X-EXTERNAL-STORE-NUMBER header for context switching.0001./userRealms.Basic AuthenticationAuthorization: Basic <encoded-credentials>
where <encoded-credentials> is a Base64-encoded string of username:password.
Use the appropriate base URL depending on your environment:
https://qc-gdynamite.dev.kalama.cloud/gStore/api/v0.2
https://production-gdynamite.kalama.cloud/gStore/api/v0.2
Below are example workflows depending on which integration mechanism is used to set the context.
Key Points:
GET /userRealms is typically required./userRealms call) is needed.POST /epcs/states
Full URL (QA Example):
POST https://qc-gdynamite.dev.kalama.cloud/gStore/api/v0.2/epcs/states
This endpoint updates the state of one or more EPCs under the chosen context (realm-based or external store-based).
Depending on the integration method, one of these headers is used:
X-REALM-SELECTED-URN: <realmNetworkNamespace>
gdynamite:grg:ca:ca0294X-EXTERNAL-STORE-ID: <storeId>
US0001X-EXTERNAL-STORE-NUMBER: <storeNumber>
0001And in all cases:
Authorization: Basic <encoded-credentials>Content-Type: application/json
Sample Request Body:
[
{
"epcId": "30340c19e0286080178ffb02",
"state": "LOCKED",
"reasonShortText": "Damaged",
"updatedAt": "2024-04-23T18:25:43.511Z"
},
{
"epcId": "30340c19e0286080178ffb03",
"state": "FREE",
"reasonShortText": "Available",
"updatedAt": "2024-04-23T18:25:43.511Z"
}
]
| Field | Type | Description |
|---|---|---|
epcId |
string | Unique identifier for the EPC (e.g., 30340c19e0286080178ffb02). |
state |
string | New state for this EPC (e.g., LOCKED, FREE, etc.). |
reasonShortText |
string | Short explanation/reason for the state change (e.g., Damaged, Available). |
updatedAt |
string | ISO 8601 timestamp of when the EPC state was updated (e.g., 2024-04-23T18:25:43.511Z). |
This section applies only if you are using realm-based integration with X-REALM-SELECTED-URN.
GET /userRealms
Full URL (QA Example):
GET https://qc-gdynamite.dev.kalama.cloud/gStore/api/v0.2/userRealms
Retrieves a list of realms (store locations or other realm types) available to the authenticated user.
Authorization: Basic <encoded-credentials>Sample Response:
[
{
"realmNetworkNamespace": "gdynamite:grg:ca:ca0294",
"displayName": "Store#294 GRG | Yorkdale Shopping Centre Toronto On",
"description": "Store#294 GRG | Yorkdale Shopping Centre Toronto On",
"isSelected": false,
"formattedAddress": "3401 Dufferin Street, Yorkdale Shopping Centre, North York, ON, M6A 2T9, Canada",
"countryCode": "CA",
"brand": "Garage",
"type": "STORE",
"realmLineages": [],
"storeId": "CA0317",
"assignedPlaceRealms": []
}
]
| Field | Type | Description |
|---|---|---|
realmNetworkNamespace |
string | A URN-like identifier for the realm (e.g., gdynamite:grg:ca:ca0294). |
displayName |
string | A user-friendly name for the realm. |
description |
string | Descriptive text about the realm. |
isSelected |
boolean | Indicates if the realm is currently selected (if used in a UI context). |
formattedAddress |
string | Full address of the realm. |
countryCode |
string | Country code (e.g., CA). |
brand |
string | Brand name associated with this realm (e.g., Garage). |
type |
string | Type of realm (e.g., STORE). |
realmLineages |
array | Array of additional realm lineage details (if any). |
storeId |
string | Store's ID (e.g., CA0317). |
assignedPlaceRealms |
array | Array of realm objects assigned to this user, if applicable. |
For transient errors (e.g., network timeouts, 5xx responses), use an Exponential Backoff strategy. A common formula is:
RetryInterval = FixedDelay + (BackOffMultiplier * 2^(RetryCount))
Suppose we want to allow retries for up to ~1 hour. Let’s set:
FixedDelay = 30 secondsBackOffMultiplier = 15 seconds| Retry Attempt | Formula | Interval (seconds) | Cumulative Wait (approx.) |
|---|---|---|---|
| 1 | 30 + (15 * 2^1) = 30 + 30 |
60 | 1 minute |
| 2 | 30 + (15 * 2^2) = 30 + 60 |
90 | 2.5 minutes |
| 3 | 30 + (15 * 2^3) = 30 + 120 |
150 | 5 minutes |
| 4 | 30 + (15 * 2^4) = 30 + 240 |
270 | ~9.5 minutes |
| 5 | 30 + (15 * 2^5) = 30 + 480 |
510 | ~18 minutes |
| 6 | 30 + (15 * 2^6) = 30 + 960 |
990 | ~34 minutes |
| 7 | 30 + (15 * 2^7) = 30 + 1920 |
1950 | ~67 minutes |
By the 7th retry, you are already exceeding 1 hour of total wait time. In a production scenario, you might configure a maximum number of retries or a maximum cumulative wait time (whichever comes first).
Tip: Fine-tune FixedDelay, BackOffMultiplier, and maximum retries based on your application’s SLA and tolerance for delayed processing.
| Retry | n | Calculation | Total Time (secs) |
|---|---|---|---|
| 1st Retry | 1 | 120 | 120 |
| 2nd Retry | 2 | 120 + 240 | 360 |
| 3rd Retry | 3 | 360 + 480 | 840 |
| 4th Retry | 4 | 840 + 960 | 1800 |
| 5th Retry | 5 | 1800 + 1920 | 3720 |
POST/epcs/statesX-REALM-SELECTED-URNX-EXTERNAL-STORE-IDX-EXTERNAL-STORE-NUMBER202 Accepted (no body)GET/userRealms200 OK (returns a JSON array of realm objects)X-REALM-SELECTED-URN integration.Authorization, X-REALM-SELECTED-URN, X-EXTERNAL-STORE-ID, and X-EXTERNAL-STORE-NUMBER.End of Documentation
For further clarifications on error codes, rate limits, or advanced usage (e.g., bulk updates, filters, partial updates), please contact the API maintainers.