Location API

Find an ABC Supply location by city, state, longitude and latitude, and other criteria. View geography hierarchies and key branch attributes such as products and services offered, branch hours and contacts.

The Search Branches endpoint returns a list of branches based on provided search criteria, such as location, name, storefront, city, postal code, state, and branch number. Branch details returned include contact information, manager details, hours of operation, products, services, branch website link, and nearby branches.

Location API

Search Branches

GET /branches

Search for ABC Supply branches

Authorization

OAuth 2.0 server or user token with the location.read scope.

Request

Query Parameters to Search by Locale

Name

Type

Description

lat

float

The latitude coordinate for which you wish to obtain the closest branch.

long

float

The longitude coordinate for which you wish to obtain the closest branch.

distance

integer

The distance in miles (radius) to filter the branches from the specified latitude and longitude.

Query Parameters to Search by State

Name

Type

Description

state

string

The two-letter state abbreviation to use for the branch search (e.g., “WI”).

Example Request

Request to search branches within a given radius from a specified latitude and longitude.

GET /api/location/v1/branches?lat=51.5&long=41.4&distance=10 HTTP/1.1
Host: partner.abcsupply.com
Authorization: Bearer <TOKEN>
Expand

Example Request

Request to search branches within a specified state.

GET /api/location/v1/branches?state=IL HTTP/1.1
Host: partner.abcsupply.com
Authorization: Bearer <TOKEN>
Expand

Response

Example Response

Response when searching by latitude, longitude, and distance or by state.

[
    {
        "branch": {
            "number": "409",
            "name": "ABC Supply - Billings, MT",
            "storefront": "abc",
            "distance": 8,
            "status": "active",
            "type": "primary"
        },
        "address": {
            "addressLine1": "3404 Kenilworth Ave",
            "addressLine2": "N/A",
            "addressLine3": "N/A",
            "city": "Hyattsville",
            "state": "MD",
            "postal": "20781",
            "country": "USA"
        },
        "locale": {
            "lat": "51.0",
            "long": "41.9",
            "timeZoneCode": "ET",
            "timeZoneDescription": " US-CAN Eastern Timezone"
        },
        "contact": {
            "phones": [
                "3043651700 - ext 1234",
                "3043651700 - ext 4567"
            ],
            "emails": [
                "[email protected]",
                "[email protected]"
            ],
            "fax": "3043651700"
        },
        "manager": {
            "firstName": "Ryan",
            "lastName": "Mannick",
            "email": "[email protected]",
            "title": "Managing Partner",
            "pictureUrl": "https://managerimages.abcsupply.com/managerimages/020797.jpg"
        },
        "hoursOfOperation": [
            {
                "type": "DAILY",
                "days": "MON - FRI",
                "open": "7 AM",
                "close": "7 PM",
                "notes": "Closed on Weekends"
            },
            {
                "type": "WEEKEND",
                "days": "SAT",
                "open": "9 AM",
                "close": "6 PM",
                "notes": ""
            },
            {
                "type": "WEEKEND",
                "days": "SUN",
                "open": "11 AM",
                "close": "4 PM",
                "notes": ""
            },
            {
                "type": "OFF_SEASON",
                "days": "MON -FRI",
                "open": "12 AM",
                "close": "6 PM",
                "notes": "Winter Hours of Operation 11/22 - 03/31"
            }
        ],
        "links": {
            "self": "https://partners.abcsupply.com/api/location/v1/branches/409",
            "website": "https://www.abcsupply.com/location/409"
        }
    },
    {
        "branch": {
            "number": "662",
            "name": "ABC Supply - Lenexa, KS",
            "storefront": "abc",
            "distance": 10,
            "status": "active",
            "type": "primary"
        },
        "address": {
            "addressLine1": "3404 Kenilworth Ave",
            "addressLine2": "N/A",
            "addressLine3": "N/A",
            "city": "Hyattsville",
            "state": "MD",
            "postal": "20781",
            "country": "USA"
        },
        "locale": {
            "lat": "51.0",
            "long": "41.9",
            "timeZoneCode": "ET",
            "timeZoneDescription": " US-CAN Eastern Timezone"
        },
        "contact": {
            "phones": [
                "3043651700 - ext 1234",
                "3043651700 - ext 4567"
            ],
            "emails": [
                "[email protected]",
                "[email protected]"
            ],
            "fax": "3043651700"
        },
        "manager": {
            "firstName": "Ryan",
            "lastName": "Mannick",
            "email": "[email protected]",
            "title": "Managing Partner",
            "pictureUrl": "https://managerimages.abcsupply.com/managerimages/020797.jpg"
        },
        "hoursOfOperation": [
            {
                "type": "DAILY",
                "days": "MON - FRI",
                "open": "7 AM",
                "close": "7 PM",
                "notes": "Closed on Weekends"
            },
            {
                "type": "WEEKEND",
                "days": "SAT",
                "open": "9 AM",
                "close": "6 PM",
                "notes": ""
            },
            {
                "type": "WEEKEND",
                "days": "SUN",
                "open": "11 AM",
                "close": "4 PM",
                "notes": ""
            },
            {
                "type": "OFF_SEASON",
                "days": "MON -FRI",
                "open": "12 AM",
                "close": "6 PM",
                "notes": "Winter Hours of Operation 11/22 - 03/31"
            }
        ],
        "links": {
            "self": "https://partners.abcsupply.com/api/location/v1/branches/662",
            "website": "https://www.abcsupply.com/location/662"
        }
    }
]
Expand

