Postman Collection

Postman is a free cross-platform API client app that allows you to experiment easily with API requests using a friendly interface.

You can download Postman here for Mac, Windows or Linux. It is also recommended that you set up a free Postman account to enable easy sharing.

Note

You can still use the Postman for Chrome extension, but this is deprecated, and It is therefore recommended that you download your preferred native O/S version.

The Delivery Options Postman collection is designed to supplement the use case examples given in the rest of this section. It should help you quickly visualise how the Delivery Options API functions and what it can offer. It shares a variety of API GET calls that allow you to return options for a variety of use cases (e.g. next available carrier services that can fulfil Home deliveries to a specific postcode, or deliveries to collection points within a specific radius).

Downloading the Collection

You can download the collection by clicking the Run in Postman button below:

Note

If you have already downloaded a previous version, you will be asked whether you wish to create a copy. You are advised to do this rather than overwrite any previous collection.

Using the Collection

Before you can use the collection, you will need to:

  1. Obtain a Delivery Options API  key if you do not already have one. To request a key, contact your Metapack account manager here. Because the key is needed to run every call in the collection for your particular retailer, we have parameterised it so that you only need to enter it once.

    Caution

    Never share your key with anyone.

  2. Learn the basics of Postman. There are also many useful YouTube video tutorials.

  3. Familiarise yourself with the Delivery Options Basic Parameters and Extended Parameters, so that you can make a detailed test call and return some delivery options.

Running a request within the Collection

Your collection, once downloaded, should appear as an expandable series of GET requests in the left hand pane, as shown below.

There is a separate folder within the collection for each optionType - HOME, PUDO and OWNSTORE. Each folder contains the recommended ways of returning options for deliveries to that optionType (i.e. to a particular postcode (HOME), pickup location (PUDO) or 'Click and Collect' point (OWNSTORE)). The use cases within each folder are suggested by the request names.

Note

One request is not dependent on another, and so it is not appropriate to use the Collection Runner or to chain requests together. Simply run the individual requests that suit your particular operation to get an idea of the delivery options that can be returned.

Select a request from the left hand pane, to display the associated call in the middle pane, starting with https:

Postman_Layout.png

Before running the call, you will need to supply values for the parameters shown, including the API key - {{key}}.

Where a specific value is given - e.g. gsc (the return type) and HOME (the optionType) - then you can leave these unless you wish to specifically overwrite them.

Where a variable value has been used, it is enclosed within double braces, e.g. {{c_cc}}, {{wh_code}}, {{c_pc}} and {{key}}.

You need to enter the actual values for these variables in the Metapack Options Postman environment, which is available in the top right hand corner of the application and will have been imported alongside your collection:

Postman_Variables.png

You need to:

  1. Complete the initial values, overriding any of the suggested values that you do not want to use, and entering any that are blank.

  2. Click Reset All to set all the initial values to current values.

Caution

You will need to reset some of the current values after each call.

Once you have saved your parameters, click Send on the main Postman screen to make the call. The response will be returned under the Body in JSON format.

The requests in the collection are by no means exhaustive. If you have particular options that you would like to be added to the collection, please contact us.