Skip to main content

Delete Receipt

The Delete Receipt API allows you to delete an existing receipt from the system. This API is useful for managing receipts and ensuring data integrity by removing outdated or incorrect entries.


API URLs

PropertyValue
Sandboxhttps://malaysia-sandbox.complyance.io
Productionhttps://malaysia-prod.complyance.io/
Endpoint/deleteReceipt?receiptNumber=
MethodPOST

Headers

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

Request Parameters

ParameterDescriptionRequiredExample
receiptNumberReceipt identifierYesReceipt/002/PQRS

Response

Success Response

HTTP Status Code: 200 OK

Response Body:

{
"status": "success",
"message": "Receipt deleted successfully."
}

Error Responses

HTTP Status CodeError CodeDescription
400BAD_REQUESTThe provided input is invalid or missing fields.
401UNAUTHORIZEDThe API key is missing or invalid.
404NOT_FOUNDThe specified receipt does not exist.
500SERVER_ERRORAn internal server error occurred.

Example Error Response:

{
"status": "error",
"message": "Receipt not found or already deleted."
}

Usage Example

curl --location 'https://malaysia-prod.complyance.io/deleteReceipt?receiptNumber=' \
--header 'Content-Type: application/json' \
--header 'x-api-key: 12345678uygh1jkm' \
--data '{
"receiptNumber": "TestingReceips"
}'

Notes

  • Ensure the x-api-key header contains a valid API key.
  • The receiptNumber parameter is required and must correspond to an existing receipt.
  • 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 receipt was deleted successfully.

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

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.
404Not Found – The specified receipt does not exist.
500Internal Server Error – Server encountered an error.