Select delivery options
Convert delivery or pickup options into live consignments using the Select Option endpoint. Automatically allocate, label, and prepare your packages for manifesting.
Select options as a consignment
This page explains how to to generate consignments and orders by selecting a delivery option.
The Select Option endpoint enables you to record a customer’s choice of delivery or pickup option in the Consignments platform. Consignments generates and allocates a consignment from the details of the selected option.
To call Select Option, send a POST
request to https://api.electioapp.com/deliveryoptions/select/{deliveryOptionReference}
. There is no body content required for the request.
Once it has received the request, the Consignments platform creates a consignment using the details that were passed as part of the original request to get delivery options. Next, the system allocates the consignment in line with the delivery promise specified in the selected option. Generally, this means allocating to the carrier service returned in the original option, but Consignments can allocate to an alternative service in certain circumstances. The delivery option guarantees the delivery promise, but not the carrier service.
The Consignments platform then returns links to the consignment resource that was allocated, a summary of the carrier service that the consignment was allocated to, a link to the relevant package labels, and a ConsignmentLegs
array indicating how many legs the shipment will need. Where a shipment would need multiple legs to complete, the ConsignmentLegs
array shows tracking details for each individual leg.
Select option example
The example shows a request to select a delivery option that has a {deliveryOptionReference}
of EDO-000-6DX-6XP. The Consignments platform creates a consignment with a {consignmentReference}
of EC-000-05B-MMQ, which it then allocates to the carrier service associated with delivery option EDO-000-6DX-6XP. A relevant {consignmentReference}
is returned with a label link, enabling you to get labels for and manifest the consignment.
POST https://api.electioapp.com/deliveryoptions/select/EDO-000-6DX-6XP
{
"StatusCode": 200,
"ApiLinks": [
{
"Rel": "detail",
"Href": "https://api.electioapp.com/consignments/EC-000-05B-MMQ"
},
{
"Rel": "label",
"Href": "https://api.electioapp.com/labels/EC-000-05B-MMQ"
}
],
"Description": "Consignment EC-000-05B-MMQ has been successfully allocated with Carrier X Tracked 48 Signed For for shipping on 17/06/2019 00:00:00 +00:00",
"ConsignmentLegs": [
{
"Leg": 1,
"TrackingReferences": [
"TRK00009823"
],
"CarrierReference": "CARRIER_X",
"CarrierServiceReference": null,
"CarrierName": "Carrier X"
}
],
"CarrierReference": "CARRIER_X",
"CarrierName": "Carrier X",
"CarrierServiceReference": "MPD_T48CX",
"CarrierServiceName": "Tracked 48 Signed For"
}
Next steps
- Learn how to get delivery options for a consignment with our Get delivery options guide.
- Learn how to get pickup options for a consignment with our Get pickup options guide.