API Programs > Store Inventory API

Store Inventory API


The Walgreens Store Inventory API allows users of third-party applications and websites to quickly check a particular stores inventory.

Documentation/Services Highlights /v4:

  • Added new detailed descriptions of all request and response parameters!
  • Added Error Codes section to help tackle those nasty bugs.
  • New! Updated the endpoint and request body for the real time store inventory API.

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.

Inventory

  • Inventory:
    POST api/products/inventory/v4

Store Inventory

This endpoint is used to check the inventory of a particular Walgreens store for the specified items.

Endpoint URL

Sandbox:
https://services-qa.walgreens.com/api/products/inventory/v4
Production:
https://services.walgreens.com/api/products/inventory/v4

Endpoint Information

Request format JSON
Response format JSON
Authentication? Yes
Rate limited? No

Request Body

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"

Example Request

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"
		}'\
                            

Example Response

[
         {
        "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
    ]
                            

Status Codes

Error Codes

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