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

FieldTypeDescriptionExample
statusBooleantrue - success, false - errortrue
error_codeString(3)Error code provided when status is false005
error_messagesString(32)Describes the error codeValidation failed
error_detailsArray of ObjectsIf present; contains the errors detected on specific records
*.recordObjectThe provided req.body record that contains an error
*.errorsObjectContains 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.

CodeDescriptionSolution
001Invalid API key provided.Check both the key and format
002Invalid body layoutMake sure the body layout follows that set out in this document
003Invalid body parametersSee 'error_details' response field for more details. Check documentation for expected inputs
004Invalid lookup valuesSee 'error_details' response field for more details. Check if the lookup values provided exist in the lookups response
005Validation failedSee 'error_details' response field for more details
006Invalid URL parameterCheck documentation for correct URL parameters
007Record not foundTry different search criteria
008Invalid status selectedStatus not allowed to be set for this record type, check documentation
009Invalid token statusToken status does not allow accessing the requested API rout, check token status on Kwik dashboard
010Invalid token permissionsToken permissions does not allow accessing the requested API rout, check token permissions on Kwik dashboard
011Trying to access restricted sectionSection not allowed to be accessed by token, check token allowed sections on Kwik dashboard
012Not allowed to change payment status to runningPayment 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
013Failed to submit DebiCheck mandateCheck error messages for more details
014Status transition not allowedThe payment is not allowed to change to the chosen status
015DebiCheck mandate cancellation failedCheck error message for reason as to why DebiCheck mandate could not be cancelled

Copyright © 2024 Kwik