Show / Hide Table of Contents

    Cancelling Consignments

    • v1
    • consignments
    • pro
    • api

    This page explains how to cancel consignments in PRO, both individually and in bulk.


    Overview

    You can only cancel a consignment 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.

    Cancelling Individual Consignments

    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, PRO changes the consignment's ConsignmentState to Cancelled and returns a code 200 response with no body.

    Note

    For full reference information on the Cancel Consignment endpoint, see the API reference.

    Cancelling 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 consignmentReferences of the consignments you want to cancel.

    Once the request has been received, PRO changes the each consignment's consignmentState to Cancelled and returns a list with a confirmation message in it for each consignment.

    Note

    For full reference information on the Cancel Consignments endpoint, see the API reference.

    Cancel Consignments Example

    This example shows three consignments being cancelled at once via Cancel Consignments endpoint.

    • Cancel Consignments Request
    • Cancel Consignments Response

    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
        }
    ]
    

    Next Steps

    • Learn how to allocate consignments at the Allocating Consignments to Carriers page.
    • Learn how to get and print delivery labels at the Getting Labels page.
    • Learn how to add consignments to a carrier manifest at the Manifesting Consignments page.
    Back to top Copyright © Sorted Group 2023. Generated by DocFX