Process redemption execution using role-based detection. Supports user, business, and admin redemption processing.
PERS-api Documentation (2.2.2)
PERS API Documentation
This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.
Usage Guidelines:
- RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
- Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
- Data Format: All requests and responses utilize standard JSON formatting.
Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/redemptions/redeems
- https://api.pers.ninja/v2/redemptions/redeems
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.pers.ninja/_mock/swagger/redemptions/redeems \
-H 'Content-Type: application/json' \
-H 'x-project-key: YOUR_API_KEY_HERE' \
-d '{
"redemptionId": "string",
"businessId": "string"
}'Redemption executed successfully
The redemption redeem details that the user redeemed
The status of the redemption redeem
The date and time when processing of the redemption redeem started
The date and time when processing of the redemption redeem was last updated
Message regarding the redemption status (failure reason, success info, etc.)
The sender transaction that resulted from the user redeeming the redemption, this is applicable for redemptions that involve sending tokens from the user to a specific address
Transaction details
Transaction token contract id, this is the blockchain contract id of the token
Trigger process type
Trigger process id, this is the id of the entity that triggered the transaction if applicable (e.g. CampaignUserClaim id)
Transaction status
Sender entity ID (polymorphic reference)
Sender entity type (user, business, system etc.)
Recipient entity ID (polymorphic reference)
Recipient entity type (user, Business, system, etc.)
Optional message associated with the transaction, e.g. for error details
Business commercially involved in this transaction (for stats/reporting)
Entity authorized to submit this transaction (for POS flow security)
Type of entity authorized to submit (USER, BUSINESS, etc.)
Current status of the transaction
Prepared transaction data ready for signing (if applicable)
Actionable details for the transaction, if applicable
{ "redeem": { "id": "string", "userId": "string", "redemptionId": "string", "userCountryCode": "string", "status": "PENDING", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "message": "string", "included": { … } }, "senderTransaction": { "transaction": { … }, "transactionStatus": "created", "signingData": {}, "actionable": { … }, "walletSigningStatus": "string" } }
Request
Get redemption redeems with comprehensive filtering options:
- redemptionId: Filter by specific redemption (optional)
- userId: Filter by specific user ID (admin only)
- businessId: Filter by specific business ID (admin only)
- include: Optionally include related entities (redemption, user, business, transactions)
Access Control:
- Users: See only their own redemptions
- Business: See only redemptions associated with their business account
- Admin: Can filter by any combination of parameters or see all redemptions
Security Notes:
- Users cannot access userId or businessId parameters (automatically filtered)
- Business accounts automatically filter to their own businessId regardless of parameter
- Admin has full access to all filtering options
Use pagination parameters (page & limit) for optimal performance - critical for high-volume data. Legacy support: returns array without params (deprecated - will be removed in future).
- Mock serverhttps://docs.pers.ninja/_mock/swagger/redemptions/redeems
- https://api.pers.ninja/v2/redemptions/redeems
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/redemptions/redeems?redemptionId=string&userId=string&businessId=string&include=string&page=string&limit=string' \
-H 'x-project-key: YOUR_API_KEY_HERE'Redemption redeems retrieved successfully
The status of the redemption redeem
The date and time when processing of the redemption redeem started
The date and time when processing of the redemption redeem was last updated
Message regarding the redemption status (failure reason, success info, etc.)
Included related entities. Only populated when include parameter is specified. Contains redemption, user, business, and/or transactions entities based on requested relations.
[ { "id": "string", "userId": "string", "redemptionId": "string", "userCountryCode": "string", "status": "PENDING", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "message": "string", "included": { … } } ]
Request
Convenience endpoint for authenticated users to retrieve their own redemption redeems.
Equivalent to GET /redemption-redeems but with required authentication and automatic filtering to current user context.
Features:
- Automatic user context (no userId parameter needed)
- Optional redemption filtering
- Requires user authentication
- Simplified response structure
- Optional entity inclusion (redemption, user, business, transactions)
- Use pagination parameters (page & limit) for optimal performance - recommended for active users
- Legacy support: returns array without params (deprecated - will be removed in future)
Usage Examples:
- GET /redemption-redeems/me (all redemptions for authenticated user)
- GET /redemption-redeems/me?redemptionId=123 (specific user redemption)
- GET /redemption-redeems/me?page=1&limit=10 (paginated results)
- GET /redemption-redeems/me?include=redemption,user (with related entities)
- GET /redemption-redeems/me?include=redemption,transactions (with transactions)
- Mock serverhttps://docs.pers.ninja/_mock/swagger/redemptions/redeems/me
- https://api.pers.ninja/v2/redemptions/redeems/me
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/redemptions/redeems/me?redemptionId=string&include=string&page=string&limit=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'User redemption redeems retrieved successfully
The status of the redemption redeem
The date and time when processing of the redemption redeem started
The date and time when processing of the redemption redeem was last updated
Message regarding the redemption status (failure reason, success info, etc.)
Included related entities. Only populated when include parameter is specified. Contains redemption, user, business, and/or transactions entities based on requested relations.
[ { "id": "string", "userId": "string", "redemptionId": "string", "userCountryCode": "string", "status": "PENDING", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "message": "string", "included": { … } } ]
- Mock serverhttps://docs.pers.ninja/_mock/swagger/redemptions/redeems/{redeemId}
- https://api.pers.ninja/v2/redemptions/redeems/{redeemId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/redemptions/redeems/{redeemId}?include=string' \
-H 'x-project-key: YOUR_API_KEY_HERE'Redemption redeem retrieved successfully
The status of the redemption redeem
The date and time when processing of the redemption redeem started
The date and time when processing of the redemption redeem was last updated
Message regarding the redemption status (failure reason, success info, etc.)
{ "id": "string", "userId": "string", "redemptionId": "string", "userCountryCode": "string", "status": "PENDING", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "message": "string", "included": { "redemption": { … }, "user": { … }, "business": { … }, "transactions": [ … ] } }