| Send | Permission | Community scope |
|---|---|---|
Authorization: Bearer <apiKey> | readRedemptionTransactions | Community scope is derived from the key; do not send a community identifier. |
{
"email": "agent-test@example.invalid",
"page": 1,
"limit": 20
}code = REDEMPTION_TRANSACTIONS_RETRIEVED{
"status": "success",
"code": "REDEMPTION_TRANSACTIONS_RETRIEVED",
"message": "List redemption orders by user email successfully",
"data": {
"transactions": [
{
"redemptionId": "ORD202607220001",
"productName": "Agent Test Voucher",
"price": 100,
"quantity": 1,
"status": "New Purchase"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
}code, never message text.| HTTP | Machine code | What the caller should do | Retry? |
|---|---|---|---|
| 400 | VALIDATION_FAILED | Repair the email or pagination fields. | No, fix first |
| 401 | AUTHENTICATION_REQUIRED | Add the Authorization header. | No, fix first |
| 401 | AUTHENTICATION_FAILED | Authentication could not be completed. | Retry once |
| 403 | API_KEY_PERMISSION_DENIED | Request the readRedemptionTransactions permission; no resource data is returned. | No, fix first |
| 404 | USER_NOT_FOUND | Confirm the user email before retrying. | After refreshing the ID |
| 500 | INTERNAL_ERROR | Retry with exponential backoff and the same request context, then escalate. | Yes, with backoff |
curl --location 'https://api.returning.ai/v1/redemption-transactions/by-email' \
--header 'Content-Type: application/json' \
--data '{
"email": "",
"limit": 10,
"page": 1
}'{
"status": "success",
"message": "Redemption transactions fetched successfully",
"data": {
"transactions": [],
"pagination": {
"total": 50,
"page": 1,
"limit": 10,
"totalPages": 5
}
}
}