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 /v2:

  • Added new detailed descriptions of all request and response parameters!
  • Added Error Codes section to help tackle those nasty bugs.

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/v2

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/v2
Production:
https://services.walgreens.com/api/products/inventory/v2

Endpoint Information

Request format JSON
Response format JSON
Authentication? Yes
Rate limited? Yes
Requests Per Second 20

Request Body

Name Optionality Description Example
planograms required The array of planograms you are looking up the inventory of at that store. Maximum of 1000 per request. ["40000998039", "40000998040"]
store required The store number you are looking up inventory. "15196"
apiKey required Your API Key. "AbCdEfGhIjKlMnOpQrStUvWxYz"
affId required Your AffiliateID. "AAAAAAAAAA"

Example Request

curl --location 
    --request POST 'https://services-qa.walgreens.com/api/products/inventory/v2' \
    --header ': ' \
    --header 'Content-Type: application/json' \
    --data-raw '{
		    "apikey":"YOUR_API_KEY",
		    "affId":"YOUR_AFFILIATE_ID"
                    "store" : 3794,
                    "planograms" : [40000100959,40000103346]
        }​​​​​  
    }'\
                            

Example Response

[
        {
            "storeNumber": 3794,
            "planogram": 40000100959,
            "wic": 100959,
            "stockLevel": 9,
            "status": "In Stock"
        },
        {
            "storeNumber": 3794,
            "planogram": 40000103346,
            "wic": 0,
            "stockLevel": 0,
            "status": "Not Available"         
        },
    
        //...continued for each pln in the request
    ]
                            

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
WAG-E-001 ERROR Invalid store number.
WAG_E_SVC_UNAVAILABLE_1401 ERROR Internal Service is Down