Error Handling

Error Handling & Responses

Pliant uses known HTTP response codes to indicate the success or failure of a API requests.

  • Codes in the 2xx range indicate a successful operation.
  • Codes in the 4xx range indicate an error. The requested action could not complete with the provided data (for instance, a required parameter was omitted).
  • Codes in the 5xx range indicate an error on Pliants servers. Here a retry can be made after some short amount of time. Please use a backoff value to not constantly retry with the same delay.
Error codeDescription of error code
200All good, everything went as expected!
202Accepted. The request was successful, please wait until the callback is triggered, since this is an asynchronous operation.
204No Content. The request was successful, but the system has no content to return. Most likely due to a deactivate feature module for the requested entity.
400Bad Request. The API consumer sent a malformed request which could not be processed.
401Unauthorized. The API consumer is not authorized to access the requested resource.
403Forbidden. The API consumer is not allowed to access the requested resource.
404Not Found. The requested resource could not be found.
409Conflict. The action could not be completed, because the resource is locked.
500Internal Server Error. The request was not completed due to an internal error.
503Service Unavailable. The request was not completed due to an internal error.

Common Error Messages

Below you can find common error messages we might send to you, related to the platform's business logic. Please keep in mind that this list does not cover every single error that can potentially occur but if you want to start with granular error handling we advise you to start with these and cover additional ones with a generic error handler.

Endpoint GroupError CodeError Message
CardholderUSER_ALREADY_EXISTSUser with the same email already exists in organization [${organizationId}]
ReceiptRECEIPT_FILE_ERRORReceipt file type not supported: image/gif
ReceiptRECEIPT_UPLOAD_NOT_ENABLEDreceiptUploadEnabled set to false for the transactionId=${transactionId}
CardILLEGAL_ARGUMENTS_PROVIDEDActivation code doesn't match
CardINVALID_ACCESS_CODEInvalid card access code for card activation
CardILLEGAL_STATUS_TRANSITIONCard in status ${card.status} cannot be unlocked
CardLOCKED_BY_CARD_CONTROLCard is locked by card control, it cannot be unlocked manually
CardNOT_ACTIVE_ORGCard can be issued only for ACTIVE organizations. organizationId: {$organizationId}, organizationStatus: {$organization.status}
CardINVALID_PHONE_NUMBERPhone number must start with '+' followed by 8 to 15 numbers. memberId: ${cardholderId}, phoneNumber: {$phoneNumber}
CardCARD_NAME_NOT_SUPPORTEDcard names are not supported for {cardType} type cards
CardILLEGAL_ARGUMENTS_PROVIDEDUnsupported validity period. Virtual card validity period must be one of [3, 6, 9, 12, 18, 24, 30, 36]
CardILLEGAL_ARGUMENTS_PROVIDEDIf card control categories are used, all fields are mandatory
CardILLEGAL_ARGUMENTS_PROVIDEDIf card control merchants are used, all fields are mandatory
CardILLEGAL_ARGUMENTS_PROVIDEDIf card control dates are used, all fields are mandatory
CardILLEGAL_ARGUMENTS_PROVIDEDIf card control times are used, all fields are mandatory
CardILLEGAL_ARGUMENTS_PROVIDEDDATE or TIME card controls can't be set while using card validity params
Card RequestISSUANCE_LIMIT_EXCEEDEDIssuance limit reached. Card is not created. memberId=[${memberId}], organizationId=[{$organizationId}], cardConfig=[${cardConfig}]
Card RequestCOMMENT_IS_MANDATORYComment is mandatory for SINGLE_USE card - Example error message: Comment is a mandatory field
GeneralAPI_VERSION_NOT_SUPPORTEDMinimum API version=2.1.0, provided version=2.0.0
GeneralILLEGAL_ARGUMENTS_PROVIDEDPayload is missing mandatory fields