List redemption orders by user email
List one trader's redemption orders in your community, newest first, finding the trader by their email.
- Method
- POST
- Path
https://api.returning.ai / v1/ redemption-transactions/ by-email - Permission
- customerSuccess
- Retries
- Read-only; exact retries are safe
When to use this
- A trader contacts support with their email and asks where their reward is.
- Show a trader's reward orders inside your own client portal, where you know their email.
- Find an order ID (
ORD...) for one trader before you change its status or read its history.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- customerSuccessShown in the dashboard as “Customer Success”
Use a Community API key with customerSuccess, and keep it on your server. The key decides the community, so never send a communityId; it is ignored. Only orders in that community are returned.
Behaviour#
The email is matched ignoring capital letters, against every Returning.AI account, including deleted ones. An account that exists but has no orders in your community returns 200 with an empty list, not 404. A 404 means no account has this email at all.
Orders come back newest first, by redemption time, whatever their status. Orders the trader redeems while you page push older ones down, so de-duplicate by redemptionId.
Request#
Headers#
Body#
email is required. page and limit are optional; limit defaults to 10 and can be at most 100. Numbers sent as strings, such as "20", are accepted. Other fields are ignored.
curl --request POST \
--url https://api.returning.ai/v1/redemption-transactions/by-email \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"email": "trader@example.com",
"page": 1,
"limit": 20
}'
Response#
A 200 returns the page in data.transactions and the totals in data.pagination, with the same order fields as List redemption orders by community plus the redemption method when the order has one, and without userData. A page past the last one returns an empty list with the real total. redemptionId is the order ID (ORD...) that every other redemption endpoint takes. When a product has been deleted, its orders stay in the list, without rewardId or type, and with productName as null.
Rulesuccess
RuleREDEMPTION_TRANSACTIONS_RETRIEVED
Eg"Redemption transactions fetched successfully"
Eg{ ... }
Eg[ ... ]
redemptionId, not this.ORD...). Send it as transactionId to update the order or read its history.New Purchase or Refunded.voucher. Left out when the product no longer exists.customInstructions or physicalDelivery, when the product sets one.null if unknown.Eg{"total": 1, "page": 1, "limit": 20, "totalPages": 1}
Eg1
Eg1
Eg20
limit. 0 when the trader has no orders.Eg1
{
"status": "success",
"code": "REDEMPTION_TRANSACTIONS_RETRIEVED",
"message": "Redemption transactions fetched successfully",
"data": {
"transactions": [
{
"_id": "66f000000000000000000401",
"redemptionId": "ORD20269268300418273",
"serverId": "66f000000000000000000010",
"userId": "<userObjectId>",
"rewardId": "66f000000000000000000101",
"voucherId": "66f000000000000000000502",
"price": 500,
"quantity": 1,
"status": "Refunded",
"statusID": "66f000000000000000000402",
"type": "voucher",
"userInfo": {
"username": "sample_trader",
"name": "Sample Trader",
"email": "trader@example.com"
},
"purchasedDate": "2026-09-26T08:30:00.000Z",
"createdAt": "2026-09-26T08:30:00.000Z",
"updatedAt": "2026-09-26T09:15:00.000Z",
"productName": "$25 Trading Credit"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
}
Errors#
401 and 403 responses, and the authentication errors 404 COMMUNITY_NOT_FOUND and 500 AUTHENTICATION_FAILED, carry the code in meta.code; every other error carries it in code. Branch on the HTTP status and code, never on message.
Fix the request03
VALIDATION_FAILEDFix the requestemail is missing or isn't a valid email, or page or limit is out of range. detail names the field, for example Invalid email format or Number must be less than or equal to 100.AUTHENTICATION_REQUIREDFix the requestAuthorization: Bearer <API_KEY> with a current Community API key.API_KEY_PERMISSION_DENIEDFix the requestcustomerSuccess, or it is a personal key. Use a Community API key and add the permission in Settings > Integration > API Keys.Fix the data02
USER_NOT_FOUNDFix the dataCOMMUNITY_NOT_FOUNDFix the dataRetry with backoff02
INTERNAL_ERRORRetry with backoffAUTHENTICATION_FAILEDRetry with backoff{
"status": "fail",
"code": "VALIDATION_FAILED",
"message": "Get redemption transactions by email endpoint",
"detail": {
"email": "Invalid email format"
}
}