Loyalty API
Status Codes
The HTTP status codes and error codes returned by the Loyalty API.
Loyalty API responses use the following HTTP status codes:
| Code | Title | Description |
|---|---|---|
200 | OK | The request was processed. Check the error code, since many errors are returned with this status. |
400 | Bad Request | The request is invalid. |
401 | Unauthorized | The API credentials are invalid. |
404 | Not Found | The resource doesn't exist. |
429 | Too Many Requests | A rate limit was exceeded. |
500 | Internal Server Error | An error occurred on our side. |
503 | Service Unavailable | The API is temporarily unavailable. |
Error codes
When a request fails, the response includes an error code that identifies the problem. Many of these errors are
returned with a 200 status, so don't rely on the status code alone.
| Status | Error code | Message |
|---|---|---|
200 | AUTO_REDEEMABLE_REWARD | Cannot redeem auto redeemable reward via API. |
200 | DUPLICATE_ORDER_ID | Loyalty Points already awarded for the Order ID. |
200 | EXCLUDED_TRANSACTION | Points could not be awarded because exclusion rule was applied. |
200 | INACTIVE_REWARD | This reward is inactive and cannot be redeemed. |
200 | INCORRECT_MEMBER_ID_PASSED | Incorrect Member ID passed. |
200 | INSUFFICIENT_REDEEMABLE_POINTS | User points balance insufficient. |
200 | INVALID_AMOUNT_TO_DEDUCT | Not enough points to deduct. |
200 | INVALID_MEMBER | Member does not exist. |
200 | INVALID_MEMBER_STATUS | Invalid member status. |
200 | INVALID_PHOTO | Invalid file type or file size. Please make sure uploaded file type is JPG, JPEG, or PNG. and file size should be less than 10MB. |
200 | INVALID_PRODUCT_ID | Incorrect product id passed. |
200 | INVALID_REWARD_FOR_TIER | This reward is not valid for user tier. |
200 | INVALID_REWARD_FOR_USER | This reward is not valid for the user. |
200 | MAX_AWARDS_EXCEEDED | Maximum award limit exceeded. |
200 | MAX_REWARDS_EXCEEDED | Maximum redemption threshold for reward reached. |
200 | MEMBER_BLOCKED | Member has been blocked. |
200 | MEMBER_CREATION_UNSUCCESSFUL | Member creation unsuccessful. |
200 | MEMBER_DELETED | Member record has been deleted. |
200 | MEMBER_ID_ALREADY_IN_USE | Member ID already in use. |
200 | ORDER_NOT_EXIST | Order with this id does not exist. |
200 | PAUSED_ACTIVITY | Activity is in paused state. |
200 | PRODUCT_ID_AND_RETURN_AMOUNT_PASSED | Please pass either returned product id or returned amount. |
200 | PRODUCT_QUANTITY_EXCEEDED | Returned product quantity exceeds order quantity. |
200 | RETURN_VALUE_EXCEEDS_AVAILABLE_BALANCE | Returned order value exceeds user's points balance. |
200 | STORE_INACTIVE | Store is not active. |
200 | TRANSACTION_ATTRIBUTE_NOT_UNIQUE | Unique transaction attribute for given activity is not unique. |
200 | UNABLE_TO_UPLOAD_PHOTO | Unable to upload the photo. Please try again later. |
400 | ATTRIBUTE_NOT_UNIQUE | IdParams name passed is not a unique attribute. |
400 | ID_PARAM_NAME_NOT_FOUND | IdParams name passed does not exist. |
400 | INVALID_CURSOR | Invalid start cursor provided. |
400 | INVALID_JSON | Invalid JSON format. |
400 | INVALID_REQUEST | Invalid request: unsupported Content-Type [content-type]. |
400 | INVALID_REQUEST_PARAMETER_VALUES | Invalid request parameter value. |
400 | MERCHANT_DOES_NOT_EXIST | Merchant does not exist. |
401 | ERROR_UNAUTHORIZED | Some error occurred while authenticating your account at TrueLoyal. Please verify your API credentials. |
404 | TRANSACTION_DOES_NOT_EXIST | Transaction does not exist. |
429 | RATE_LIMIT_EXCEEDED | Rate limit exceeded. |
500 | INTERNAL_SERVER_ERROR | Internal server error. |
503 | SERVICE_UNAVAILABLE | API Service is unavailable. Please contact TrueLoyal support. |