Reject Document

Rejects a document waiting to be authorized.

Document waiting for authorization after and before booking can be rejected. This action can only be performed by a user with the Authoriser role that is also the current authorizer of the document.

This API resource is only available to Premium APPs.

POST authorization/:documentId/reject

Request details

The post request will contain all the required information to reject the document and it will be identified by the documentId.

Request properties

Property Type Description Optional
reason String Reason to reject the document. No

Example request

    reason: "some reason must be sent"

Successful Response

Upon successful operation a 200 status code will be returned.

Error Response

In the case an error occurs an error code will be returned.

Example response

    "message": "One or more validation errors occurred.",
    "code": "invalid_request_payload",
            "field": "documentId",
            "message": "error message will be here",
            "code": "error_code_will_be_here"
    "_moreInfo": ""

Possible error response codes

Status code Error code Details
400 invalid_request_payload Request properties are not valid to perform the requested operation.
400 validation_error Request failed with one or more validation errors (see below). For more information about how to handle validation errors, please consult client side errors section.
401 unauthorized User is not authorized to access the resource.
403 forbidden User has no rights to execute the requested operation.
404 resource_not_found Resource was not found.

Possible validation error responses

Status code Error code Details
400 no_reason_provided No reason was provided to reject the document.
400 document_not_valid_current_state Document can not be rejected because is not in a valid state.
400 document_already_rejected Document was already rejected.
400 user_is_not_valid_authorizer User is not the current authorizer.
400 user_is_not_next_valid_authorizer User is not the next valid authorizer.