| Send | Permission | Community scope |
|---|---|---|
Authorization: Bearer <apiKey> | createRedemptionStatus | Community scope is derived from the key; do not send a community identifier. |
{
"name": "Agent Reviewing",
"category": "in_progress"
}code = REDEMPTION_STATUS_CREATED{
"status": "success",
"code": "REDEMPTION_STATUS_CREATED",
"message": "Create redemption order status successfully",
"data": {
"_id": "sts_agent_reviewing",
"name": "Agent Reviewing",
"category": "in_progress",
"color": "#808080",
"order": 1,
"isDefault": false
}
}code, never message text.| HTTP | Machine code | What the caller should do | Retry? |
|---|---|---|---|
| 400 | VALIDATION_FAILED | Repair the request body. | 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 createRedemptionStatus permission; no resource data is returned. | No, fix first |
| 409 | REDEMPTION_STATUS_CONFLICT | Reuse existing status or choose another name. | After reconciliation |
| 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/status' \
--header 'Content-Type: application/json' \
--data '{
"name": "Awaiting Shipment",
"category": "in_progress"
}'{
"status": "success",
"message": "Redemption status created successfully",
"data": {
"_id": "665a1b2c3d4e5f6a7b8c9d0e",
"name": "Awaiting Shipment",
"category": "in_progress",
"color": "#808080",
"order": 3
}
}