Read product
Read one Store product in your community by its ID, with price, category, access rules and current stock.
- Method
- GET
- Path
https://api.returning.ai / v1/ products/ {productID} - Permission
- store
- Retries
- Read-only; exact retries are safe
When to use this
- Confirm a product and its
stocksafter you create or update it. - Fetch the current settings before a full update, so you only change what you mean to.
- Check an archived product, which List products leaves out.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- storeShown in the dashboard as “Store”
Send a Community API key with the store permission. The key decides the community, so never send a community ID. Keep the key on your server.
Request#
Path parameters#
Rule24-character hex ID
Eg66f000000000000000000101
Query parameters#
_id when you need the ID. categoryID also returns category; category itself is not accepted. Without it, every field is returned.RuleProduct field names
Eg_id,name,price,categoryID,stocks
th.RuleLanguage code
Egth
Headers#
store.RuleBearer <API_KEY>
curl --request GET \
--url https://api.returning.ai/v1/products/66f000000000000000000101 \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns the product in data, including archived products (isArchived: true). stocks counts voucher codes that are unsold and not expired; the codes themselves are never returned. Branch on the HTTP status and meta.code, never on message.
Eg{ ... }
Rulesuccess
Eg200
RulePRODUCT_RETRIEVED
Eg"Read product success."
Eg{ ... }
Eg"66f000000000000000000101"
Eg"$25 Trading Credit"
Eg500
null when the product has no category.null when the product has no category or its category was deleted.Eg"Trading rewards"
Eg2
true when the product is archived and left out of List products and the Store.Egfalse
null when there is no image.Eg"https://cdn.example.com/store/trading-credit-25.png"
Eg"<p>Redeem 500 coins for a $25 trading credit on your live account.</p>"
null.Eg"<p>Your credit is added to your trading account after approval.</p>"
Eg0
true when the discount is switched on.Egfalse
null.Egnull
null.Egnull
Eg{ ... }
true when the trader is asked for details.Egfalse
true to ask for their name.Egfalse
true to ask for their phone number.Egfalse
true to ask for their address.Egfalse
true to show traders how many are left.Egtrue
true to prioritise the vouchers closest to expiry.Egfalse
Eg{"isEnabled": false, "duration": 7, "timeframe": "days"}
true when the highlight is on.Egfalse
timeframe units.Eg7
duration, such as days.Eg"days"
true when the product's own rules apply; false when it follows its category.Egfalse
Eg[]
true when the rule is active.Egtrue
Ruleuser, role, tag or role_combination
Eg"role"
usernames when you write rules.role or tag.Eg"role"
true when the rule covers all traders.Eg80
true when the special price applies.Egfalse
true when the limit applies.Egfalse
Eg1
intervalUnits.Eg1
months.Eg"months"
Rulefull-access, view-only or access-denied
Eg"full-access"
true to show the exclusive tag.Egfalse
Eg{"isEnabled": false, "status": null}
true when new orders start in status.Egfalse
null when the category or community default applies.Egnull
Eg0
Eg"66f000000000000000000010"
Eg"2026-09-26T08:30:00.000Z"
Eg"2026-09-26T09:15:00.000Z"
{
"meta": {
"status": "success",
"statusCode": 200,
"code": "PRODUCT_RETRIEVED"
},
"message": "Read product success.",
"data": {
"_id": "66f000000000000000000101",
"communityID": "66f000000000000000000010",
"name": "$25 Trading Credit",
"description": "<p>Redeem 500 coins for a $25 trading credit on your live account.</p>",
"image": "https://cdn.example.com/store/trading-credit-25.png" ,
"price": 500,
"categoryID": "66f000000000000000000201",
"category": "Trading rewards",
"stocks": 2,
"discountPrice": 0,
"isDiscountEnabled": false,
"discountStartDate": null,
"discountEndDate": null,
"userInformation": {
"isEnabled": false,
"shouldCollectName": false,
"shouldCollectPhone": false,
"shouldCollectAddress": false
},
"shouldPrioritiesExpiringVouchers": false,
"shouldDisplayRemainingQuantity": true,
"expiringVoucherHighlight": {
"isEnabled": false,
"duration": 7,
"timeframe": "days"
},
"isArchived": false,
"totalOrders": 0,
"redemptionInstructions": "<p>Your credit is added to your trading account after approval.</p>",
"productPermission": [],
"isProductAccessEnabled": false,
"purchaseStatusOverride": {
"isEnabled": false,
"status": null
},
"createdAt": "2026-09-26T08:30:00.000Z",
"updatedAt": "2026-09-26T09:15:00.000Z"
}
}
Errors#
Every error carries its code in meta.code, with the reason in detail. A product in another community returns 404, the same as a missing one.
Fix the request04
VALIDATION_FAILEDFix the requestproductID isn't a 24-character hex ID, or fields names a field that can't be returned. detail says which.AUTH_API_KEY_REQUIREDFix the requestAuthorization: Bearer <API_KEY>.AUTH_API_KEY_INVALIDFix the requestAUTH_PERMISSION_REQUIREDFix the requeststore. Add the permission in Settings > Integration > API Keys.Fix the data01
STORE_RESOURCE_NOT_FOUNDFix the dataRetry with backoff03
STORE_DEPENDENCY_UNAVAILABLERetry with backoffINTERNAL_ERRORRetry with backoffAUTH_API_KEY_VALIDATION_FAILEDRetry with backoff{
"meta": {
"status": "error",
"statusCode": 400,
"code": "VALIDATION_FAILED"
},
"message": "Validation failed",
"detail": {
"productID": "productID must be a valid MongoDB ObjectId string"
},
"solution": "Please check the request and try again"
}