Options for the next 7 days

Returning Home Delivery Options for the next week

Proceed as follows:

  • Use return type ggg to ensure the listing of the cheapest next available delivery option for each carrier 'service group', for the next 20 days.

  • Use acceptableDeliverySlots to limit the date range to 7 days.

    Note

    You will have to keep adjusting these so that they remain up to date.

  • Set the delivery postcode c_pc.

  • Set your optionType (in this case, HOME).

  • Display the returned options on your checkout page.

Here is an example of an API call incorporating the above:

GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&r_t=ggg&optionType=HOME&c_pc=WC1X 8HN&acceptableDeliverySlots=2020-03-11T15:53:38.171Z,2020-03-17T15:53:38.171Z

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

{
    "header": {
        "requestId": "d8bf0888-2cdb-4230-bd30-969be4e5ced6",
        "requestDate": "2020-03-11T12:09:37.297Z",
        "inputParameters": {
            "optionType": [
                "HOME"
            ],
            "c_pc": [
                "WC1X 8HN"
            ],
            "r_t": [
                "ggg"
            ],
            "acceptableDeliverySlots": [
                "2020-03-11T15:53:38.171Z,2020-03-17T15:53:38.171Z"
            ],
            "wh_code": [
                "SL123"
            ],
            "key": [
                "<API-Key>"
            ]
        },
        "responseDate": "2020-03-11T12:09:37.752Z"
    },
    "results": [
        {
            "groupCodes": [
                "EARLY"
            ],
            "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-12T08:00:00.000Z",
                "to": "2020-03-12T10:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "BEFORE 10 - Early Cut off",
            "postcode": "",
            "fullName": "DPD BEFORE 10 - Early Cut off",
            "collection": {
                "from": "2020-03-12T18:30:00.000Z",
                "to": "2020-03-12T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "DPD",
            "hasDisabledAccess": false,
            "bookingCode": "PLPRE1000OC/2020-03-12/*-*/*/*-*",
            "cutOffDateTime": "2020-03-12T18: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-12T08:00:00.000Z",
                "to": "2020-03-12T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "1st Class Letter",
            "postcode": "",
            "fullName": "Royal Mail 1st Class Letter",
            "collection": {
                "from": "2020-03-11T18:30:00.000Z",
                "to": "2020-03-11T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RM1STLT/2020-03-11/*-*/*/*-*",
            "cutOffDateTime": "2020-03-11T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "STANDARD"
            ],
            "photoUrls": [],
            "telephoneNumber": null,
            "distance": {
                "unit": "m",
                "value": 0
            },
            "description": null,
            "carrierServiceCode": "RMSECONDSTL",
            "long": null,
            "optionType": "HOME",
            "countryCode": null,
            "storeName": "",
            "shippingCharge": 0.8,
            "lat": null,
            "delivery": {
                "from": "2020-03-12T08:00:00.000Z",
                "to": "2020-03-13T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "2nd Class Packet",
            "postcode": "",
            "fullName": "Royal Mail 2nd Class Packet",
            "collection": {
                "from": "2020-03-11T18:30:00.000Z",
                "to": "2020-03-11T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RMSECONDSTL/2020-03-11/*-*/*/*-*",
            "cutOffDateTime": "2020-03-11T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "EARLY"
            ],
            "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-13T08:00:00.000Z",
                "to": "2020-03-13T10:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "BEFORE 10 - Early Cut off",
            "postcode": "",
            "fullName": "DPD BEFORE 10 - Early Cut off",
            "collection": {
                "from": "2020-03-13T18:30:00.000Z",
                "to": "2020-03-13T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "DPD",
            "hasDisabledAccess": false,
            "bookingCode": "PLPRE1000OC/2020-03-13/*-*/*/*-*",
            "cutOffDateTime": "2020-03-13T18: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-13T08:00:00.000Z",
                "to": "2020-03-13T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "1st Class Letter",
            "postcode": "",
            "fullName": "Royal Mail 1st Class Letter",
            "collection": {
                "from": "2020-03-12T18:30:00.000Z",
                "to": "2020-03-12T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RM1STLT/2020-03-12/*-*/*/*-*",
            "cutOffDateTime": "2020-03-12T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "STANDARD"
            ],
            "photoUrls": [],
            "telephoneNumber": null,
            "distance": {
                "unit": "m",
                "value": 0
            },
            "description": null,
            "carrierServiceCode": "RMSECONDSTL",
            "long": null,
            "optionType": "HOME",
            "countryCode": null,
            "storeName": "",
            "shippingCharge": 0.8,
            "lat": null,
            "delivery": {
                "from": "2020-03-13T08:00:00.000Z",
                "to": "2020-03-14T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "2nd Class Packet",
            "postcode": "",
            "fullName": "Royal Mail 2nd Class Packet",
            "collection": {
                "from": "2020-03-12T18:30:00.000Z",
                "to": "2020-03-12T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RMSECONDSTL/2020-03-12/*-*/*/*-*",
            "cutOffDateTime": "2020-03-12T18: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-14T08:00:00.000Z",
                "to": "2020-03-14T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "1st Class Letter",
            "postcode": "",
            "fullName": "Royal Mail 1st Class Letter",
            "collection": {
                "from": "2020-03-13T18:30:00.000Z",
                "to": "2020-03-13T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RM1STLT/2020-03-13/*-*/*/*-*",
            "cutOffDateTime": "2020-03-13T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "STANDARD"
            ],
            "photoUrls": [],
            "telephoneNumber": null,
            "distance": {
                "unit": "m",
                "value": 0
            },
            "description": null,
            "carrierServiceCode": "RMSECONDSTL",
            "long": null,
            "optionType": "HOME",
            "countryCode": null,
            "storeName": "",
            "shippingCharge": 0.8,
            "lat": null,
            "delivery": {
                "from": "2020-03-14T08:00:00.000Z",
                "to": "2020-03-16T17:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "2nd Class Packet",
            "postcode": "",
            "fullName": "Royal Mail 2nd Class Packet",
            "collection": {
                "from": "2020-03-13T18:30:00.000Z",
                "to": "2020-03-13T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "ROYALMAIL",
            "hasDisabledAccess": false,
            "bookingCode": "RMSECONDSTL/2020-03-13/*-*/*/*-*",
            "cutOffDateTime": "2020-03-13T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "EARLY"
            ],
            "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-16T08:00:00.000Z",
                "to": "2020-03-16T10:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "BEFORE 10 - Early Cut off",
            "postcode": "",
            "fullName": "DPD BEFORE 10 - Early Cut off",
            "collection": {
                "from": "2020-03-16T18:30:00.000Z",
                "to": "2020-03-16T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "DPD",
            "hasDisabledAccess": false,
            "bookingCode": "PLPRE1000OC/2020-03-16/*-*/*/*-*",
            "cutOffDateTime": "2020-03-16T18:00:00.000Z"
        },
        {
            "groupCodes": [
                "EARLY"
            ],
            "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-17T08:00:00.000Z",
                "to": "2020-03-17T10:00:59.999Z"
            },
            "address": "",
            "carrierServiceName": "BEFORE 10 - Early Cut off",
            "postcode": "",
            "fullName": "DPD BEFORE 10 - Early Cut off",
            "collection": {
                "from": "2020-03-17T18:30:00.000Z",
                "to": "2020-03-17T19:30:59.999Z"
            },
            "storeId": null,
            "logoUrl": null,
            "storeTimes": {},
            "carrierCode": "DPD",
            "hasDisabledAccess": false,
            "bookingCode": "PLPRE1000OC/2020-03-17/*-*/*/*-*",
            "cutOffDateTime": "2020-03-17T18:00:00.000Z"
        }
    ]
}