Making a Test Call using Extended Parameters

Note

To view Deliery 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.

Let us try an example using some of the Extended Parameters:

GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&c_cc=NLD&wh_code=SL123&c_pc=1083 HN&optionType=HOME&r_t=lsc&parcelHeight=20.5,25.5&parcelWidth=30.5,25.5&parcelDepth=10.5,15.5&e_n=2&parcelWeight=20.5,25.5&e_v=20.0&consignmentLevelDetailsFlag=false&e_maxdim=10

Note

Delivery Options verifies that the number of parameters given for each of parcelHeight, parcelWidth, parcelDepth and parcelWeight matches the estimated number of parcels (e_n).

The consignmentLevelDetailsFlag must be present and set to false in order for the above four parameters to be parsed and used in the calculation.

Options returned by Test Call

The use of lsc causes the call to return the next available delivery option.

The options returned are for HOME delivery (to an Amsterdam postal code in this case). The call filters out those carriers that are unable to handle the dimensions and weights specified.

The response from Delivery Options is in JSON format, and will be in the form of an HTTP 200 OK response if the request is successful. For other possible responses, refer to What are the possible Server Responses?.

The following is an example of the server response (assuming a 200 OK status):

{
    "header": {
        "requestId": "f85817c2-7621-4c72-b0b1-bd700ab168e8",
        "requestDate": "2020-03-19T17:13:17.578Z",
        "inputParameters": {
            "c_pc": [
                "1083 HN"
            ],
            "parcelDepth": [
                "10.5,15.5"
            ],
            "r_t": [
                "lsc"
            ],
            "e_maxdim": [
                "10"
            ],
            "consignmentLevelDetailsFlag": [
                "false"
            ],
            "optionType": [
                "HOME"
            ],
            "parcelHeight": [
                "20.5,25.5"
            ],
            "c_cc": [
                "NLD"
            ],
            "e_n": [
                "2"
            ],
            "parcelWidth": [
                "30.5,25.5"
            ],
            "parcelWeight": [
                "20.5,25.5"
            ],
            "wh_code": [
                "SL123"
            ],
            "e_v": [
                "20.0"
            ],
            "key": [
                "API-Key"
            ]
        },
        "responseDate": "2020-03-19T17:13:17.749Z"
    },
    "results": [
        {
            "groupCodes": [
                "STANDARD"
            ],
            "photoUrls": [],
            "telephoneNumber": null,
            "distance": {
                "unit": "m",
                "value": 0
            },
            "description": null,
            "carrierServiceCode": "PLAIRCLASSIC",
            "long": null,
            "optionType": "HOME",
            "countryCode": null,
            "storeName": "",
            "shippingCharge": 0,
            "lat": null,
            "delivery": {
                "from": "2020-03-24T06:00:00.000Z",
                "to": "2020-03-24T16:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "Air Classic",
            "postcode": "",
            "fullName": "DPD Air Classic",
            "collection": {
                "from": "2020-03-19T18:30:00.000Z",
                "to": "2020-03-19T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "DPD",
            "hasDisabledAccess": false,
            "bookingCode": "PLAIRCLASSIC/2020-03-19/*-*/*/*-*",
            "cutOffDateTime": "2020-03-19T18:00:00.000Z"
        }
    ]
}