arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Post Code Lookup

Discover how the Post Code Lookup API fetches information related to postal codes, aiding developers in various applications.

The Post Code Lookup API provides developers with the ability to fetch information related to postal codes. This API offers three main functionalities:

  • Fetching postal codes for a given latitude and longitude within a specified range

  • Fetching latitude and longitude for a given postal code

  • Fetching latitude and longitude for a partial postal code

hashtag
Fetch Postal Code for Latitude Longitude in a Given Range

Fetches the postal code for a specific location based on its latitude and longitude. The API can also return postal codes for locations within a specified distance range from the provided latitude and longitude. To get the postal code, you will need to call /geocode endpoint with the POST method.

hashtag
Request

hashtag
Endpoint

https://<host>/rest/s1/api/geocode

hashtag
Header

Content-Type:​ application/json

hashtag
Body

Parameter
Description
Required (Y/N)

Note:

  • pt and d parameters are required to get the post codes

  • d = 0 will fetch exact post code value for passed latitude and longitude

  • d

hashtag
Response

hashtag
Status Code

HTTP/1.1 200 OK

hashtag
Headers

Content-Type: application/json

hashtag
Body

Parameter
Description

hashtag
Fetch latitude longitude for a postal code

Fetches the latitude longitude for a specific postal code. To look up the latitude longitude you will need to call the endpoint with the POST method.

hashtag
Request

hashtag
Endpoint

https://<host>/rest/s1/api/geocode

hashtag
Header

Content-Type:​ application/json

hashtag
Body

Parameter
Description
Required (Y/N)

hashtag
Response

hashtag
Status Code

HTTP/1.1 200 OK

hashtag
Headers

Content-Type: application/json

hashtag
Body

Parameter
Description

hashtag
Fetch latitude longitude for a partial postal code

Fetches the latitude longitude for a partial postal code. This API fetches all the latitude and longitude matching the partial postal code. To look up the latitude longitude for a partial postal code you will need to call the endpoint with the POST method.

hashtag
Request

hashtag
Endpoint

https://<host>/rest/s1/api/geocode

hashtag
Header

Content-Type:​ application/json

hashtag
Body

Parameter
Description
Required (Y/N)

hashtag
Response

hashtag
Status Code

HTTP/1.1 200 OK

hashtag
Headers

Content-Type: application/json

hashtag
Body

Parameter
Description

Facility

Explore API and data feeds within the 'Facility' documentation.

> 0 will fetch post codes within the given distance

location

The latitude and longitude points of the postal code

q

The query parameter

N

fq

Applies a filter to the query search results

N

pt

The latitude and longitude of the location

N

d

The distance from which postal code needs to be fetched

numfound

The number of results found

postcode

The postal code for the provided latitude and longitude

latitude

The latitude of the postal code

longitude

The longitude of the postal code

country

The country of the provided postal code

country-code-ID

The country code ID of the provided country

postcode

The postal code

Y

postcode

The postal code for the provided latitude and longitude

latitude

The latitude of the postal code

longitude

The longitude of the postal code

country

The country of the provided postal code

country-code-id

The country code ID of the provided country

location

The latitude and longitude points of the postal code

postcodelike

The partial postal code

Y

fields

The data fields or attributes that are included in the response body of the API call

Y

latitude

The latitude of the postal code

longitude

The longitude of the postal code

N

{
  "json": {
    "params": {
      "q": "*:*",
      "fq": "{!geofilt sfield=location}",
      "pt": "18.180555,-66.749961",
      "d": "10"
    }
  }
}
{
  "responseHeader": {
    "status": 0,
    "QTime": 2,
    "params": {
      "json": "{\"params\":{\"q\":\"*:*\",\"fq\":\"{!geofilt-sfield=location}\",\"pt\":\"18.180555,-66.749961\",\"d\":\"10\"}}"
    }
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "numFoundExact": true,
    "docs": [
      {
        "postcode": "601",
        "latitude": "18.180555",
        "longitude": "-66.749961",
        "country": "USA",
        "country-code-id": "601-USA",
        "location": "18.180555,-66.749961",
        "_version_": 1752733513051799552
      }
    ]
  }
}
{
  "json": {
    "query": "postcode:10001"
  }
}
{
  "response": {
    "numFound": 1,
    "start": 0,
    "numFoundExact": true,
    "docs": [
      {
        "postcode": "10001",
        "latitude": "40.750636",
        "longitude": "-73.997177",
        "country": "USA",
        "countryCodeAlpha3": "USA",
        "countryCodeAlpha2": "US",
        "country-code-id": "10001-US",
        "location": "40.750636,-73.997177",
        "_version_": 1790686106947158016
      }
    ]
  }
}
{
  "json": {
    "query": "postcodelike:6011",
    "fields": ["latitude", "longitude"]
  }
}
"response": {
 "numFound": 2,
 "start": 0,
 "numFoundExact": true,
 "docs": [
   {
     "latitude": "40.130099",
     "longitude": "-85.760763"
   },
   {
     "latitude": "32.754272",
     "longitude": "-97.083196"
   }
 ]
}

Store Lookup

