Download OpenAPI specification:Download
The Delivery Options API is an easy-to-use REST-based API that enables you to display relevant delivery choices to
shoppers browsing your eCommerce websites. It works by checking which services can fulfil a shopper’s order and by
which date. It determines which carriers are enabled for your Metapack shipper account, carrier availability,
routing times, and whether a carrier service be used for a shipment's weights and dimensions. It also checks the
operating times of your warehouses.
The results can then be displayed on your product details and checkout pages.
This ensures that you show shoppers only carrier services that can fulfil their orders and display accurate delivery
dates that you can meet. The API integrates with the
Metapack SOAP Shipping API
and Metapack Delivery Manager,
which means that your eCommerce websites reflect automatically all your shipping configuration, such as carriers,
carrier services, and allocation rules.
For more information about the API, go to https://help.metapack.com/.
Retrieve all delivery options that meet specific search criteria.
wh_code required | string This is the code of a warehouse (shipping location) configured for your Metapack shipper account. For more information, see Configuring Shipping and Allocation. Example: wh_code=SL123 |
wh_pc | string Default: "EC1R 4PF" The postal code of the warehouse from which the consignment is to be despatched. Example: wh_pc=SL1 A23 |
wh_cc | string Default: "GBR" The three-letter ISO country code of the address of the warehouse from which the consignment is to be despatched. Example: wh_cc=GBR |
wh_l1 | string Default: "DEFAULT" The first line of the address of the warehouse from which the consignment is to be despatched. Example: wh_l1=Building 5 |
wh_l2 | string Default: "DEFAULT" The second line of the address of the warehouse from which the consignment is to be despatched. Example: wh_l2=50 Bell Road |
wh_l3 | string Default: "DEFAULT" The third line of the address of the warehouse from which the consignment is to be despatched. Example: wh_l3=Westminster |
wh_l4 | string Default: "DEFAULT" The fourth line of the address of the warehouse from which the consignment is to be despatched. Example: wh_l4=London |
key required | string <uuid> Your API key (in UUID format). It is provided by Metapack Support and is generated automatically after your Metapack shipper account is created. It ensures that only the details associated with your shipper account are used to return delivery options. For more information, see Configuring your Security. Example: key=03b2a318-bdf6-49a3-97c4-868ae039de04 |
c_lat | number <double> [ -90 .. 90 ] The latitude coordinate of the delivery address. This is the distance of a place north or south of the equator,
measured in degrees.
Example: c_lat=51.5072 |
c_long | number <double> [ -180 .. 180 ] The longitude coordinate of the delivery address. This is the distance of a place east or west of the Greenwich
meridian, measured in degrees.
Example: c_long=0.1276 |
c_pc | string The postal code of the delivery address (if supported).
Example: c_pc=L1 7AA |
c_cc required | |
c_address_type | string The address type of the delivery address. Example: c_address_type=RESIDENTIAL |
c_l1 | string Default: "DEFAULT" The first line of an unstructured delivery address. Example: c_l1=Flat 5 |
c_l2 | string Default: "DEFAULT" The second line of an unstructured delivery address. Example: c_l2=50 Bell Road |
c_l3 | string Default: "DEFAULT" The third line of an unstructured delivery address. Example: c_l3=Westminster |
c_l4 | string Default: "DEFAULT" The fourth line of an unstructured delivery address. Example: c_l4=London |
consignmentLevelDetailsFlag | boolean Default: true This parameter indicates whether order information is held at consignment level. By default, the value of this
parameter is set to |
e_maxdim | integer Default: 0 The estimated maximum dimensions of the largest parcel in the order, expressed as an integer in centimetres.
The default value is Example: e_maxdim=12 |
e_maxweight | number <float> Default: 0 The weight of the heaviest parcel in the order, expressed as a decimal. The default value is Example: e_maxweight=3 |
dimensions_unit | string Default: "CM" The units used to measure the outer edges of a parcel or a consignment. The Metapack Platform supports both
imperial units and the metric system. The default is metric ( |
weight_unit | string Default: "KG" The volumetric/mass measurement unit of a parcel or consignment. The Metapack Platform supports both imperial
units and the metric system. The default is metric ( |
e_n | integer Default: 1 If possible, estimate the number of parcels because parcel quantity can determine which carriers are selectable.
Example: e_n=3 |
e_w | number <float> Default: 0.01 The estimated weight (in kilograms) of the entire consignment (the sum of all of the parcel weights), expressed
as a double precision floating point number. The total weight can affect your costs and the available carriers.
If provided, the value of this parameter will be split equally across all parcels.
Example: e_w=0.02 |
e_v | number <float> The estimated monetary value (in Example: e_v=2.5 |
e_v_currency | string The three-letter ISO currency code of the currency used by
the Example: e_v_currency=EUR |
parcelHeight | Array of numbers <double> The height of each parcel in the consignment, expressed as a decimal. Enter a comma-separated list of single
precision floating point numbers. The measurement unit is determined by the value of the Example: parcelHeight=1,2.5,1 |
parcelWeight | Array of numbers <double> The weight of each parcel in the consignment, expressed as a decimal. Enter a comma-separated list of single
precision floating point numbers. The measurement unit is determined by the value of the Example: parcelWeight=1,2.2,1.1 |
parcelDepth | Array of numbers <double> The depth (or length) of each parcel in the consignment, expressed as a decimal. Enter a comma-separated list of
single precision floating point numbers. The measurement unit is determined by the value of the Example: parcelDepth=0.3,2.1,1.6 |
parcelWidth | Array of numbers <double> The width of each parcel in the consignment, expressed as a decimal. Enter a comma-separated list of single
precision floating point numbers. The measurement unit is determined by the value of the Example: parcelWidth=1.3,2.2,1 |
cod_amount | number <double> Default: 0 The cash on delivery monetary amount (in |
cod_currency | string The three-letter ISO currency code of the currency used by
the Example: cod_currency=EUR |
hazmat_codes | Array of strings Enter a comma-separated list of hazard codes for any parcel items in the consignment, if applicable.
Example: hazmat_codes=1090 |
skus | string A stock-keeping unit (SKU) is an internal identifier used by the shipping location (warehouse) for each product
(trade item) in a parcel. Enter a list of SKUs for the consignment. Use semicolons to separate parcel groups and
commas to separate products in the same parcel.
Example: skus=x,y;z |
limit | integer >= 1 Use this parameter to limit the number of delivery options returned.
Example: limit=10 |
Array of PUDO (strings) or Array of HOME (strings) or Array of OWNSTORE (strings) Use this parameter to determine the delivery type(s) for which options are returned. If specifying more than one
delivery type, use a comma-separated list. If no values are specified for this parameter, delivery options for
Example: optionType=HOME,PUDO,OWNSTORE | |
multiCountry | boolean Default: false If set to |
radius | integer [ 1 .. 100000 ] Default: 1000 For a |
minown | integer [ 1 .. 20 ] The minimum number of your own “click and collect” stores to be returned as collection points.
Example: minown=1 |
maxown | integer [ 1 .. 50 ] Default: 50 The maximum number of your own “click and collect” stores to be returned as collection points. |
lgg (string) or lsc (string) or lsd (string) or lss (string) or gas (string) or ggg (string) or gsc (string) or gss (string) The three letter code of a return type. If a code starts with Example: r_t=lgg | |
incgrp | Array of strings Enter a comma-separated list of carrier service groups to include in the search for delivery options. Only carrier services in these groups will be considered provided if they satisfy other parameters in the request. By default, all carrier services associated with your Metapack shipper account are considered. For more information, see Creating your Carrier 'Service Groups’. Example: incgrp=STANDARD,RETURNS |
excgrp | Array of strings Enter a comma-separated list of carrier service groups to exclude from the search for delivery options. Carrier services in these groups will not be considered even if they satisfy other parameters in the request. By default, all carrier services associated with your Metapack shipper account are considered. For more information, see Creating your Carrier 'Service Groups’. Example: excgrp=26000156,RETURNS,TRANSFER |
acceptableCollectionSlots | Array of strings <date-time> <= 2 items The date range within which collection is acceptable or possible. To specify the collection window, enter two timestamps separated by a comma. Example: acceptableCollectionSlots=2022-04-05 00:00:00,2022-04-11 23:59:59 |
acceptableDeliverySlots | Array of strings <date-time> <= 2 items The date range within which delivery is possible. To specify the delivery window, enter two timestamps separated by a comma. Example: acceptableDeliverySlots=2022-04-05 00:00:00,2022-04-11 23:59:59 |
custom1 | string You can use this parameter to specify a value that can be subsequently retrieved and used in one or more custom
allocation rules in Metapack Delivery Manager.
Example: custom1=example1 |
custom2 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom2=example2 |
custom3 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom3=example3 |
custom4 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom4=example4 |
custom5 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom5=example5 |
custom6 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom6=example6 |
custom7 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom7=example7 |
custom8 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom8=example8 |
custom9 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom9=example9 |
custom10 | string You can use this parameter to specify a value for use in a custom allocation rule (defined in Delivery Manager).
Example: custom10=example10 |
List of possible delivery options that satisfies find search criteria
Bad Request
Unauthorized
Internal Server Error
Bad Gateway
Service Unavailable
Gateway Timeout
{- "header": {
- "inputParameters": {
- "key": [
- "03b2a318-bdf6-49a3-97c4-868ae039de04"
], - "wh_code": [
- "SL12A"
], - "wh_pc": [
- "EC1R 4PF"
], - "wh_cc": [
- "GBR"
], - "wh_l1": [
- "Building 5"
], - "wh_l2": [
- "50 Bell Road"
], - "wh_l3": [
- "Westminster"
], - "wh_l4": [
- "London"
], - "c_lat": [
- "51.5072"
], - "c_long": [
- "0.1276"
], - "c_pc": [
- "L1 7AA"
], - "c_cc": [
- "GBR"
], - "c_address_type": [
- "RESIDENTIAL"
], - "c_l1": [
- "Flat 5"
], - "c_l2": [
- "50 Bell Road"
], - "c_l3": [
- "Westminster"
], - "c_l4": [
- "London"
], - "e_maxdim": [
- "0"
], - "e_maxweight": [
- "0"
], - "dimensions_unit": [
- "CM"
], - "weight_unit": [
- "KG"
], - "consignmentLevelDetailsFlag": [
- "false"
], - "e_n": [
- "3"
], - "e_w": [
- "0.1"
], - "e_v": [
- "5.0"
], - "parcelHeight": [
- "4.0"
], - "parcelWidth": [
- "3.0"
], - "parcelDepth": [
- "5.0"
], - "parcelWeight": [
- "3.0"
], - "cod_amount": [
- "2.0"
], - "cod_currency": [
- "EUR"
], - "hazmat_codes": [
- "1090"
], - "skus": [
- "x,y;z"
], - "limit": [
- "10"
], - "optionType": [
- "HOME,PUDO,OWNSTORE"
], - "multiCountry": [
- "true"
], - "radius": [
- "1000"
], - "minown": [
- "10"
], - "maxown": [
- "10"
], - "r_t": [
- "lgg"
], - "incgrp": [
- "STANDARD"
], - "excgrp": [
- "RETURNS,TRANSFER"
], - "acceptableCollectionSlots": [
- "2022-04-05 00:00:00,2022-04-11 23:59:59"
], - "acceptableDeliverySlots": [
- "2022-04-05 00:00:00,2022-04-11 23:59:59"
], - "custom1": [
- "example1"
], - "custom2": [
- "example2"
], - "custom3": [
- "example3"
], - "custom4": [
- "example4"
], - "custom5": [
- "example5"
], - "custom6": [
- "example6"
], - "custom7": [
- "example7"
], - "custom8": [
- "example8"
], - "custom9": [
- "example9"
], - "custom10": [
- "example10"
]
}, - "requestDate": "2014-10-31T15:07:16.241Z",
- "requestId": "60604330-f1c6-432b-9b60-21afa18b78ac",
- "responseDate": "2014-10-31T15:07:17.221Z"
}, - "results": [
- {
- "bookingCode": "HGDSFESTD0/2022-04-07/*-*/*/*-*",
- "carrierCode": "PND-01",
- "carrierServiceCode": "MyPack DK PUDO Standard 0001-4999",
- "carrierServiceName": "UPS Next Day",
- "collection": {
- "from": "2022-04-05T00:00:00.000Z",
- "to": "2022-04-05T01:00:00.000Z"
}, - "delivery": {
- "from": "2022-04-08T06:00:00.000Z",
- "to": "2022-04-12T16:00:00.000Z"
}, - "description": "Central London flagship store",
- "fullName": "EVRI PARCEL SHOP NEXT DAY",
- "groupCodes": [
- "STANDARD"
], - "cutOffDateTime": "2022-04-18T17:00:00.000Z",
- "shippingCharge": "2.0",
- "shippingCost": "3.0",
- "lat": "54.7098629",
- "long": "12.3807867",
- "storeTimes": {
- "monday": [
- "00:00-23:59"
], - "tuesday": [
- "00:00-23:59"
], - "wednesday": [
- "00:00-23:59"
], - "thursday": [
- "00:00-23:59"
], - "friday": [
- "00:00-23:59"
], - "saturday": [
- "00:00-23:59"
], - "sunday": [
- "00:00-23:59"
]
}, - "address": "Frederikssundsvej 265, Brønshøj, DNK",
- "postcode": "2700",
- "countryCode": "GBR",
- "distance": {
- "value": "128.2559448",
- "unit": "m"
}, - "storeId": "105674",
- "storeName": "Nærboks Lidl Frederikssundsvej",
- "hasDisabledAccess": false,
- "telephoneNumber": "020 7843 6720",
- "optionType": "PUDO"
}
]
}