{"info":{"_postman_id":"507284e7-e090-7f5f-cd05-d4e6fdb47cba","name":"PhotoPrintsAPI","description":"This collection contains all of the Photo Prints API requests needed for a valid integration.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Native V3","item":[{"name":"Get Products And Prices","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.err === \"\";","tests[\"Service Success\"] = jsonData.status && jsonData.status === \"success\";","tests[\"Products Returned\"] = jsonData.products && jsonData.products.length > 0;","","postman.setGlobalVariable(\"PRODUCT_ID\", jsonData.products[0].productId);","tests[\"Saved Product!\"] = globals[\"PRODUCT_ID\"] !== \"\";"]}}],"id":"283def66-ba72-7d32-953f-5f306de00bef","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"affId\": \"extest1\",\n    \"apiKey\": \"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\",\n    \"productGroupId\": \"\",\n    \"act\": \"getphotoprods\",\n    \"devinf\": \"Postman,1.0\",\n    \"appver\": \"1.00\"\n}"},"url":"https://services-qa.walgreens.com/api/photo/products/v3","description":"Get the Products and Prices and then save to an array."},"response":[],"_postman_id":"283def66-ba72-7d32-953f-5f306de00bef"},{"name":"Check Coupon","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.err === \"\";","tests[\"Service Success\"] = jsonData.status && jsonData.status === \"success\";","tests[\"Order Total Returned\"] = jsonData.orderTotalPrice && jsonData.orderTotalPrice > 0;","tests[\"Order Discount Returned\"] = jsonData.orderDiscountPrice && jsonData.orderDiscountPrice > 0;","",""]}}],"id":"7d7b51ba-c974-5a15-66c1-daa2e02181da","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"affId\": \"extest1\",\n    \"apiKey\": \"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\",\n    \"act\": \"getdiscount\",\n    \"couponCode\": \"testforall\",\n    \"productDetails\": [\n        {\n            \"productId\":\"{{PRODUCT_ID}}\",\n            \"qty\":\"1\"\n        }\n    ],\n    \"devinf\": \"Postman,1.0\",\n    \"appver\": \"1.00\"\n}"},"url":"https://services-qa.walgreens.com/api/photo/order/coupon/v3","description":"Check Coupon based on a ProductId from last request and confirm a discount."},"response":[],"_postman_id":"7d7b51ba-c974-5a15-66c1-daa2e02181da"},{"name":"Get Stores List","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.errCode === \"\";","tests[\"Service Success\"] = jsonData.status && jsonData.status === \"success\";","tests[\"Stores Returned\"] = jsonData.photoStores && jsonData.photoStores.length > 0;","","postman.setGlobalVariable(\"STORE_NUM\", jsonData.photoStores[0].photoStoreDetails.storeNum);","tests[\"Store Number Saved\"] = globals[\"STORE_NUM\"] !== \"\";","","postman.setGlobalVariable(\"PROMISE_TIME\", jsonData.photoStores[0].photoStoreDetails.promiseTime);","tests[\"Promise Time Saved\"] = globals[\"PROMISE_TIME\"] !== \"\";",""]}}],"id":"a0bafc67-8772-d18d-4575-e5596a886b4a","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"affId\": \"extest1\",\n    \"apiKey\": \"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\",\n    \"act\": \"photoStores\",\n    \"productDetails\": [\n        {\n            \"productId\":\"{{PRODUCT_ID}}\",\n            \"qty\":\"1\"\n        }\n    ],\n    \"latitude\": \"41.8807335\",\n    \"longitude\": \"-87.6261701\",\n    \"devinf\": \"Postman,1.0\",\n    \"appver\": \"1.00\"\n}"},"url":"https://services-qa.walgreens.com/api/photo/store/v3","description":"Get the Stores and save the store number and promise time from the store."},"response":[],"_postman_id":"a0bafc67-8772-d18d-4575-e5596a886b4a"},{"name":"Submit Order","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.err === \"\";","tests[\"Service Success\"] = jsonData.status && jsonData.status === \"success\";","tests[\"VendorOrderID Returned\"] = jsonData.vendorOrderId && jsonData.vendorOrderId !== \"\";"]}}],"id":"82315b17-ad52-35d5-6fca-7019140a311a","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"affId\":\"extest1\",\n    \"apiKey\":\"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\",\n    \"act\":\"submitphotoorder\",\n    \"publisherId\":\"\",\n    \"storeNum\":\"{{STORE_NUM}}\",\n    \"promiseTime\":\"{{PROMISE_TIME}}\",\n    \"couponCode\":\"testforall\",\n    \"firstName\":\"Drew\",\n    \"lastName\":\"Schweinfurth\",\n    \"phone\":\"3123425743\",\n    \"email\":\"test@api.com\",\n    \"affNotes\":\"Test Order, Do not print!\",\n    \"productDetails\":[\n        {\n            \"productId\":\"{{PRODUCT_ID}}\",\n            \"imageDetails\":[\n                {\n                    \"url\":\"http://lorempixel.com/1000/1000/cats/1\",\n                    \"qty\":\"1\"\n                }\n            ]\n        }\n    ],\n  \"devinf\": \"Postman,1.0\",\n  \"appver\": \"1.00\"\n}"},"url":"https://services-qa.walgreens.com/api/photo/order/submit/v3","description":"Submits The Order and validates that a vendor order id is returned."},"response":[],"_postman_id":"82315b17-ad52-35d5-6fca-7019140a311a"}],"id":"2d865ac2-fb2a-f479-b8ff-63c90183a046","description":"The native V3 Endpoints for building an entirely native checkout experience.","_postman_id":"2d865ac2-fb2a-f479-b8ff-63c90183a046"},{"name":"Standard Photo Prints","item":[{"name":"Get Upload Security Tokens","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.err === \"\";","tests[\"UploadUrl Valid\"] = jsonData.uploadUrl && jsonData.uploadUrl !== \"\";","tests[\"accessKeyId Valid\"] = jsonData.accessKeyId && jsonData.accessKeyId !== \"\";","tests[\"sessionId Valid\"] = jsonData.sessionId && jsonData.sessionId !== \"\";","tests[\"secretKey Valid\"] = jsonData.secretKey && jsonData.secretKey !== \"\";","",""]}}],"id":"f718a66a-ad95-4c9b-3c21-7b77bef7ba1a","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"serviceType\": \"wagS3\",\n    \"affId\": \"extest1\",\n    \"apiKey\": \"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\",\n    \"act\": \"genCredV2\",\n    \"view\": \"genCredV2JSON\",\n    \"devinf\": \"Postman,1.0\",\n    \"appver\":\"1.00\"\n}"},"url":"https://services-qa.walgreens.com/api/util/mweb5url","description":"Get Upload Security Tokens used for Photo Upload process."},"response":[],"_postman_id":"f718a66a-ad95-4c9b-3c21-7b77bef7ba1a"},{"name":"Get URL and Token","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","","var jsonData = JSON.parse(responseBody);","tests[\"No Errors in response\"] = jsonData.err === \"\";","tests[\"Valid LANDING_URL\"] = jsonData.landingUrl && jsonData.landingUrl !== \"\";","postman.setGlobalVariable(\"LANDING_URL\", jsonData.landingUrl);","","tests[\"Valid TOKEN\"] = jsonData.token && jsonData.token !== \"\";","postman.setGlobalVariable(\"TOKEN\", jsonData.token);"]}}],"id":"f2881fda-1ea0-8314-bcb6-84bd0eaf0a64","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"apiKey\": \"6hWXD9taql4XJztey5sgJaZ4E0NYFi0p\", \n    \"affId\": \"extest1\", \n    \"publisherId\": \"\", \n    \"transaction\": \"photoCheckoutv2\", \n    \"act\": \"mweb5UrlV2\", \n    \"view\": \"mweb5UrlV2JSON\", \n    \"channelInfo\": \"web\", \n    \"callBackLink\": \"https://localhost:3000/walgreens/photo/callback\", \n    \"expiryTime\": \"\", \n    \"images\": [ \n        \"http://lorempixel.com/1000/1000/cats/1\", \n        \"http://lorempixel.com/1000/1000/cats/2\" \n    ], \n    \"lat\": \"42.138199\", \n    \"lng\": \"-87.945799\", \n    \"customer\": { \n        \"firstName\": \"Drew\", \n        \"lastName\": \"Schweinfurth\", \n        \"email\": \"APIdrew@walgreens.com\", \n        \"phone\": \"3123425743\"\n    }, \n    \"devinf\": \"Postman,1.0\", \n    \"appver\": \"1.00\", \n    \"affNotes\": \"Test Order, Do not print!\"\n}"},"url":"https://services-qa.walgreens.com/api/util/mweb5url","description":"Get the Landing URL and Token and confirm they are valid and save for next request."},"response":[],"_postman_id":"f2881fda-1ea0-8314-bcb6-84bd0eaf0a64"},{"name":"Verify Landing URL","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is HTML\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"text/html\");"]}}],"id":"cbc71922-3ec0-29aa-eabd-3f5a82ba07f5","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"","value":"","type":"text"}]},"url":"{{LANDING_URL}}&token={{TOKEN}}","description":"Checks to make sure a valid landing url is built and the status code is 200 OK!"},"response":[],"_postman_id":"cbc71922-3ec0-29aa-eabd-3f5a82ba07f5"}],"id":"7ab4d163-2ae5-ba65-82a9-c37376f1a237","description":"This is all the Standard Photo Prints API Requests","_postman_id":"7ab4d163-2ae5-ba65-82a9-c37376f1a237"}]}