Let us try an example using just the Basic Parameters:
GET https://dmo.metapack.com/dmoptions/find?key=<API-Key>&wh_code=SL123&c_cc=GBR&c_pc=WC1X8XZ&optionType=HOME&r_t=lgg
The use of lgg returns the cheapest next available delivery option for the specified warehouse. The options returned are for HOME
delivery (to postcode WC1X 8XZ in the United Kingdom, in this case).
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.
The following is an example of the server response (assuming a 200 OK
status):
{ "header":{ "requestId":"81731a76-2d93-43d1-b661-e4da3b213491", "requestDate":"2020-02-17T15:36:02.244Z", "inputParameters":{ "optionType":[ "HOME" ], "c_pc":[ "WC1X8XZ" ], "c_cc":[ "GBR" ], "r_t":[ "lgg" ], "wh_code":[ "SL123" ], "key":[ "<API-Key>" ] }, "responseDate":"2020-02-17T15:36:02.402Z" }, "results":[ { "groupCodes":[ "NEXT" ], "photoUrls":[ ], "telephoneNumber":null, "distance":{ "unit":"m", "value":0 }, "description":null, "carrierServiceCode":"HERMNDG", "long":null, "optionType":"HOME", "countryCode": null, "storeName":"", "shippingCharge":0, "shippingCost":9.99, "lat":null, "delivery":{ "from":"2020-02-18T08:00:00.000Z", "to":"2020-02-18T20:00:59.999Z" }, "address":"", "carrierServiceName":"Courier Service Next Day", "postcode":"", "fullName":"Hermes Courier Service Next Day", "collection":{ "from":"2020-02-17T18:30:00.000Z", "to":"2020-02-17T19:30:59.999Z" }, "storeId":null, "logoUrl":null, "storeTimes":{ }, "carrierCode":"HERMESPOS", "hasDisabledAccess":false, "bookingCode":"HERMNDG/2020-02-17/*-*/*/*-*", "cutOffDateTime":"2020-02-17T18:00:00.000Z" }, { "groupCodes":[ "STANDARD" ], "photoUrls":[ ], "telephoneNumber":null, "distance":{ "unit":"m", "value":0 }, "description":null, "carrierServiceCode":"HERM48", "long":null, "optionType":"HOME", "countryCode": null, "storeName":"", "shippingCharge":0, "shippingCost":9.99, "lat":null, "delivery":{ "from":"2020-02-18T08:00:00.000Z", "to":"2020-02-19T20:00:59.999Z" }, "address":"", "carrierServiceName":"Courier Service 48 Hour", "postcode":"", "fullName":"Hermes Courier Service 48 Hour", "collection":{ "from":"2020-02-17T18:30:00.000Z", "to":"2020-02-17T19:30:59.999Z" }, "storeId":null, "logoUrl":null, "storeTimes":{ }, "carrierCode":"HERMESPOS", "hasDisabledAccess":false, "bookingCode":"HERM48/2020-02-17/*-*/*/*-*", "cutOffDateTime":"2020-02-17T18:00:00.000Z" } ] }
Note
shippingCost
(floating point number) is the amount that a shipper needs to pay for this service.