NAV Navbar

Introduction

GET https://stores.boldapps.net HTTPS/1.1

This API documentation describes the endpoints available when building a custom Store Locator Pages.

The Store Locator API makes is possible for a merchant's customers to view store location information outside of the Store Locator Proxy App Page. To enable a custom Store Locator API, install the Store Locator app and request access to this feature via Bold's Merchant Success team.

Using Our API

GET /front-end/{end_point}?shop={myshopify_domain} HTTPS/1.1
Content-Type: application/json

All Store Locator endpoints require that you pass the shop parameter a long side the endpoint required query parameters.

Endpoints

GET /front-end/{end_point}?shop={myshopify_domain} HTTPS/1.1
Content-Type: application/json

Ensure you have set the Content-Type: application/json header so requests do not fail. You must also include the shop query parameter for your shop for each request.

All of our JSON responses have a standard format. The response data includes all data returned from the endpoint.

Request Parameters

Parameter Type In Description Required
shop string query MyShopify Domain true

Response

All endpoints will return the following along side data requested from endpoint.

Example success response

{
    "status": 200,
    ...,
}

Example error response

{  
   "status": 400,
   "message": "Message about error that occured",
   ...,
}

{
    "status": 401,
    "message": "API access is not enabled for this store.",
    ...,
}

Response Body

Element Description
status The status of the HTTP response
message Unique message about error that occurred

Stores

The following endpoints will enable the use of the Store Locator backend to retrieve store information that has been set up in the merchant admin dashboard for Store Locator.

GET By Postal Code

GET /front-end/get_stores.php?shop={myshopify_domain}&lookup_value={postal_code} HTTPS/1.1
Content-Type: application/json

Successful Stores Found

{
    "status": 200,
    "stores": [
        {
            "latitude": "-97.189479",
            "longitude": "49.811553",
            "summary": "<span class='name'> test-store-1</span><br /><span class='address'> 50 Fultz Blvd</span><br /><span class='city'> Winnipeg</span>, <span class='prov_state'> Manitoba</span> <span class='postal_zip'> R3Y 0L6</span>, <span class='country'> Canada</span>",
            "website": "",
            "updated_at": "2019-03-27 13:46:24",
            "group_name": "Default",
            "distance": "5.562237663529049",
            "name": "test-store-1",
            "address": "50 Fultz Blvd",
            "address2": "",
            "custom_fields": [
                {
                    "field_name": "Not Built Yet",
                    "value": ""
                }
            ]
        },
        {
            "latitude": "-104.049136",
            "longitude": "52.846980",
            "summary": "<span class='name'> test-store-4</span><br /><span class='address'> 819 100 St</span><br /><span class='city'> Tisdale</span>, <span class='prov_state'> Saskatchewan</span> <span class='postal_zip'> S0E 1T0</span>, <span class='country'> Canada</span>",
            "website": "",
            "updated_at": "2019-03-27 13:46:26",
            "group_name": "Default",
            "distance": "584.4828964579211",
            "name": "test-store-4",
            "address": "819 100 St",
            "address2": "",
            "custom_fields": [
                {
                    "field_name": "Not Built Yet",
                    "value": ""
                }
            ]
        },
        {
            "latitude": "-113.497101",
            "longitude": "53.540585",
            "summary": "<span class='name'> test-store-3</span><br /><span class='address'> 10279 Jasper Ave</span><br /><span class='city'> Edmonton</span>, <span class='prov_state'> Alberta</span> <span class='postal_zip'> T5J 1X8</span>, <span class='country'> Canada</span>",
            "website": "",
            "updated_at": "2019-03-27 13:46:26",
            "group_name": "Default",
            "distance": "1197.117544154466",
            "name": "test-store-3",
            "address": "10279 Jasper Ave",
            "address2": "",
            "custom_fields": [
                {
                    "field_name": "Not Built Yet",
                    "value": ""
                }
            ]
        }
    ],
    "providedLat": 49.8458799,
    "providedLng": -97.1330739
}

No Stores Found

{
    "status": 200,
    "stores": [],
    "providedLat": 49.8123718,
    "providedLng": -97.1898472
}

Bad Postal Code

{
    "status": 400,
    "message": "Unable to find lat and long for provided postal code."
}

API Access Not Enabled

{
    "status": 401,
    "message": "API access is not enabled for this store."
}

This endpoint will allow you to retrieve the closest 3 stores nearest to the provided postal code.

URL Parameters

Parameter Type In Description Required
shop string query MyShopify Domain true
lookup_value string query Postal Code Value true

Store Object

Element Type Description
stores array Contains all store JSON found for the postal code provided
providedLat float Approximate latitude for postal code provided
providedLng float Approximate longitude for postal code provided