Specification
Errors
Error Layout & Codes
This section describes the layout when an API call fails and error codes.
Failed Status
All API calls that return status as false
will follow this format. There are no partially accepted records; records are tested and if there is an error the API call is rejected with the following response.
Response Body
{
"status": false,
"error_code": "005",
"error_message": "Validation failed",
"error_details": [{
"record": {
"bank_branch_code": "FFF123",
...
},
"errors": {
"bank_branch_code": {
"message": "The bank branch code must be an integer.",
"rule": "integer"
}, ...
},
}, ...]
}
Response Parameters
Field | Type | Description | Example |
---|---|---|---|
status | Boolean | true - success, false - error | true |
error_code | String(3) | Error code provided when status is false | 005 |
error_messages | String(32) | Describes the error code | Validation failed |
error_details | Array of Objects | If present; contains the errors detected on specific records | |
*.record | Object | The provided req.body record that contains an error | |
*.errors | Object | Contains a breakdown of errors per req.body parameter field. For nested body objects the key will follow dot notation e.g. 'customer.postal_code' as a string |
Error Codes
Lists all the error codes generated by the system.
Code | Description | Solution |
---|---|---|
001 | Invalid API key provided. | Check both the key and format |
002 | Invalid body layout | Make sure the body layout follows that set out in this document |
003 | Invalid body parameters | See 'error_details' response field for more details. Check documentation for expected inputs |
004 | Invalid lookup values | See 'error_details' response field for more details. Check if the lookup values provided exist in the lookups response |
005 | Validation failed | See 'error_details' response field for more details |
006 | Invalid URL parameter | Check documentation for correct URL parameters |
007 | Record not found | Try different search criteria |
008 | Invalid status selected | Status not allowed to be set for this record type, check documentation |
009 | Invalid token status | Token status does not allow accessing the requested API rout, check token status on Kwik dashboard |
010 | Invalid token permissions | Token permissions does not allow accessing the requested API rout, check token permissions on Kwik dashboard |
011 | Trying to access restricted section | Section not allowed to be accessed by token, check token allowed sections on Kwik dashboard |
012 | Not allowed to change payment status to running | Payment needs to be updated before it can be set to running because the dates set on the payment would result in the payment never being submitted |
013 | Failed to submit DebiCheck mandate | Check error messages for more details |
014 | Status transition not allowed | The payment is not allowed to change to the chosen status |
015 | DebiCheck mandate cancellation failed | Check error message for reason as to why DebiCheck mandate could not be cancelled |