Discover how the Store Lookup API facilitates finding stores accepting BOPIS orders near the customer's location using the POST method.

The API allows to look up the stores accepting BOPIS orders near the customer’s location using the POST method.

hashtag
Request

hashtag
Endpoint

https://< host >/rest/s1/api/stores

Method: POST

Example: Host: https://demo-maarg.hotwax.io/rest/s1/api/store

hashtag
Header

Content-Type: application/json

hashtag
Body

hashtag
Parameters

Parameter
Description
Required (Y/N)

hashtag
Response

hashtag
Status Code

HTTP/1.1 200 OK

hashtag
Headers

Content-Type: application/json

hashtag
Body

Parameters
Description

hashtag
Note

hashtag
Filters

Filter is a parameter that allows you to narrow down the results of a query or search to only include items that meet specific criteria. For storeLookup API, users can filter results for each parameter given in the response:

Parameter Name
Description
circle-info

Spaces in Filter Values: When filtering by parameters containing spaces (e.g., storeName, city, primaryFacilityGroupName), replace spaces with + (plus signs) for the storeLookUp API.

Example: To filter for the store name "Time Square", use: storeName: Time+Square

hashtag
Valid values of storeType

  • RETAIL

  • WAREHOUSE

  • RETAIL_STORE

  • OUTLET_WAREHOUSE

distance

The distance from the passed latitude-longitude

N

sortBy

Sort data based on the attribute, for example: "storeDistance asc" sorts results by distance

N

keyword

Keyword search (only on storeName, storeCode, and externalId)

N

fieldsToSelect

The list of fields to select, all the fields can be filtered in response

N

storeType

The type of the store

storeName

Store Name

externalId

The Id of the store in the external reference source

primaryFacilityGroupId

The Id of the primary facility group

primaryFacilityGroupName

primaryShopifyShopId

The Id of the primary Shopify Shop

address1

The primary address of the store

address2

The secondary address of the store

directions

Specific instructions for locating the store

city

City

postalCode

Postal Code

country

Country

countryCode

Country Code

stateCode

State Code

latLon

The latitude and longitude of the facility

<day_of_week>_open

The opening time of the store on the day of a week

<day_of_week>_close

The closing time of the store on the day of a week

primaryShopifyShopId

The Id of the primary Shopify Shop

city

City

postalCode

Postal Code

countryCode

Country Code

stateCode

State Code

latlon

The latitude and longitude of the facility

OUTLET_STORE

  • DISTRIBUTION_CENTER

  • viewSize

    The total number of results to be fetched in the API response

    N

    viewIndex

    Index of the view in pagination.

    N

    filter

    Filter records based on the passed parameters

    N

    point

    The latitude-longitude of a specific location to find nearby stores

    numFound

    The number of results found

    docs

    The array of results found

    docType

    Reference index

    storeCode

    The ID of the facility (store) in HotWax

    identifier

    DocType-Identifier

    country

    Country

    country

    Country

    storeType

    The type of the store

    storeName

    Store Name

    externalId

    The Id of the store in the external reference source

    primaryFacilityGroupId

    The Id of the primary facility group

    primaryFacilityGroupName

    The name of the primary facility group

    N

    {
      "viewSize": 40,
      "filters": ["storeType: RETAIL_STORE"],
      "point": “lat,lon”,
      "distance": 50,
      "sortBy": "storeName asc",
      "keyword": "value",
      "fieldsToSelect": <values>
    }
    "response":
    {
      "numFound": 1,
      "start": 0,
      "numFoundExact": true,
      "docs": [
       {
        "docType": "STORE",
        "storeCode": "524",
        "Identifier": "524",
        "docType-Identifier": "STORE-524-STORE-524",
        "storeType": "RETAIL_STORE",
        "storeName": "Orlando",
        "externalId": "524",
        "primaryFacilityGroupId": "10862657599",
        "primaryFacilityGroupName": "Not naked",
        "primaryShopifyShopId": "10862657599",
        "10862657599_pref": "true",
        "fac_grp_pref": "true",
        "address1": "8200 Vineland Ave.,",
        "address2": "#136",
        "directions": "Near Mall",
        "city": "Orlando",
        "postalCode": "32821",
        "country": "United States",
        "countryCode": "USA",
        "state": "FlorIda",
        "stateCode": "FL",
        "latlon": "28.3873236,-81.4924445",
        "monday_open": "10:00:00",
        "monday_close": "21:00:00",
        "tuesday_open": "10:00:00",
        "tuesday_close": "21:00:00",
        "wednesday_open": "10:00:00",
        "thursday_open": "10:00:00",
        "thursday_close": "21:00:00",
        "friday_open": "10:00:00",
        "friday_close": "21:00:00",
        "saturday_open": "10:00:00",
        "saturday_close": "21:00:00",
        "sunday_open": "11:00:00",
        "sunday_close": "19:00:00",
        "updatedDatetime": "2023-01-31T05:52:08.794Z",
        "_version_": 1756516139717885953,
        "_root_": "STORE-524-STORE-524"
       }
      ]
     }
    The name of the primary facility grouparrow-up-right