You can add the following parameters to exclude certain carrier services that are already set up with various rules:
-
If the delivery is relatively heavy, you can exclude those carrier services that cannot fulfil the order, by setting the estimated weight of the consignment (e_w), and, if there are multiple parcels, some or all of the following:
-
The estimated number of parcels (e_n), and the dimensions of each, using
parcelHeight,parcelWidth,parcelDepthandparcelWeight(refer to Extended Parameters).Note
Delivery Options verifies that the number of parameters given for each of
parcelHeight,parcelWidth,parcelDepthandparcelWeightmatches the estimated number of parcels (e_n).The
consignmentLevelDetailsFlagmust be present and set tofalsein order for the above four parameters to be parsed and used in the calculation. -
The estimated length of the longest dimension of the largest parcel (e_maxdim).
-
The estimated weight of the heaviest parcel (e_maxweight).
-
-
If the delivery is valuable, set the estimated consignment value and currency (e_v and e_v_currency).
-
If payment is required at the point of delivery, set the cod_amount and cod_currency as required.
-
If the delivery is hazardous, set the relevant hazmat_codes.
Here is a simple next day Home delivery example that makes use of the estimated consignment weight parameter e_w. Without this parameter:
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_pc=SL10AG&optionType=HOME&r_t=lsc&incgrp=NEXT
all options are returned, e.g.
{
"header": {
"requestId": "d16f66a2-148b-461e-ac15-82bbace5b245",
"requestDate": "2020-03-19T19:59:22.723Z",
"inputParameters": {
"optionType": [
"HOME"
],
"c_pc": [
"SL10AG"
],
"r_t": [
"lsc"
],
"wh_code": [
"SL123"
],
"key": [
"<API-Key>"
],
"incgrp": [
"NEXT"
]
},
"responseDate": "2020-03-19T19:59:22.807Z"
},
"results": [
{
"groupCodes": [
"NEXT"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "PLPRE1000OC",
"long": null,
"optionType": "HOME",
"countryCode": null,
"storeName": "",
"shippingCharge": 4,
"lat": null,
"delivery": {
"from": "2020-03-20T08:00:00.000Z",
"to": "2020-03-20T10:00:59.999Z"
},
"address": "",
"carrierServiceName": "BEFORE 10 - Early Cut off",
"postcode": "",
"fullName": "DPD BEFORE 10 - Early Cut off",
"collection": {
"from": "2020-03-20T18:30:00.000Z",
"to": "2020-03-20T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "DPD",
"hasDisabledAccess": false,
"bookingCode": "PLPRE1000OC/2020-03-20/*-*/*/*-*",
"cutOffDateTime": "2020-03-20T18:00:00.000Z"
},
{
"groupCodes": [
"NEXT"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "HERMNDG",
"long": null,
"optionType": "HOME",
"storeName": "",
"shippingCharge": 0,
"lat": null,
"delivery": {
"from": "2020-03-21T08:00:00.000Z",
"to": "2020-03-21T20:00:59.999Z"
},
"address": "",
"carrierServiceName": "Courier Service Next Day",
"postcode": "",
"fullName": "Hermes Courier Service Next Day",
"collection": {
"from": "2020-03-20T18:30:00.000Z",
"to": "2020-03-20T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "HERMESPOS",
"hasDisabledAccess": false,
"bookingCode": "HERMNDG/2020-03-20/*-*/*/*-*",
"cutOffDateTime": "2020-03-20T18:00:00.000Z"
},
{
"groupCodes": [
"NEXT"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "RM1STLT",
"long": null,
"optionType": "HOME",
"countryCode": null,
"storeName": "",
"shippingCharge": 3,
"lat": null,
"delivery": {
"from": "2020-03-21T08:00:00.000Z",
"to": "2020-03-21T17:00:59.999Z"
},
"address": "",
"carrierServiceName": "1st Class Letter",
"postcode": "",
"fullName": "Royal Mail 1st Class Letter",
"collection": {
"from": "2020-03-20T18:30:00.000Z",
"to": "2020-03-20T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "ROYALMAIL",
"hasDisabledAccess": false,
"bookingCode": "RM1STLT/2020-03-20/*-*/*/*-*",
"cutOffDateTime": "2020-03-20T18:00:00.000Z"
}
]
}
However, when the same call is used, but the final parameter e_w=10.0 is included:
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_pc=SL10AG&optionType=HOME&r_t=lsc&incgrp=NEXT&e_w=10.0
Royal Mail is automatically excluded, e.g.
{
"header": {
"requestId": "1c26c9b7-ae55-4b02-8f83-11b6770576e4",
"requestDate": "2020-03-19T20:00:56.653Z",
"inputParameters": {
"optionType": [
"HOME"
],
"c_pc": [
"SL10AG"
],
"r_t": [
"lsc"
],
"e_w": [
"10.0"
],
"wh_code": [
"SL123"
],
"key": [
"<API-Key>"
],
"incgrp": [
"NEXT"
]
},
"responseDate": "2020-03-19T20:00:56.752Z"
},
"results": [
{
"groupCodes": [
"NEXT"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "PLPRE1000OC",
"long": null,
"optionType": "HOME",
"countryCode": null,
"storeName": "",
"shippingCharge": 4,
"lat": null,
"delivery": {
"from": "2020-03-20T08:00:00.000Z",
"to": "2020-03-20T10:00:59.999Z"
},
"address": "",
"carrierServiceName": "BEFORE 10 - Early Cut off",
"postcode": "",
"fullName": "DPD BEFORE 10 - Early Cut off",
"collection": {
"from": "2020-03-20T18:30:00.000Z",
"to": "2020-03-20T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "DPD",
"hasDisabledAccess": false,
"bookingCode": "PLPRE1000OC/2020-03-20/*-*/*/*-*",
"cutOffDateTime": "2020-03-20T18:00:00.000Z"
},
{
"groupCodes": [
"NEXT"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "HERMNDG",
"long": null,
"optionType": "HOME",
"countryCode": null,
"storeName": "",
"shippingCharge": 0,
"lat": null,
"delivery": {
"from": "2020-03-21T08:00:00.000Z",
"to": "2020-03-21T20:00:59.999Z"
},
"address": "",
"carrierServiceName": "Courier Service Next Day",
"postcode": "",
"fullName": "Hermes Courier Service Next Day",
"collection": {
"from": "2020-03-20T18:30:00.000Z",
"to": "2020-03-20T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "HERMESPOS",
"hasDisabledAccess": false,
"bookingCode": "HERMNDG/2020-03-20/*-*/*/*-*",
"cutOffDateTime": "2020-03-20T18:00:00.000Z"
}
]
}
Note
For a more complex example, refer to Making a Test Call using Extended Parameters.