Selecting Options
This page explains how to to generate consignments and orders by selecting a delivery option.
Selecting Options As a Consignment
The Select Option endpoint enables you to record a customer's choice of delivery or pickup option in SortedPRO. PRO 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, PRO creates a consignment using the consignment that details 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 PRO can allocate to an alternative service in certain circumstances. The delivery option guarantees the delivery promise, but not the carrier service.
PRO 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.
Note
- For full reference information on the Select Option endpoint, see the Select Option page of the API reference.
- For an example call flow in which consignments are created using Select Order, see the Consumer Options call flow page.
Select Option Example
The example shows a request to select a delivery option that has a {deliveryOptionReference}
of EDO-000-6DX-6XP. PRO 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. PRO then returns the relevant {consignmentReference}
and label link, enabling you to get labels for and manifest the consignment.
POST https://api.electioapp.com/deliveryoptions/select/EDO-000-6DX-6XP
Next Steps
- Learn how to manifest consignments at the Manifesting Consignments page.
- Learn how to pack orders into consignments at the Creating Consignments From Orders page.
- Learn how to retrieve customs docs and invoices at the Getting Customs Docs and Invoices page.