API Menu

ABC Supply APIs

Location API

The Branch Location API provides you with the ability to easily search for and find detailed information about ABC Supply branches.

Results are:

  • filterable by the storefront and by branchNumber, districtNumber, regionNumber
  • branches with warehouses and store hours
  • Get branch products and services
  • branch details – use v2/branches?branchNumber={branchNumber}
  • TCI user locations and proximity branches (In-progress)

Authentication

All calls to the API need these 2 headers in your http request:

  • client_id: [value provided by the enterprise application team]
  • client_secret: [value provided by the enterprise application team]

Usage

Geography Experience API retrieves the geography data based on the regions, branches and districts. The V2 GET: /branch allows you to retrieve branch information using the several parameters such as storefront, branch number, district number, region number, proximity branch, radius distance from longitude and latitude and user id of the associate with the specific branch responsibilities.

Resources are divided in 2 subresources :

  • Branches
  • States

API Usage

  • Base API URL :

https://abcsupply{env}-digital-geography.us-e2.cloudhub.io/api/v2

Enum env : ['dev', 'test', '']

End Points

RESOURCE: GET /branches

DESCRIPTION: The /branches resource allows you to retrieve information about ABC branches. You can filter your result using several parameters such as storefront, branch number, district number, region number, proximity branch, radius distance from longitude and latitude, and user id of the associate with the specific branch responsibilities.


Request


curl "https://abcsupply{env}-digital-geography.us-e2.cloudhub.io/api/v2/branches" \
-H "client_id: " \
-H "client_secret: "

GET /api/v2/branches HTTP/1.1
Host: abcsupply{env}-digital-geography.us-e2.cloudhub.io:443
client_id:
client_secret:


const headers = new Headers();
headers.append('client_id', '');
headers.append('client_secret', '');

const init = {
method: 'GET',
headers
};

fetch('https://abcsupply{env}-digital-geography.us-e2.cloudhub.io/api/v2/branches', init)
.then((response) => {
return response.json(); // or .text() or .blob() ...
})
.then((text) => {
// text is the response body
})
.catch((e) => {
// error in e.message
});

import requests

url = 'https://abcsupply{env}-digital-geography.us-e2.cloudhub.io/api/v2/branches'
headers = {'client_id': '','client_secret': ''}

req = requests.get(url, headers=headers)

print(req.status_code)
print(req.headers)
print(req.text)

Parameters

Environment
env String Required Enum
enum values:
'dev'
'test'
Organization Code
organizationCode Array of String
Integrates organization
'ABC'
'LW'
Branch Number
branchNumber Array of String
Either this or branchNumbers (with s) is required. If both are passed, branchNumber is ignored.
'101'
'102'
Branch Numbers
branchNumbers String
List of branches delimited by comma (string CSV). Either this or branchNumber is required. If both are passed, branchNumber is ignored.
'101, 102'
District Numbers
districtNumbers Array of String
Code identifying the district
'721'
State
state Array of String
Code identifying the state
Open For Business
openForBusiness String
Indication if branch is open to do business
Type Code
typeCode Array of String
Indicates type of branch
'BCH'
'LWB'
'TCIB'
Latitude
latitude String
Latitude of branch
40.021200
Longitude
longitude String
Longitude of branch
74.943700
Radius
radius Number
Radius search. Use for searching branches from latitude and longitude
50
Proximity Numbers
proximityBranch String
Code identifying the proximity
150
User Id
userId String
Network user name as administered in POS which may be different than Active Directory or Otka. Use to filter branches based on user’s responsibilities
MM040017
Select
select String
If this is not passed or if value is ‘default’, warehouses collections will be included in the return payload. Also hours collections will be included unless excludeHours=true is passed.
base
Embed
embed Union
If select query parameter is base (select=base), additional collection of objects will be included in the return payload. Example embed=warehouses&embed=hours will include warehouses and hours in the payload.
'hours'
'productsandservices'
Exclude Hours
excludeHours Boolean
true if hours are not desired in the payload. Default is false.
true
Store Front
storeFront String Enum
Flag to filter accounts by the storefront that it belongs to.
Enum values: abc, tci, lw, bradco, norandex
abc
Page
page Number
Pagination
Default Value: 1
Page Size
pageSize Number
Total page size. Passing -1 will retrieve all branches on page 1
Default Value: 50
Headers
client_id String Required
client_secret
String Required

Response

Body

  • Media type: application/json
  • BranchesCollectionResponse


