In order to return valid and meaningful delivery options, the Delivery Options API requires a minimum set of parameters to be passed. These are listed below, together with code samples that show you how to build a call.
To view Delivery Options reference documentation, go to https://metapack-delivery-options-api-v1.redoc.ly/. It is the most up-to-date low-level information about the API.
The parameters do not have to be supplied in the order given below. They can be in any order, provided that they are separated using the
For the other possible parameters that can be passed, refer to Extended Parameters.
The API key provided by Metapack. Refer to Configuring your Security.
The warehouse code as set up in Delivery Manager (refer to Configuring Shipping and Allocation). This serves to identify the required carrier configurations, e.g.
Your Order Management System or equivalent service can determine the required warehouse. Failure to specify a
wh_codewill result in an empty response.
The ISO 3166 alpha-3 three-letter country code of the delivery address. This filters out couriers who cannot deliver to the specified country, although it is not strictly necessary if you are delivering to a specific latitude/longitude and/or postcode that does not cross borders.
If you enter nothing, then
The postal code of the delivery location.
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_cc=NLD&c_pc=1083 HN
If you are presenting delivery options prior to final checkout, i.e. before the consumer has entered the required delivery address, you can use a default postal code. For the purposes of estimation, this should, if possible, be a small town code, rather than one in a large city or the middle of the countryside.
c_latis the latitude coordinate of the search point for the delivery location, whilst
c_longis the longitude coordinate. Both need to be specified as double precision floating point numbers, e.g.
If you are delivering to a single location, you would typically specify either
c_lat/c_long. However, you might use both when delivering to a
HOMEaddress, but with additional
OWNSTOREoptions. In this case,
c_lat/c_longis used for
c_pcis used for
This determines the delivery type(s) for which options are returned:
HOME(for home deliveries),
PUDO(for deliveries to pickup/drop off points), and/or
OWNSTORE(for 'Click and Collect').
If specifying more than one
optionType, use a comma-separated list, e.g.
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_cc=NLD&c_pc=1083 HN&c_lat=52.33646&c_long=4.884971&optionType=HOME,PUDO
If you enter no
optionType, then options for all types (
HOME,PUDO,OWNSTORE) are returned.
This stands for 'return type'. Specify a single three-letter code, from the following:
lgg- Returns the cheapest next available delivery option for each carrier 'service group'.
The 'cheapest' service is based on cost (as paid by you, the retailer, to the carrier).
If a carrier service is in more than one carrier 'service group', then, each time that service is selected, it will cause the associated group to appear. So, in
gggqueries, you may see 'service groups' appear more than once in the response.
lsc- Returns the next available delivery option for each carrier service.
ggg- Returns the cheapest delivery option for each carrier 'service group', for the next 20 days.
gsc- Returns the delivery options for each carrier service, for the next 20 days.
Where a code starts with 'l', it signifies List, and where it starts with 'g', it signifies Grid. The second letter distinguishes between carrier 'service groups' ('g'), and carrier services ('s').
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_cc=NLD&c_pc=1083 HN&c_lat=52.33646&c_long=4.884971&optionType=HOME,PUDO&r_t=lsc
If you omit the
r_t parameter, then options will be returned based on the default Delivery Manager allocation hierarchy, i.e.
Prioritised service (if one has been selected automatically via the Carrier Allocation Rules).
Shipping cost (the system will always try and select the cheapest service where there is no prioritised service).
Earliest despatch (if two services cost the same, the one that leaves the warehouse first will be chosen).
Earliest delivery (if two services cost the same and leave the warehouse at the same time, the one that can deliver first is selected),