Locate a Store
Introduction
The Store Locators
API provides a list of participating locations where consumers can load funds, locate a product, or use their digital wallet to pay.
Users have the option to display the list of locations using the physical address or geographic coordinates.
Locating a Participating Store
Method | Service | Service Type |
---|---|---|
GET | locator | Synchronous |
- Post-Production URI:
https://api.certification.blackhawknetwork.com/locator/v1/stores
- Production URI:
https://api.blackhawknetwork.com/locator/v1/stores
HTTP Header
The parameters below must be included in the header of the request:
Name | Description | Type | Required | Allowed Values |
---|---|---|---|---|
mid | The merchant ID. A unique identifier issued by Blackhawk Network for the merchant who is making the call. | String | Y | Digits 0-9 or empty string (" ") |
tenant_id | This is a unique identifier issued by Blackhawk Network for the tenant who is making the call. | String | Y | Digits 0-9, alpha (a-z, A-Z), or empty string (" ") |
trace_id | A unique identifier for each request. Must not exceed 32 characters. | String | Y | Digits 0-9, alpha (a-z, A-Z), hyphen, and underscore |
Your header may look similar to the following example:
Content-Type: application/json
mid: 60300112329
tenant_id: ZXF15KX4R6L9PK18NTL5B0KL70
trace_id: 2132r32r32
Query Parameters
To retrieve a list of store locations, the following parameters can be included in the query:
Parameter | Description | Type | Required | Default Value |
---|---|---|---|---|
| The campaign identification assigned to your account. Max length: 45 characters | String | N | None |
| The latitude of your current location. This takes priority over Requires the | String | N | None |
| The longitude of your current location. This takes priority over Requires the | String | N | None |
| A pagination parameter. Determines how many pages of records you receive, which you may opt to change after getting an initial list of results. | Integer | N | 0 |
| A pagination parameter. The number of records that are displayed on a page. Max allowed value: 50 | Integer | N | 10 |
| A comma separated list of the product UPCs that should be located in participating stores. Must not exceed 15 characters. | String | N | |
| The maximum desired distance from the current location. Users can use the metric or imperial measurement system. If no unit is added, results will default to Choose one of the following values:
| String | N | MI |
| The transaction type you wish to locate. No more than 3 values are allowed. Use the following values:
| String | N | None |
zip | A valid 5-digit U.S. zip code.This field becomes required if lat and lng are not available. | String | N | None |
See Store Locators Response Object for an example request.
URI: https://api.blackhawknetwork.com/locator/v1/stores?campaign=A8KVZCMG9Y49DB77B5HH3HTL7H&lat=37.7706&lng=-122.2648&page=0&pageSize=10&txn=Activation&product=987654321,987654322,987654323&radius=5000mi&trace_id=2132r32r32
Response
Store Locators Response Object
The Store Locators API will return a response containing an HTTP status code in the header and a JSON object in the body. This response will tell us if the inquiry was successful and display the location information for participating stores.
GET https://api.blackhawknetwork.com/locator/v1/stores?campaign=A8KVZCMG9Y49DB77B5HH3HTL7H&lat=37.7706&lng=-122.2648&page=0&pageSize=10&txn=Activation&product=987654321,987654322,987654323&radius=5000mi&trace_id=2132r32r32 HTTP/1.1
Accept-Encoding: gzip,deflate
Connection: Keep-Alive
{
"locations": [
{
"siteId": "LZTP3MSCSGGRZP8C9NQ2SMXN3R",
"siteName": "Trimmer SPA Store",
"contactName": "STORE MANAGER",
"addressLine1": "3382 Murphy Canyon Rd",
"city": "San Diego",
"state": "CA",
"zipCode": "92123-2654",
"country": "USA",
"latitude": 32.8084,
"longitude": -117.1349,
"formattedAddress": "3382 Murphy Canyon Rd;San Diego, CA 92123-2654",
"sort": 448.4423753762137,
"phoneNumbers": [
{
"number": "8746354733",
"type": "WORK"
}
],
"productId": "987654321"
}
],
"size": 10,
"totalPages": 1,
"totalElements": 1,
"numberOfElements": 1,
"number": 0,
"first": true,
"last": true
}
Name | Description |
---|---|
siteId | The site identification number. |
siteName | A descriptive name for the site. |
contactName | The contact name for the location. |
addressLine1 | The first line of the location's address. |
addressLine2 | The second line of the location's address. |
addressLine3 | The third line of the location's address. |
city | The location's city. |
state | The location's state. |
zipCode | The location's zip code. |
country | The location's country. |
latitude | The location's latitude. |
longitude | The location's logitude. |
sort | The distance of the participating store(s) from your current latitude and longitude. The results will be displayed in increasing order in the value specified in radius . |
phoneNumbers | A JSON object with a list of the location's phone information. See Phone Numbers object for more information. |
productId | Specifies which product is available at the site. |
size | The total number of elements allowed to fit on the page, designated by the user. |
totalPages | The total amount of pages that contain results. |
totalElements | The total number of results from the query. |
numberOfElements | The total number of results included on the page. |
number | The number of pages included in the results. |
first | Indicates whether the current page is first. |
last | Indicates whether the current page is last. |
Phone Numbers object
Name | Description |
---|---|
| The phone number for a participating location. |
| The type of number listed for a participating location. Value options:
|
HTTP Status Codes
HTTP response codes are used to indicate the outcome of the request.
The following table shows the HTTP codes and their meanings.
HTTP Status Code | Status Code Description | Comments |
---|---|---|
200 | OK | The request has been validated and processed. |
400 | Bad request | Check the body parameters to ensure they are correct and contain no special characters or spaces, then try again. |
403 | Forbidden request | The request is not supported for the user or user credentials. |
404 | Not Found | The server is unable to find the requested resources. |
500 | Server Error | The service is experiencing a technical error. Try again in a few minutes. |
Updated 16 days ago