getCatalogueInventory
Returns remaining coupon stock per offer. Short-lived and cacheable for 180 seconds — call it before you show a buy action so you can mark an offer "limited stock" or disable it.
AvailableGET /api/getCatalogueInventory
| Environment | URL |
|---|---|
| Production | https://hotdeals.cheggout.com/api/getCatalogueInventory |
| UAT | https://onerupee-store-api-stage.azurewebsites.net/api/getCatalogueInventory |
Authentication — API key
Request
Headers
| Header | Required | Value |
|---|---|---|
Content-Type | Yes | application/json |
X-CHANNELID | Yes | Your channel identifier |
Authorization | Yes | CheggoutAppKey <APP_KEY>:<SEC_KEY> |
No request parameters are documented — the endpoint returns inventory for the catalogue.
curl -X GET https://hotdeals.cheggout.com/api/getCatalogueInventory \
-H "Content-Type: application/json" \
-H "X-CHANNELID: YOURCHANNEL" \
-H "Authorization: CheggoutAppKey REPLACE_APP_KEY:REPLACE_SEC_KEY"
Response
| Field | Type | Description |
|---|---|---|
status | number | 200 on success |
ttlSeconds | number | How long this response stays valid — 180 |
data | array | Inventory entries |
message | string | Human-readable status text. The exact literal is not documented — do not match on it. |
data[]
| Field | Type | Description |
|---|---|---|
offerId | string | Matches id from getCatalogue |
couponsLeft | number | Remaining coupons. 0 means sold out. |
{
"status": 200,
"ttlSeconds": 180,
"data": [
{ "offerId": "517", "couponsLeft": 124 },
{ "offerId": "518", "couponsLeft": 0 },
{ "offerId": "530", "couponsLeft": 7 }
],
"message": "REPLACE_STATUS_MESSAGE"
}
ttlSecondsCache the response for the returned TTL rather than hardcoding 180. If the value changes, your integration follows it automatically.
How to use it
A reasonable presentation policy:
couponsLeft | Show |
|---|---|
0 | "Sold out" — disable the buy action |
| Low, by your own threshold | "Limited stock" — keep the action enabled |
| Otherwise | Normal |
A non-zero couponsLeft does not reserve anything. Stock can be exhausted between your check and
your fetchCouponCode call, which will then return
409 COUPON_EXHAUSTED. Handle that at delivery time — and if you have already burned the user's
coins, refund them.
Errors
status | errorCode | Cause |
|---|---|---|
400 | INVALID_REQUEST | Malformed request |
401 | UNAUTHORIZED | Missing or wrong Authorization header |
500 | INTERNAL_ERROR | Platform-side failure |
Status codes arrive in the body — see API conventions.
Notes
TBD The relationship between catalogue and inventory scope is not fully
specified. Inventory may include offer identifiers that are not present in your catalogue
response. Treat getCatalogue as the authority on what to show, and use
inventory only to answer how much is left for offers you already display — join on offerId and
ignore entries you do not recognise.
Next
fetchCouponCode— deliver a coupon.- Catalogue module guide