The Digital Offers API enables third party integrations to fetch, search, and clip digital coupons directly to Walgreens customers Balance Rewards Cards. Once a coupon is clipped to a customers card the offer will be auto-magically applied the next time they checkout with any applicable items on walgreens.com or in any one of our thousands of Walgreens Stores!
Below are the technical steps you will need to go through in order to get your integration configured and branded correctly:
The following API endpoints can be used to programmatically integrate all functions of the Digital Offers experience:
This endpoint can be used to convert a customer phoneNumber
into a loyaltyMemberId
. A valid loyaltyMemberId
is needed for Offers & Reporting.
Sandbox: https://services-qa.walgreens.com/api/offers/lookup/v1
Production: https://services.walgreens.com/api/offers/lookup/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
phoneNumber | required | The phone number of the customer. | "5555555555" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/lookup/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"phoneNumber":"CUSTOMER_PHONE_NUMBER", \
"svcRequestor":"svcRequestor", \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"phoneNumber": "CUSTOMER_PHONE_NUMBER",
"messages": [
{
"code": "WAG_I_LOYALTY_1046",
"message": "Single match found for the phone number",
"type": "INFO"
}],
"matchProfiles": [
{
"loyaltyMemberId": "ENCRYPTED_LOYALTY_MEMBER_ID",
"loyaltyCardNumber": "LOYALTY_CARD_NUMBER",
"firstName": "FIRST_NAME",
"lastName": "LAST_NAME",
"email": "EMAIL",
"zipCode": "ZIPCODE"
}]
}
This endpoint can be used to get customers full loyalty details based on their loyaltyMemberId
. A valid encrypted loyaltyMemberId
is required.
Sandbox: https://services-qa.walgreens.com/api/offers/member/v2
Production: https://services.walgreens.com/api/offers/member/v2
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/member/v2 \
--header 'Content-Type: application/json' \
--header 'Cookie: _abck=DD0F3AA9AB8159AF7F53E4751A782F65~-1~YAAQpHxCF9i6RXl6AQAAso1HmwaRZaRmeVB8yDll0vElO76dy9NP4LXOH2URjhgROqMWYSjXVq2mSIdllUhEOtA/UUnx4zarYkQD0dthypDV0zGkjv9NHcGcv76+3E8ZR5LfIDZSwnVV17wplaA3qy0cc4ThsxLQYLmq8EH3uA0es9D0BEbXX55dbura59DjOpHHdR1lyi33aODnxXuovS4DcyV1LYoGyasWabOm6K7/auZuVNb64nt2AQ3mOgMwmEsNxSmIzHNXaWAqqGnpkhJlQzUHOXtvvpkl44DQrZGP4l90A1LdWofyK1i1LybqUFEgodq0HvPFMBMBxq1N+CVRgucqOc+Ar/I87pJICVdE+2dR7XDWD/8yp/y/yvRQO0eFSsiQHcffVQ==~-1~-1~-1' \
--data-raw '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"sendPIIData":true,
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"svcRequestor":"ECOMMTP", \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"CustomerType": "Member",
"MemberID": "MEMBER_ID",
"MemberStatus": "Active",
"MyWagDateTime": "2020-11-10 01:09:10",
"EMailAddress": {
"EMailAddress": "EMAIL"
},
"PetInd": "N",
"Name": {
"Prefix": "",
"FirstName": "FIRST_NAME",
"LastName": "LAST_NAME",
"MiddleName": "",
"Suffix": ""
},
"PhoneList": {
"Phone": [
{
"AreaCode": "AREA_CODE",
"Number": "PHONE_NUMBER",
"TypeCode": "Mobile"
}
]
},
"ProgramList": {
"Program": [
{
"ProgramCode": "PROGRAM_CODE",
"ProgramId": "PROGRAM_ID",
"ProgramStatus": "A",
"ProgramStartDt": "2014-08-13T14:45:11.000Z",
"ProgramLstUpdt": "2014-08-13T14:45:11.000Z"
},
{
"ProgramCode": "PROGRAM_CODE",
"ProgramId": "PROGRAM_ID",
"ProgramStatus": "A",
"ProgramStartDt": "2014-07-29T14:58:10.000Z",
"ProgramLstUpdt": "2014-07-29T14:58:10.000Z"
}
]
},
"AttributeList": {
"Attribute": [
{
"Key": "KEY",
"Value": "VALUE"
},
{
"Key": "KEY",
"Value": "VALUE"
}
]
},
"ProgramPrefList": {
"Preference": [
{
"Code": "9900000030",
"Type": "PROGRAM",
"Name": "WalgreensPlus",
"Description": "POSCOUPON PLUS 20%",
"Detail": "Get 20 percent off",
"EffectiveStartDate": "2018-03-18T00:00:00",
"EffectiveEndDate": "2022-06-01T23:59:59",
"EnrollmentStartDate": "2018-03-18T00:00:00",
"EnrollmentEndDate": "2021-06-01T23:59:59",
"GlobalFlag": true
},
{
"Code": "9900000050",
"Type": "PROGRAM",
"Name": "UHC Discount",
"Description": "POSCOUPON UHC 20%",
"Detail": "UHC Discount",
"EffectiveStartDate": "2020-01-01T00:00:00",
"EffectiveEndDate": "2021-12-31T23:59:59",
"EnrollmentStartDate": "2020-01-01T00:00:00",
"EnrollmentEndDate": "2021-12-31T23:59:59",
"GlobalFlag": true
},
{
"Code": "9900000060",
"Type": "PROGRAM",
"Name": "1% Walgreens Cash rewards",
"Description": "5% W Cash rewards on Walgreens branded products",
"Detail": "1% Walgreens Cash rewards",
"Value": "Y",
"EffectiveStartDate": "2020-10-01T00:00:00",
"EffectiveEndDate": "2099-12-31T23:59:59",
"EnrollmentStartDate": "2020-10-01T00:00:00",
"EnrollmentEndDate": "2099-12-31T23:59:59",
"LastOptInDate": "2020-11-10T01:09:10",
"GlobalFlag": true
},
{
"Code": "1000001405",
"Type": "PROGRAM",
"Name": "Bonus Offer",
"Description": "Walgreens Cash rewards good on future purchases",
"Detail": "Earn $5 W Cash rewards when you spend $30 or more on any No7 Product(s)",
"EffectiveStartDate": "2021-06-27T00:00:00",
"EffectiveEndDate": "2021-07-24T23:59:59",
"EnrollmentStartDate": "2021-06-24T00:00:00",
"EnrollmentEndDate": "2021-07-24T23:59:59",
"GlobalFlag": true
},
{
"Code": "1000001208",
"Type": "PROGRAM",
"Name": "Walgreens Plus Bonus Offer",
"Description": "Valid in store and on Walgreens.com",
"Detail": "Get $5 Walgreens Cash rewards when you spend $5",
"EffectiveStartDate": "2021-07-01T00:00:00",
"EffectiveEndDate": "2021-07-31T23:59:59",
"EnrollmentStartDate": "2021-06-30T00:00:00",
"EnrollmentEndDate": "2021-07-31T23:59:59",
"GlobalFlag": true
},
{
"Code": "1000001283",
"Type": "PROGRAM",
"Name": "myW Credit Card 1 Time Offer",
"Description": "Valid in store and on Walgreens.com",
"Detail": "Get $25 W Cash rewards the first time you use your myW Credit Card",
"EffectiveStartDate": "2021-04-23T00:00:00",
"EffectiveEndDate": "2023-12-31T23:59:59",
"EnrollmentStartDate": "2021-04-22T00:00:00",
"EnrollmentEndDate": "2023-12-31T23:59:59",
"GlobalFlag": true
},
{
"Code": "1000001282",
"Type": "PROGRAM",
"Name": "myW Credit Card 1 Time Offer",
"Description": "Valid in store and on Walgreens.com",
"Detail": "Get $25 W Cash rewards the first time you use your myW Credit Card",
"EffectiveStartDate": "2021-04-23T00:00:00",
"EffectiveEndDate": "2023-12-31T23:59:59",
"EnrollmentStartDate": "2021-04-22T00:00:00",
"EnrollmentEndDate": "2023-12-31T23:59:59",
"GlobalFlag": true
}
]
},
"CardNumber": "CARD_NUMBER",
"Reward": {
"CurrentBalance": 3800,
"CurrentBalanceDollars": "3.80",
"RedemptionSchedule": [
{
"AwardID": 2061,
"Amount": 1,
"Points": 1000,
"Dollars": 1
},
{
"AwardID": 2062,
"Amount": 2,
"Points": 2000,
"Dollars": 2
},
{
"AwardID": 2063,
"Amount": 3,
"Points": 3000,
"Dollars": 3
}
],
"LastActivityDate": "2021-07-01T20:29:39",
"SmartPrompt": false,
"ProjectedForfeitDate": "2021-12-31T20:29:39",
"RedemptionDisabled": false,
"LinkedAcctInd": false,
"RxThreshold": {
"ScriptsTo": 5,
"PointsAwarded": 2500,
"DollarsAwarded": 2.5
}
},
"Preferences": {
"MyWagConsentInd": true,
"DoNotCallInd": null,
"DoNotMailInd": null,
"MinAgeInd": true,
"EMailConsentInd": true,
"EMailValidStatus": "VERIFIED",
"SmsMktConsentInd": false,
"SmsValidStatus": "PENDING",
"DigitalReceiptInd": "DIGITAL",
"EEWAGUser": true
},
"AffiliationPoints": [
{
"Code": "HEALTHY_CHOICES",
"PointsEarned": 2350,
"DollarsEarned": 2.35
},
{
"Code": "RALLY_HEALTH",
"PointsEarned": 42000,
"DollarsEarned": 42
},
{
"Code": "TM_BENEFITS_2020",
"PointsEarned": 26000,
"DollarsEarned": 26
},
{
"Code": "STEPS",
"PointsEarned": 61420,
"DollarsEarned": 61.42
},
{
"Code": "TM_BENEFITS_2019",
"PointsEarned": 14000,
"DollarsEarned": 14
}
],
"PointsExpirations": [
{
"Amount": 2,
"ExpiresOn": "2022-01-01",
"Points": "2410",
"Dollars": "2.41"
},
{
"Amount": 0,
"ExpiresOn": "2022-04-01",
"Points": "90",
"Dollars": "0.09"
},
{
"Amount": 0,
"ExpiresOn": "2022-06-01",
"Points": "940",
"Dollars": "0.94"
},
{
"Amount": 0,
"ExpiresOn": "2022-07-01",
"Points": "200",
"Dollars": "0.20"
},
{
"Amount": 0,
"ExpiresOn": "2022-08-01",
"Points": "160",
"Dollars": "0.16"
}
],
"CEPLaunchDttm": "Apr 16, 2021"
}
This endpoint can be used to fetch dynamically ranked sets of offers that are currently available to clip for a given loyaltyMemberId
. A valid loyaltyMemberId
is needed. You will then use the id
of then offer to clip the offer to the customer loyalty card when they choose to do so.
Sandbox: https://services-qa.walgreens.com/api/offers/fetch/v1
Production: https://services.walgreens.com/api/offers/fetch/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
cat | optional | A specific category of coupons, if wanted. |
|
recSize | required | The requested number of offers for each pagination (Maximum 50). | 50 |
recStartIndex | required | The index of the pagination, start at 0 and increment with the last "i" value for each offer in the response until there are no more offers. | 0 (or i value of last offer in response) |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/fetch/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"svcRequestor":"ECOMMTP", \
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"cat":"", \
"recSize":50, \
"recStartIndex":0, \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"summary": {
"availableCount": APPLICABLE_OFFERS_COUNT,
"totalRecords": TOTAL_OFFERS_COUNT,
"targetedCount": TARGETED_OFFERS,
"maxClippingLimit": OFFERS_CLIPABLE_COUNT
},
"coupons": [
{
"sneakpeek": true/false,
"isJustForYou": true/false,
"expiryDate": "MM/DD/YY",
"activeDate": "MM/DD/YY",
"expiryDateAsUTC": 1234567890000,
"activeDateAsUTC": 1234567890000,
"brandName": "OFFER_BRAND_NAME",
"categoryName": "OFFER_CATEGORY_NAME",
"code": "OFFER_CODE",
"description": "OFFER_DESCRIPTION",
"id": "OFFER_ID",
"image": "OFFER_IMAGE_SMALL",
"image2": "OFFER_IMAGE_LARGE",
"minQty": MINIMUM_QTY_OF_PRODUCT_NEEDED,
"offerValue": OFFER_DOLLAR_VALUE,
"source": "OFFER_SOURCE_SYSTEM",
"summary": "OFFER_SUMMARY_OF_VALUE",
"type": "OFFER_TYPE_DESCRIPTION",
"i": "CURRENT_OFFER_INDEX"
},
...shortened for brevity
]
}
This endpoint can be used to fetch dynamically ranked sets of offers that are currently available to clip for a given loyaltyMemberId
based on a the q
or query for a specific brand / description of the applicable product. A valid loyaltyMemberId
is needed. You will then use the id
of then offer to clip the offer to the customer loyalty card when they choose to do so.
Sandbox: https://services-qa.walgreens.com/api/offers/search/v1
Production: https://services.walgreens.com/api/offers/search/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
q | required | The query by the customer, can be a brand name or applicable product description. |
|
type | required | The type of offers you wish to query against. |
|
recSize | required | The requested number of offers for each pagination (Maximum 50). | 50 |
recStartIndex | required | The index of the pagination, start at 0 and increment with the last "i" value for each offer in the response until there are no more offers. | 0 (or i value of last offer in response) |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/search/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"svcRequestor":"ECOMMTP", \
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"q":"Advil", \
"recSize":50, \
"recStartIndex":0, \
"type":"coupons", \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"summary": {
"availableCount": APPLICABLE_OFFERS_COUNT,
"totalRecords": TOTAL_OFFERS_COUNT,
"targetedCount": TARGETED_OFFERS,
"maxClippingLimit": OFFERS_CLIPABLE_COUNT
},
"coupons": [
{
"sneakpeek": false,
"expiryDate": "MM/DD/YY",
"activeDate": "MM/DD/YY",
"expiryDateAsUTC": 1234567890000,
"activeDateAsUTC": 1234567890000,
"brandName": "OFFER_BRAND_NAME",
"categoryName": "CATEGORY_NAME",
"code": "OFFER_CODE",
"description": "OFFER_DESCRIPTION",
"id": "OFFER_ID",
"image": "OFFER_IMAGE_SMALL",
"image2": "OFFER_IMAGE_LARGE",
"minQty": MINIMUM_QTY_OF_PRODUCT_NEEDED,
"offerValue": OFFER_DOLLAR_VALUE,
"source": "OFFER_SOURCE_SYSTEM",
"summary": "OFFER_SUMMARY_OF_VALUE",
"offerDisclaimer":"OFFER_LEGAL_DISCLAIMER",
"isClipped": true/false,
"i": "CURRENT_OFFER_INDEX"
},
...shortened for brevity
]
}
This endpoint can be used to clip an offer for a given loyaltyMemberId
based on a the offer id
. A valid loyaltyMemberId
and offer id
are needed. This endpoint should only be called by the customer choosing to clip (No automatic clipping integration will be allowed in production).
Sandbox: https://services-qa.walgreens.com/api/offers/clip/v1
Production: https://services.walgreens.com/api/offers/clip/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 100 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
id | required | The offer Id the customer wants to clip. | "abcdefgh-1234-abc1-def1-abc123def123gh" |
channel | optional | Your PublisherId for tracking the revenue share when redemption happens. | "12345678" |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/clip/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"svcRequestor":"ECOMMTP", \
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"id":"OFFER_ID", \
"channel":"YOUR_PUBLISHER_ID", \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"messages": [
{
"code": "WAG_I_DO_4003",
"message": "Success! Coupon clipped to card.",
"type": "INFO"
}],
"successCount": COUNT_OF_OFFERS_CLIPPED_SUCCESFULLY,
"offerId": "OFFER_ID_CLIPPED",
"clippedCount": TOTAL_OFFERS_CLIPPED,
"availableToClipCount": OFFERS_AVAILABLE_TO_CLIP
}
This endpoint can be used to report on the offers that are currently clipped to a specific loyaltyMemberId
. A valid loyaltyMemberId
is needed.
Sandbox: https://services-qa.walgreens.com/api/offers/clipped/v1
Production: https://services.walgreens.com/api/offers/clipped/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
recSize | required | The requested number of offers for each pagination (Maximum 50). | 50 |
recStartIndex | required | The index of the pagination, start at 0 and increment with the last "i" value for each offer in the response until there are no more offers. | 0 (or i value of last offer in response) |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/clipped/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"svcRequestor":"ECOMMTP", \
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"recSize":50, \
"recStartIndex":0, \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"summary": {
"availableToClipCount": OFFERS_AVAILABLE_TO_CLIP,
"maxClippingLimit": OFFERS_CLIPABLE_COUNT,
"totalSavings": TOTAL_DOLLAR_VALUE_OF_CLIPPED_OFFERS,
"clippedCount": TOTAL_OFFERS_CLIPPED
},
"coupons": [
{
"sneakpeek": true/false,
"isJustForYou": true/false,
"expiryDate": "MM/DD/YY",
"activeDate": "MM/DD/YY",
"expiryDateAsUTC": 1234567890000,
"activeDateAsUTC": 1234567890000,
"brandName": "OFFER_BRAND_NAME",
"categoryName": "OFFER_CATEGORY_NAME",
"code": "OFFER_CODE",
"image": "OFFER_IMAGE_SMALL",
"image2": "OFFER_IMAGE_LARGE",
"minQty": MINIMUM_QTY_OF_PRODUCT_NEEDED,
"offerValue": OFFER_DOLLAR_VALUE,
"source": "OFFER_SOURCE_SYSTEM",
"summary": "OFFER_SUMMARY_OF_VALUE",
"type": "OFFER_TYPE_DESCRIPTION",
"loyaltyCoupon": "true/false",
"activationDate": "MM/DD/YY",
"activationDateAsUTC": 1234567890000,
"i": "CURRENT_OFFER_INDEX"
},
...shortened for brevity
]
}
This endpoint can be used to report on the offers that have been redeemed by a specific loyaltyMemberId
in a given time range starting with startDate
and ending with endDate
. A valid loyaltyMemberId
is needed and startDate
must be before endDate
.
Sandbox: https://services-qa.walgreens.com/api/offers/redeemed/v1
Production: https://services.walgreens.com/api/offers/redeemed/v1
Request format | JSON |
Response format | JSON |
Authentication? | Yes |
Rate limited? | Yes |
Requests Per Minute | 300 |
Name | Optionality | Description | Example |
---|---|---|---|
apiKey | required | Your API Key. | "AbCdEfGhIjKlMnOpQrStUvWxYz" |
affId | required | Your AffiliateID. | "AAAAAAAAAA" |
svcRequestor | required | A static value that indicate the request is coming from a third-party. | "ECOMMTP" |
encLoyaltyId | required | The encrypted loyalty member Id for the customer. | "AbCdEfGhIjKlMnOpQrStUvWxYz==" |
startDate | required | The beginning date of the time range querying against. | "YYYY-DD-MM" |
endDate | required | The ending date of the time range querying against. | "YYYY-DD-MM" |
recSize | required | The requested number of offers for each pagination (Maximum 50). | 50 |
recStartIndex | required | The index of the pagination, start at 0 and increment with the last "i" value for each offer in the response until there are no more offers. | 0 (or i value of last offer in response) |
appVer | optional | The build version of your application. | "1.0" |
devInf | optional | The device manufacturer and version. | "iPhone,13.0" |
curl --request POST \
--url https://services-qa.walgreens.com/api/offers/redeemed/v1 \
--header 'Content-Type: application/json' \
--data '{ \
"apiKey":"YOUR_API_KEY", \
"affId":"YOUR_AFFILIATE_ID", \
"svcRequestor":"ECOMMTP", \
"encLoyaltyId":"ENCRYPTED_LOYALTY_MEMBER_ID", \
"startDate":"YYYY-DD-MM", \
"endDate":"YYYY-DD-MM", \
"recSize":50, \
"recStartIndex":0, \
"appVer":"#.#", \
"devInf":"DEVICE,##.#" \
}' \
{
"summary": {
"totalSavings": TOTAL_DOLLAR_VALUE_OF_CLIPPED_OFFERS,
"redeemedCount": TOTAL_OFFERS_REDEEMED_COUNT
},
"coupons": [
{
"sneakpeek": true/false,
"expiryDate": "MM/DD/YY",
"activeDate": "MM/DD/YY",
"expiryDateAsUTC": 1234567890000,
"activeDateAsUTC": 1234567890000,
"channel": "OFFER_CLIP_CHANNEL",
"brandName": "OFFER_BRAND_NAME",
"description": "OFFER_DESCRIPTION",
"id": "OFFER_ID",
"categoryName": "OFFER_CATEGORY_NAME",
"code": "OFFER_CODE",
"image": "OFFER_IMAGE_SMALL",
"image2": "OFFER_IMAGE_LARGE",
"minQty": MINIMUM_QTY_OF_PRODUCT_NEEDED,
"offerValue": OFFER_DOLLAR_VALUE,
"source": "OFFER_SOURCE_SYSTEM",
"summary": "OFFER_SUMMARY_OF_VALUE",
"type": "OFFER_TYPE_DESCRIPTION",
"loyaltyCoupon": "true/false",
"offerDisclaimer":"OFFER_LEGAL_DISCLAIMER",
"activationDate": "MM/DD/YY",
"activationDateAsUTC": 1234567890000,
"redeemedDate": "MM/DD/YY",
"redeemedDateAsUTC": 1234567890000,
"redemptionDateTimeStamp": "YYYY-MM-DDTHH:MM:SS-GMThh:GMTmm",
"i": "CURRENT_OFFER_INDEX"
},
...shortened for brevity
]
}
Obviously we don't want any errors to happen, but sometimes they do and as a result we respond the following error codes. The table below helps explain why each of the error codes could occur:
Code | Type | Message |
---|---|---|
WAG_E_LOYALTY_1041 | ERROR | We couldn't find your myWalgreens membership in our database. Migration to myWalgreens has not been completed. |
WAG_E_LOYALTY_1044 | ERROR | Invalid phone number format: (ex: "### ### ####" is invalid)Invalid phone number type: (ex: "ABCDEFG" is invalid) |
WAG_E_SVC_UNAVAILABLE_1401 | ERROR | Connection between Internal Service and External Gateway is down. |
WAG_E_DO_4011 | ERROR | Internal Service is broken. |
WAG_E_DO_4020 | ERROR | Sorry, but there's an issue with your BalanceĀ® Rewards membership, and some of your coupons are unavailable right now. For assistance, call customer service at 877-250-5823. |
WAG_I_DO_4023 | INFO | There are no coupons available. |
WAG_I_DO_4061 | INFO | There are no coupons for the particular category. |