Cancel Invoice Bulk#
Cancel Invoice Bulk API is used to Cancel the Invoices using the given request payload. It is an Invoice cancellation reported to GSTN.
Route
/invx/apis/{iridessa-version}/orgs/{org-id}/edocuments/bulk
- active 'iridessa-version': v1
- method: PATCH
URL Parameters#
Name | Description | Type |
---|---|---|
iridessa-version | version of the API for example, v1 |
string |
org-id | theodore organisation id | string |
doc-id | document id | string |
Headers#
All headers are mentioned in common headers
Request#
Please refer the following request body for reference-
Sample request body
[
{
"docId": "010217a4-4fa2-4bec-9271-9df07fff2700",
"comments": "test cancellation",
"cancelReason":"3",
"action": "can"
}
]
Response#
Successful response will have the response in “data” attribute as a json
.
200
#
Sample response body
{
"status": "1",
"data": [
{
"itemStatus": "1",
"itemData": {
"id": "f7c9a0cb-12bf-44c9-88d2-213767bb8bfe",
"irn": "807ee586c0b4a440efcb85b2463c17c8700201753e52a4e5a20b229c8394fb30",
"docNumber": "MA7D35C9CA10B4A1",
"docType": "100",
"docDate": "23/01/2023",
"sellerGstin": "27AAAPI3182M002",
"buyerGstin": "27ACBPN2353E1ZX",
"irdDocType":"POST",
"registeredOn": 1674449605000,
"ewbNo": 261009845696,
"ewbDate": 1674449580000,
"ewbValidTill": 1674584940000,
"amount": 100.00,
"acceptanceComments": null,
"denialComments": null,
"disputeComments": null,
"cancellationComments": "test cancellation",
"cancellationReason": "3",
"status": "240",
"createdByUserId": "3e193e19-0d70-4938-9698-287f8bd947fb",
"createdOn": 1674449548315,
"lastUpdatedByUserId": "3e193e19-0d70-4938-9698-287f8bd947fb",
"lastUpdated": 1674449549398,
"annotations": [],
"irnResponse": "{\"Irn\":\"807ee586c0b4a440efcb85b2463c17c8700201753e52a4e5a20b229c8394fb30\",\"CancelDate\":\"2023-01-23 10:24:00\"}"
},
"itemErrors": null,
"itemInfo": null,
"itemKey": null
}
],
"error": null,
"info": null
}
400 BAD REQUEST
#
Sample Response Body
{
"error": {
"message": "err-incorrect-update-action",
"type": "ClientError",
"args": {
"message": "action can on state 240.kotlin"
}
}
}
Note#
status
field in document is the state of the Document generated. Different Document states are as bellow -
100
->DRAFT
120
->REGISTRATIONFAILED
200
->CREATED
210
->ACCEPTED
220
->DENIED
230
->DISPUTED
240
->CANCELLED
250
->FROZEN
260
->DELETE
Note#
cancelReason
field in request body states reason of cancellation. Different reasons are as bellow-
1
->DUPLICATE
2
->DATA_ENTRY_MISTAKE
3
->ORDER_CANCELLED
4
->OTHERS
Last update: April 7, 2023