Cancel consignments
Cancel individual or bulk consignments using a simple PUT request.
Overview
You can only cancel a consignment, individually or in bulk, prior to it being manifested. Once a consignment has been manifested it can no longer be cancelled.
Once a consignment has been cancelled, then no further changes can be made to it. If you want to reinstate a cancelled consignment then you will need to create a new consignment with the same details.
Cancel an individual consignment
To cancel an individual consignment, use the Cancel Consignment endpoint. You can call Cancel Consignment by sending a PUT
request to https://api.electioapp.com/consignments/{consignmentReference}/cancel
. Once the request has been received, the Consignments platform changes the consignment’s ConsignmentState
to Cancelled and returns a code 200 response with no body.
Cancel consignments in bulk
If you need to cancel multiple consignments in one operation, use the Cancel Consignments endpoint. You can call Cancel Consignments by sending a PUT
request to https://api.electioapp.com/consignments/cancellist
. The body of the request should comprise an array listing the consignmentReference
s of the consignments you want to cancel.
Once the request has been received, Consignments changes the each consignment’s consignmentState
to Cancelled and returns a list with a confirmation message in it for each consignment.
Example: Cancel consignments
This example shows three consignments being cancelled at once via Cancel Consignments endpoint.
PUT https://api.electioapp.com/consignments/cancellist
[
"EC-000-05D-1NS",
"EC-000-05D-1NT",
"EC-000-05D-1NV"
]
[
{
"IsSuccess": true,
"Message": "Consignment cancellation completed successfully",
"Data": "EC-000-05D-1NS",
"ApiLinks": null
},
{
"IsSuccess": true,
"Message": "Consignment cancellation completed successfully",
"Data": "EC-000-05D-1NT",
"ApiLinks": null
},
{
"IsSuccess": true,
"Message": "Consignment cancellation completed successfully",
"Data": "EC-000-05D-1NV",
"ApiLinks": null
}
]