Get the Storage Server Credentials:
POST https://services-qa.walgreens.com/api/util/mweb5url
HEADER:
"Content-Type: application/json"
BODY:
{
"serviceType":"wagS3",
"apiKey":"GzoSZccevkX9VAjUkEwmvAy4PGcFXBhq",
"affId":"wildhacks",
"act":"genCredV2",
"view":"genCredV2JSON",
"devinf":"IE",
"appver":"1.0"
}
RESPONSE:
{
"secretKey":"SECRET_KEY",
"accessKeyId":"ACCESS_KEY_ID",
"sessionId":"SESSION_ID",
"uploadUrl":"UPLOAD_URL",
"err":""
}
NOTICE: These is a sample response, please replace with the actual value referenced by the nomenclature of VALUE_NAME
Upload the file:
PUT UPLOAD_URL/
NAME_OF_FILE.jpg
HEADER:
"Date:
CURRENT_DATE,
"Content-Type:image/jpg",
"Content-Length:
SIZE_OF_FILE",
"x-amz-security-token:
SESSION_ID",
"Authorization:
AUTH_STRING"
BODY:
CONTENTS OF THE IMAGE FILE
RESPONSE:
200
NOTICE: The response will be the http status code of the request. 200 is what you are looking for here.
Final Image URL:
GET UPLOAD_URL/NAME_OF_FILE.jpg
?Expires=EXPIRY_TIME
&AWSAccessKeyId=ACCESS_KEY_ID
&x-amz-security-token=SESSION_ID
&Signature=AUTH_STRING
EXAMPLE URL:
http://pod-qa.walgreens.com/wag_logo.jpg?Expires=1447995231&AWSAccessKeyId=ASIAI3IY6IMRRP2E7A6A&x-amz-security-token=AQoDYXdzEJL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa8AGQcuGMdIGE6RFsuHO6vl8aP1c8VTrBe9jPphafOi9r6deJ09Tr80E963aRC23P76%2FPsQug4eg4KKRvds2LSsC8ksPyw3ncDrtRxmkAEB3V%2Br6qty9MamSk5pUTeKMFBhlaXdBtF2cP4%2FaikRoCao3m2MmJ8uARnnbd5CZBdj6nV83K4a7dmD7XDgqjvZZhjyxOxJ%2FZC%2BU1%2BXDW7T0EoSeFys7e91m6a6bTVzKvcK2sR%2Br8Tkpf6dlfVE89trE9uElN3SHx9FeISxiWWV6wUAy%2BsDeOwvIHT7lWhh9dI9CoCtOgS7iJArDjXoAuPrxPn4cgmtqysgU%3D&Signature=31VfSuqyDAr5H7H2Na6n%2FP3yWqk%3D
NOTICE: The EXPIRY_TIME will be the current unix timestamp plus 36 hours aka 129600.
NOTICE: Please url_encode the SESSION_ID and AUTH_STRING.
Get the Landing URL:
POST https://services-qa.walgreens.com/api/util/mweb5url
HEADER:
"Content-Type: application/json"
BODY:
{
"apiKey": "GzoSZccevkX9VAjUkEwmvAy4PGcFXBhq",
"affId": "wildhacks",
"publisherId": ""
"transaction": "photoCheckoutv2",
"act": "mweb5UrlV2",
"view": "mweb5UrlV2JSON",
"devinf": "Chrome,26.0.1410.65",
"appver": "0.01",
"affNotes": "Enter the name of your application!",
"expiryTime": "EXPIRY_TIME",
"images": [
"IMAGE_URL_1",
"IMAGE_URL_2",
...
],
"lat": "USER_LATITUDE",
"lng": "USER_LONGITUDE",
"customer": {
"firstName": "USER_FIRST_NAME",
"lastName": "USER_LAST_NAME",
"email": "USER_EMAIL",
"phone": "USER_PHONE_NUMBER"
},
"channelInfo": "",
"callBackLink": ""
}
RESPONSE:
{
"landingUrl":"LANDING_URL",
"template":"default",
"uploadLimit":100,
"token":"CHECKOUT_TOKEN",
"err":""
}
NOTICE: The affNotes should be the unique name of your app!
NOTICE: If your integration is a website please add "web" for the value of channelInfo!
NOTICE: The images array has a maximum of 100 unique image urls!
NOTICE: Please enter the callback url you want us to send to for the callBackLink parameter!
NOTICE: The publisherId can be applied for at a different date, but it is used for the Revenue Share!