Name

Type

Description

branch

object

The object describing the branch.

branch.number

string

The unique branch number.

branch.name

string

The branch name., including the city and state.

branch.storefront

string

The storefront or branding of the branch (e.g., “abc”, “lw”, “tci”). ABC Supply is the only storefront supported at this time.

branch.distance

float

The distance in miles between the branch and the coordinate specified in the request, if applicable.

branch.status

string

The current operational status of the branch (e.g., “active”, “inactive”).

branch.type

string

The type of the branch (e.g., “primary”, “warehouse”).

address

object

The object describing the address of the branch.

address.addressLine1

string

The first line of the branch’s address including the street number and street name.

address.addressLine2

string

The second line of the branch’s address, which may include additional information like building numbers.

address.addressLine3

string

The third line of the branch’s address, often used for more specific location information or additional directions.

address.city

string

The city where the branch is located.

address.state

string

The two-digit state abbreviation code where the branch is located (e.g. “WI”, “IL”).

address.postal

string

The postal or zip code of the branch.

address.country

string

The three-letter ISO 3166-1 country code where the branch is located (e.g. “USA”). “USA” is the only country code supported at this time.

locale

object

The object describing information about the branch geographical location and time zone.

locale.lat

string

The latitude of the branch location.

locale.long

string

The longitude of the branch location.

locale.timeZoneCode

string

The two-letter time zone abbreviation where the branch is located (e.g. “PT”, “CT”, “ET”).

locale.timeZoneDescription

string

The canonical time zone identifier as maintained by ICANN (e.g. “US-CAN Eastern Timezone”).

contact

object

The object describing the branch contacts.

contact.phones[]

array

The list of branch phone numbers with extensions, if applicable.

contact.emails[]

array

The email addresses of branch contacts.

contact.fax

string

The branch fax number.

manager

object

The object describing the branch manager information.

manager.firstName

string

The first name of the branch manager.

manager.lastName

string

The last name of the branch manager.

manager.email

string

The email address of the branch manager.

manager.title

string

The title or role held by the branch manager (e.g., “Branch Manager”, “Managing Partner”).

manager.pictureUrl

string

The URL of the branch manager’s profile image.

hoursOfOperation

array

The list of the hours of operation of the branch.

hoursOfOperation[].type

string

The type of hours operation or service (e.g., “DAILY”, “WEEKEND”, “OFF_HOURS”).

hoursOfOperation[].days

string

The abbreviated day name when the branch is open or operational (e.g., “MON – FRI”, “SAT”, “SUN”).

hoursOfOperation[].open

string

The opening time of the branch.

hoursOfOperation[].close

string

The closing time of the branch.

hoursOfOperation[].notes

string

The additional notes or information about the branch hours of operation.

links

object

The object containing reference links for the branch.

links.self

string

The API reference link for the branch.

links.website

string

The link to for the abcsupply.com branch webpage.

HTTP Status Codes

Name

Type

Description

400

Bad Request

Check the Request to make sure the Request Body and Parameters are passed correctly based on the API documentation.

404

Object Not Found

The request returned empty or no object. Please check the object identifier.

Additional Examples

Not Applicable