API Error Cases
Understand the custom error responses you may encounter when making requests to the Wallet and Coupon APIs.
Wallet API Errors
The following are the custom API errors that you may receive upon failure requests of the Wallet APIs:
Error Case | Error Details | Applicable API |
---|---|---|
Invalid or incorrect wallet_Id | The specified Wallet ID is invalid or does not exist. | All Wallet APIs |
Missing required path parameter | The PARAMETER_NAME is a mandatory key. | All Wallet APIs |
Invalid transactionType | This error occurs when the transactionType key is invalid. It must be either DEBIT or CREDIT . | Debit/Credit Wallet API |
Missing mandatory key in the payload | KEY_NAME is required. | Debit/Credit Wallet API |
Incorrect data type for points | The points field must be numeric. | Debit/Credit Wallet API |
Negative points passed in the request | points must always be a positive value. | Debit/Credit Wallet API |
Debit points exceed the active points in the user's wallet | The points to be debited cannot exceed the available balance in the user's wallet. | Debit/Credit Wallet API |
Coupon API Errors
The following are the custom API errors that you may receive upon failure requests of the Coupon APIs:
Error Case | Error Details | Applicable API |
---|---|---|
Wrong field added in request body or mandatory fields not passed | A required field KEY_NAME is missing in the request body. | All APIs |
Coupon is expired | The coupon code has expired and is no longer valid. | All APIs |
Total coupon redemption limit exceeded | The total redemption limit for the coupon has been exceeded. | All APIs |
Per-user redemption limit exceeded | The per-user redemption limit for the coupon has been exceeded. | All APIs |
Daily/Weekly/Monthly redemption exceeded | The coupon's daily, weekly, or monthly redemption limit has been exceeded. | All APIs |
Coupon not available for specific days or times | The coupon is not valid during the current day or time. | All APIs |
Coupon cart validation failed | The coupon cart validation failed based on specified conditions. | All APIs |
Coupon product validation failed | Product validation failed due to invalid conditions. | All APIs |
User property validation failed | User property validation failed based on specified conditions. | All APIs |
Selected items: No product property value matched | The selected itemβs properties do not match the coupon requirements. | All APIs |
Applied coupon code is expired | The applied coupon code has expired. | Validate and Redeem APIs |
Coupon code or ID missing in the request body | The coupon code or ID is missing or invalid in the request body. | Validate and Redeem APIs |
Non-redeemed coupon is reverted | The coupon cannot be reverted as it was never redeemed. | Validate and Redeem APIs |
Coupon code or ID is invalid | The provided coupon code or ID is invalid or not found. | Validate and Redeem APIs |
Validation is applied on metadata properties, but the key is not passed in the payload | The required metadata key for validation is missing in the payload. | Validate and Redeem APIs |
User is not logged in and is attempting to validate the campaign user coupon | The user must log in or sign up before redeeming the coupon code. | Validate and Redeem APIs |
Validation for selected items failed | The discount validation for selected items has been failed. | Validate and Redeem APIs |
OrderStatus contains wrong values | The order status provided is invalid; it should be one of pending, completed, or reverted. | Redeem API |
Duplicate orderId passed | The provided orderId has already been used for a previous transaction. | Redeem/Revert API |
Query parameter not passed | A required query parameter query_param_key is missing in the request. | Redeem/Revert API |
Query parameter is wrong | The query parameter type must be either redeemed or reverted . | Redeem/Revert API |
order and item object not passed | Both order and item objects are required in the request body. | Redeem/Revert API |
Mandatory keys in item or order object not passed | A mandatory key is missing from the order or item object. | Redeem/Revert API |
order and item objects passed, but mandatory keys have empty values | The mandatory key value in the order or item object cannot be empty. | Redeem/Revert API |
Updated 1 day ago