{
  "pagination": {
    "currentPage": 2,
    "pageSize": 50,
    "totalPages": 16,
    "totalItems": 799
  },
  "properties": {
    "userLocationNumber": "743"
  },
  "branches": [
    {
      "organizationCode": "ABC",
      "branchNumber": "123",
      "divisionCode": "ABC",
      "erpSystem": "POS",
      "regionNumber": "234",
      "districtNumber": "345",
      "MBACode": "456",
      "storefront": "abc",
      "brandName": "ABC Supply",
      "branchName": "ABC Supply Company",
      "addressType": "Office",
      "addressLine1": "123 Supply Ave",
      "city": "Anytown",
      "state": "AZ",
      "zip": "98765-4321",
      "longitude": 103.461760,
      "latitude": 44.580207,
      "timeZone": "America/New_York",
      "workPhone": "3218675300",
      "faxPhone": "3218675309",
      "email": "branch.manager@abcsupply.com",
      "status": "Active",
      "managerUserId": "1234",
      "manager": "Manager, Branch",
      "managerFirstName": "Branch",
      "managerLastName": "Manager",
      "managerEmail": "branch.manager@abcsupply.com",
      "managerTitle": "ABC Branch Manager",
      "managingPartner": false,
      "hours": [
        {
          "type": "Branch Hours",
          "days": "Mon - Fri",
          "open": "07:00",
          "close": "17:00",
          "notes": "Closed Weekends"
        },
        {
          "type": "Off-season Hours (November - March)",
          "days": "Mon - Fri",
          "open": "07:00",
          "close": "16:00",
          "notes": "Closed Weekends"
        }
      ],
      "warehouses": [
        {
          "warehouseCode": "D99",
          "warehouseName": "ABC #123 DIRECT ANYTOWN",
          "addressLine1": "PROVIDE DELIVERY ADDRESS",
          "city": "PROVIDE CITY",
          "state": "AZ",
          "zip": "98765",
          "stockingCode": "Y",
          "status": "Active",
          "tax": {
            "taxQualifierCodes": [
              {
                "locationTypeCode": "ST",
                "locationCode": "AZ"
              },
              {
                "locationTypeCode": "CT",
                "locationCode": "99"
              }
            ]
          }
        }
      ],
       "lastUpdatedTimeStamp": "2021-03-01T13:23:33.991"
    }
  ]
}

Pagination

Object Required

To transmit identifying order numbers, dates and other order properties

pagination.currentPage Number Required
the total number of results returned
100
pagination.pageSize Number
the total number of results that exist
500
pagination.totalPages Number
the ordered number that the response will start returning records from
100
pagination.totalItems Number Required
Total number of result that exist
1000

Branches

Array Required

item.organizationCode String Required
ABC
item.branchNumber String Required
820
item.divisionCode String
TCI
item.regionNumber String Required
810
item.districtNumber String Required
803
item.erpSystem String Required
ABCPOS
item.MBACode String
800
item.brandName String Required
Town & Country
item.storefront String Required
tci
item.branchName String Required
ABC Supply Company
item.addressType String Required
Office
item.addressLine1 String Required
20159 Kenilworth Blvd
item.addressLine2 String
3rd Floor
item.city String Required
820
item.state String Required
FL
item.zip String Required
33954-2142
item.longitude Number
-82.1189
item.latitude Number
27.023156
item.timeZone String Required
America/New_York
item.workPhone String Required
9416245006
item.faxPhone String Required
9416245225
item.status String Required
Active
item.managerUserId String Required
014908
item.manager String Required
Heavener, Janet
item.managerFirstName String Required
Janet
item.managerLastName String Required
Heavener

Hours

Array Required

item.hours String Required
Branch Hours
item.days String Required
Mon - Fri
item.open String Required
07:30
item.close String Required
16:00
item.notes String Required
Closed Weekends

Warehouses

Array Required

item.warehouseCode String Required
D23
item.warehouseName String Required
ABC #023 DIRECT WILKES-BARRE
item.addressLine1 String Required
PROVIDE DELIVERY ADDRESS
item.addressLine2 String Required
(no value in example)
item.city String Required
PROVIDE CITY
item.state String Required
TX
item.zip String Required
76302
item.stockingCode String Required
Y
item.status String Required
Active
item.lastUpdatedTimeStamp DateTimeRequired
2021-03-01T13:23:33.991

RESOURCE: GET /branchNumber

DESCRIPTION: The /branchNumber resource allows you to retrieve information about ABC branches. You can filter your result using several parameters such as storefront, branch number, district number, region number, proximity branch, radius distance from longitude and latitude, and user id of the associate with the specific branch responsibilities.


Request

cURL

Only cURL Sample


Parameters

Organization Code
organizationCode Array of String
Integrates organization
'ABC'
'LW'
Branch Number
branchNumber Array of String
Either this or branchNumbers (with s) is required. If both are passed, branchNumber is ignored.
'101'
'102'

Response

Response

Products and Services

Response

States – Test

Response

Geography

Response

Districts

Response


Support

The APIs that ABC Supply offers are designed to improve business transactions with us, and we provide you an expected service level you can integrate into your work flow. In addition, to ensure a highly quality experience for all our users, we monitor and place limits on API requests. Exceeding limits may result in your API access being disabled or revoked, so please be aware of the number of requests. If you have questions about API usage, please contact us at apirequest@abcsupply.com


FAQs

Question: What responses should I expect from a Branch Locator request?
Question: Will the Cubs win the World Series in 2022?