Bag Workflow Guide
Description
Following is an example workflow on using shopping bag services to adjust a Macy's shopping bag.
1. Retrieve the Bag ID from Macys.com
The Bag ID is available as soon as the customer adds an item to the shopping bag.
2. Retrieve the Bag Using the Bag ID:
This method allows your application to view the contents of a bag and retrieve the User ID. User ID is also found in a cookie stored in your browser.
Request URL
GET
https://api.macys.com/order/v1/bags?bagId=431219099
Header
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Response
{ "bag": { "bagId": 431219099, "bagGUID": "b7e5b158-cbff-4dd2-97e3-ef85cd974c1d", "storeLocationNumber": 0, "owner": { "userId": 9523624313, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "method": "G", "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 11.4, "itemCount": 1, "grandTotal": 201.39, "merchandiseTotal": 189.99, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "promotions": [], "items": [ { "autoAddChoice": "ADD", "discount": 0, "giftCardAmount": 0, "giftId": 0, "personalizationFlag": false, "gwpItemFlag": false, "isItemFromWishList": false, "pwpItemFlag": false, "specialItemFlag": false, "itemTotal": 189.99, "itemTrackInfo": "cmexplore=-_--_- | eGift:C | GROUPGIFT:NONE-_--_--_--_--_--_-29-_-1-_--_--_--_--_--_-SINGLE ITEM-_--_--_--_-19-_--_--_--_--_--_--_--_--_--_-PDP Colorized-_-0-_-0&&PseudoCat=7715&PseudoProdID=439074&BagDate=2/26/2015&breadCrumbCategory=Kitchen-Cuisinart-Cuisinart Coffee %26 Espresso", "mergeRequiredFlag": false, "originalPrice": 189.99, "personalizationFee": 0, "pickupRegistryApplicable": true, "pickUpFromStore": false, "promotionId": 0, "wishListId": 0, "quantity": 1, "retailPrice": 189.99, "sequenceNumber": 1, "siteAvailablilityFlag": true, "surcharges": 0, "productId": 439074, "trackingCategory": "7715", "upcId": 20097324, "upcNumber": "86279024190", "uycTotalDiscountedPrice": 0, "uycDiscountedPercentage": 0, "uycPercentDiscount": 0 } ], "promotionOffers": [], "uycApplicable": false } }
3. Add an Item to a Shopping Bag with User Guid
Request URL
POST
https://api.macys.com/order/v1/bags?userGuid=dec5963d-7449-4172-a490-254b99f100ca
Header
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Content-type: application/json
Request Body (Payload)
{ "item": { "quantity": "1", "upcId": "1205976", "itemTrackInfo": "XxxxxxxxXXXXXxxxxxXXXX" } } }
Response
{ "bag": { "bagId": 431351478, "bagGUID": "8709998e-a5ca-445f-af57-5c2c102ddbef", "storeLocationNumber": 0, "owner": { "userId": 9518755051, "userGuid": "dec5963d-7449-4172-a490-254b99f100ca", "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "method": "G", "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 9, "itemCount": 1, "grandTotal": 158.99, "merchandiseTotal": 149.99, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "promotions": [], "items": [ { "autoAddChoice": "ADD", "discount": 0, "giftCardAmount": 0, "giftId": 0, "personalizationFlag": false, "gwpItemFlag": false, "isItemFromWishList": false, "pwpItemFlag": false, "specialItemFlag": false, "itemTotal": 149.99, "itemTrackInfo": "XxxxxxxxXXXXXxxxxxXXXX", "mergeRequiredFlag": false, "originalPrice": 149.99, "personalizationFee": 0, "pickupRegistryApplicable": true, "pickUpFromStore": false, "promotionId": 0, "wishListId": 0, "quantity": 1, "retailPrice": 149.99, "sequenceNumber": 1, "siteAvailablilityFlag": true, "surcharges": 0, "productId": 294790, "upcId": 1205976, "upcNumber": "86279021915", "uycTotalDiscountedPrice": 0, "uycDiscountedPercentage": 0, "uycPercentDiscount": 0 } ], "promotionOffers": [], "uycApplicable": false } }
4. Retrieve the Bag to Confirm the Item was Added
Request URL
GET
https://api.macys.com/order/v1/bags?userGuid=dec5963d-7449-4172-a490-254b99f100ca
Header:
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Response
{ "bag": { "bagId": 431351478, "bagGUID": "8709998e-a5ca-445f-af57-5c2c102ddbef", "storeLocationNumber": 0, "owner": { "userId": 9518755051, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "method": "G", "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 9, "itemCount": 1, "grandTotal": 158.99, "merchandiseTotal": 149.99, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "promotions": [], "items": [ { "autoAddChoice": "ADD", "discount": 0, "giftCardAmount": 0, "giftId": 0, "personalizationFlag": false, "gwpItemFlag": false, "isItemFromWishList": false, "pwpItemFlag": false, "specialItemFlag": false, "itemTotal": 149.99, "itemTrackInfo": "XxxxxxxxXXXXXxxxxxXXXX", "mergeRequiredFlag": false, "originalPrice": 149.99, "personalizationFee": 0, "pickupRegistryApplicable": true, "pickUpFromStore": false, "promotionId": 0, "wishListId": 0, "quantity": 1, "retailPrice": 149.99, "sequenceNumber": 1, "siteAvailablilityFlag": true, "surcharges": 0, "productId": 294790, "upcId": 1205976, "upcNumber": "86279021915", "uycTotalDiscountedPrice": 0, "uycDiscountedPercentage": 0, "uycPercentDiscount": 0 } ], "promotionOffers": [], "uycApplicable": false } } }
5. Update an Item in the Bag:
Request URL
PATCH
http://api.macys.com/order/v1/bags/8709998e-a5ca-445f-af57-5c2c102ddbef/items
Header
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Content-type: application/json
Request Body (Payload)
} "item": { "promotionId": 19837326, "quantity": "1", "sequenceNumber": 7, "upcId": "1205976" } }
Response
{ "bag": { "bagId": 431351478, "bagGUID": "8709998e-a5ca-445f-af57-5c2c102ddbef", "storeLocationNumber": 0, "owner": { "userId": 9518755051, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "method": "G", "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 9, "itemCount": 1, "grandTotal": 158.99, "merchandiseTotal": 149.99, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "promotions": [], "items": [ { "autoAddChoice": "ADD", "discount": 0, "giftCardAmount": 0, "giftId": 0, "personalizationFlag": false, "gwpItemFlag": false, "isItemFromWishList": false, "pwpItemFlag": false, "specialItemFlag": false, "itemTotal": 149.99, "itemTrackInfo": "XxxxxxxxXXXXXxxxxxXXXX", "mergeRequiredFlag": false, "originalPrice": 149.99, "personalizationFee": 0, "pickupRegistryApplicable": true, "pickUpFromStore": false, "promotionId": 0, "wishListId": 0, "quantity": 1, "retailPrice": 149.99, "sequenceNumber": 1, "siteAvailablilityFlag": true, "surcharges": 0, "productId": 294790, "upcId": 1205976, "upcNumber": "86279021915", "uycTotalDiscountedPrice": 0, "uycDiscountedPercentage": 0, "uycPercentDiscount": 0 } ], "promotionOffers": [], "uycApplicable": false } }
6. Retrieve the Bag to Confirm the Change in Quantity
Request URL
GET
https://api.macys.com/order/v1/bags?userGuid=dec5963d-7449-4172-a490-254b99f100ca&bagGuid=8709998e-a5ca-445f-af57-5c2c102ddbef
Header:
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Response
{ "bag": { "bagId": 431351478, "bagGUID": "8709998e-a5ca-445f-af57-5c2c102ddbef", "storeLocationNumber": 0, "owner": { "userId": 9518755051, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "method": "G", "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 9, "itemCount": 1, "grandTotal": 158.99, "merchandiseTotal": 149.99, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "promotions": [], "items": [ { "autoAddChoice": "ADD", "discount": 0, "giftCardAmount": 0, "giftId": 0, "personalizationFlag": false, "gwpItemFlag": false, "isItemFromWishList": false, "pwpItemFlag": false, "specialItemFlag": false, "itemTotal": 149.99, "itemTrackInfo": "XxxxxxxxXXXXXxxxxxXXXX", "mergeRequiredFlag": false, "originalPrice": 149.99, "personalizationFee": 0, "pickupRegistryApplicable": true, "pickUpFromStore": false, "promotionId": 0, "wishListId": 0, "quantity": 1, "retailPrice": 149.99, "sequenceNumber": 1, "siteAvailablilityFlag": true, "surcharges": 0, "productId": 294790, "upcId": 1205976, "upcNumber": "86279021915", "uycTotalDiscountedPrice": 0, "uycDiscountedPercentage": 0, "uycPercentDiscount": 0 } ], "promotionOffers": [], "uycApplicable": false } }
7. Delete an Item from the Bag:
Request URL
DELETE
http://api.macys.com/order/v1/bags/8709998e-a5ca-445f-af57-5c2c102ddbef/items/1
Header
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Content-type: application/json
Request Body (Payload)
{ "item": { "sequenceNumber": 1, "upcId": "32525889", "pickUpFromStore": "true" } }
Response
{ "bag": { "bag": { "bagId": 431351478, "storeLocationNumber": 0, "owner": { "userId": 9518755051, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 0, "itemCount": 0, "grandTotal": 0, "merchandiseTotal": 0, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "items": [], "uycApplicable": false } }
8. Retrieve the Bag to Confirm the Item is Removed
Request URL
GET
https://api.macys.com/order/v1/bags?userGuid=dec5963d-7449-4172-a490-254b99f100ca&bagGuid=8709998e-a5ca-445f-af57-5c2c102ddbef
Header
X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Response
{ "bag": { "bagId": 431351478, "bagGUID": "8709998e-a5ca-445f-af57-5c2c102ddbef", "storeLocationNumber": 0, "owner": { "userId": 9518755051, "bccUser": false, "userRegistryId": 0 }, "shippingSummary": { "discount": 0, "standardCharges": 0, "standardChargesBeforeDicsount": 0, "surcharges": 0, "total": 0 }, "bagSummary": { "estimatedTax": 0, "itemCount": 0, "grandTotal": 0, "merchandiseTotal": 0, "totalPersonalizationFee": 0, "totalSaved": 0, "yaqAmount": 0 }, "items": [], "uycApplicable": false } }
Docs Navigation
- Overview
- Customer Services
- Common API Characteristics
- Ad Media
- Catalog Services
- Order Services
- Mobile Utilities
- Promotion and Coupon Services
- Registry Services
- Review Services
- Store Services
- User Services
- Error Handling
- Deprecated Services
- Macy's API FAQ
- BOPS Stores
- What's New