Show / Hide Table of Contents

    Deallocating Consignments

    • v1
    • allocation
    • pro
    • api
    • consignments

    Change of plans for a consignment? This page explains how to deallocate consignments from their carrier services both individually and in bulk.


    Overview

    A consignment cannot be edited once it is allocated. In order to edit or cancel an allocated consignment, or to allocate it to a different carrier service, you will first need to deallocate it.

    Note

    For more information on editing existing consignments, see the Updating Existing Consignments page.

    Deallocating a consignment erases any allocation data that consignment holds and changes its state to Unallocated. You can only deallocate consignments that are in a state of Allocated, Manifested, or Manifest Failed.

    Deallocating Individual Consignments

    The Deallocate Consignment endpoint enables you to deallocate a single consignment. To call Deallocate Consignment, send a PUT request to https://api.electioapp.com/consignments/{consignmentReference}/deallocate, where {consignmentReference} corresponds to the consignment that you want to deallocate.

    Once the request is received, PRO deallocates the consignment and returns a code 200 response with no body.

    Deallocate Multiple Consignments

    The Deallocate Consignments endpoint enables you to deallocate multiple consignments in a single operation. To call Deallocate Consignments, send a PUT request to https://api.electioapp.com/consignments/deallocatelist. The body of the request should contain an array listing the {consignmentReference}s of the consignments that you want to deallocate.

    Once the request is received, PRO deallocates each of the listed consignments in turn and returns an array listing the results of each deallocation attempt.

    Deallocate Consignments Example

    This examples shows a request to deallocate three consignments.

    • Deallocate Consignments Request
    • Deallocate Consignments Response

    PUT https://api.electioapp.com/consignments/deallocatelist

    [
        "EC-000-05D-EP2",
        "EC-000-05D-ENQ",
        "EC-000-05D-ENG"
    ]  
    
    [
        {
            "IsSuccess": true,
            "Message": "Consignment deallocation completed successfully",
            "Data": "EC-000-05D-EP2",
            "ApiLinks": null
        },
        {
            "IsSuccess": true,
            "Message": "Consignment deallocation completed successfully",
            "Data": "EC-000-05D-ENQ",
            "ApiLinks": null
        },
        {
            "IsSuccess": true,
            "Message": "Consignment deallocation completed successfully",
            "Data": "EC-000-05D-ENG",
            "ApiLinks": null
        }
    ]
    

    Next Steps

    • Learn about alternative methods of allocating consignments at the Allocating Consignments 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