• My Account
  • Docs
  • Catalog
  • Status
Show / Hide Table of Contents

Getting Postal Addresses for a Postcode

This request demonstrates how to get the postal addresses for a specified postcode:

GET /world/GB/addresses?postcode=LS23%206TR HTTP/1.1
Host: api.whenfresh.com
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/ld+json

The response for the returned PostalAddress resources will look like this:

HTTP/1.1 200 OK
Content-Type: application/ld+json
{
    "@context": "https://api.whenfresh.com/.hydra/context.jsonld",
    "@type": "hydra:Collection",
    "manages": {
        "property": "rdf:type",
        "object": "PostalAddress"
    },
    "member": [
       {
          "@id": "https://api.whenfresh.com/world/gb/addresses/8e05h·0",
          "@type": "PostalAddress",
          "catalog": {
            "@id": "https://api.whenfresh.com/world/gb/addresses/8e05h·0/catalog",
            "@type": "Catalog"
          },
          "label": "1 Spa Mews"
       },
       {
          "@id": "https://api.whenfresh.com/world/gb/addresses/8e05i·0",
          "@type": "PostalAddress",
          "catalog": {
            "@id": "https://api.whenfresh.com/world/gb/addresses/8e05i·0/catalog",
            "@type": "Catalog"
          },
          "label": "2 Spa Mews"
       }
    ],
    "totalItems": 2
 }

Next steps...

The catalog link for any postal address can be used when Retrieving the Catalog for a Postal Address or when Purchasing Variables from a Catalog.

  • Improve this Doc