Skip to main content

Cancel Document

The Cancel Document API allows you to cancel a specific document by its unique identifier (documentUuid). A reason for cancellation must be provided.


API URLs

PropertyValue
Sandboxhttps://malaysia-sandbox.complyance.io
Productionhttps://malaysia-prod.complyance.io/
Endpoint/cancelDocument
MethodPOST

Headers

HeaderTypeDescriptionExampleConditionality
x-api-keystringYour API key1aN3AQ8ZsggJ0UABAHXVBMandatory
Content-TypestringSet as application/jsonapplication/jsonMandatory

Request Body

The request body must be in JSON format.

ParameterTypeDescriptionExample Value
documentUuidstringThe unique identifier of the document to cancel.6FSDTHSGTW0CFCEBKVXVB12310
reasonstringThe reason for cancelling the document.Testing Cancellation

Example Request Body

{
"documentUuid": "6FSDTHSGTW0CFCEBKVXVB12310",
"reason": "Testing Cancellation"
}

Response

Success Response

HTTP Status Code: 200 OK

Response Body:

{
"uuid": "6FSDTHSGTW0CFCEBKVXVBFHJ10",
"status": "Cancelled",
"error": null
}

Error Responses

HTTP Status CodeError CodeDescription
400BAD_REQUESTThe provided input is invalid or missing fields.
401UNAUTHORIZEDThe API key is missing or invalid.
500SERVER_ERRORAn internal server error occurred.

Example Error Response:

{
"errorMessage": "Please check the field documentUuid"
}

Usage Example

curl --location 'https://malaysia-prod.complyance.io//cancelDocument' \
--header 'Content-Type: application/json' \
--header 'x-api-key: 1aN3AQ8ZsggJ0UABAHXVB' \
--data '{
"documentUuid": "6FSDTHSGTW0CFCEBKVXVB12310",
"reason": "Testing Cancellation"
}'

Notes

  • Ensure the x-api-key header contains a valid API key.
  • The reason parameter is required and should provide a clear explanation for the cancellation.
  • The API operates in a sandbox environment, so it is suitable for testing purposes.

Success Handling

The API may return the following success responses depending on the validation result or submission status:

Status CodeDescription
200Success – The request was processed successfully.

Error Handling

The API may return the following error responses depending on the validation result or request issues:

Error CodeDescription
400Bad Request – Invalid data in the request.
401Unauthorized – Invalid or missing API key.
500Internal Server Error – Server encountered an error.

Ensure that your request body and headers are correctly formatted to avoid errors.