The Walgreens Store Inventory API allows users of third-party applications and websites to quickly check a particular stores inventory.
Below are the technical steps you will need to go through in order to get your integration configured and branded correctly:
The services listed below make up the complete list of services that are required in order to complete all phases of the Store Inventory experience. Please note that all of the service endpoints documented below are brand new for this version of the API.
This endpoint is used to check the inventory of a particular Walgreens store for the specified items.
Sandbox: https://services-qa.walgreens.com/api/products/inventory/v4
Production: https://services.walgreens.com/api/products/inventory/v4
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | No |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
store | required | The store number you are looking up inventory. | "15196" |
appVer | required | The version of your application. | "1" |
curl --location
--request POST 'https://services-qa.walgreens.com/api/products/inventory/v4' \
--header ': ' \
--header 'Content-Type: application/json' \
--data-raw '{
"apiKey": "YOUR_API_KEY",
"affId": "YOUR_AFFILIATE_ID",
"store": "STORE_NUMBER",
"appVer": "YOUR_APP_VERSION"
}'\
[
{
"id": PRODUCT_ARTICLE_ID,
"s": STORE_NUMBER,
"q": QUANTITY_IN_STOCK,
"ut": UPDATE_TIME_EPOCH
},
//...id is the articleId, s is store, q is quantity, ut is updateTime
]
Obviously we don't want any errors to happen, but sometimes they do and as a result we respond the following error codes. Any unanswered request will return an HTTP 500 error response. The table below helps explain why each of the error codes could occur:
Code | Level | Message |
---|---|---|
20x | SUCCESS | Successful request |
40x | INVALID REQUEST | Missing request field, invalid request field |
50x | SERVICE ERROR | Networking / Missing file / etc |