BOPS Bag

Description

The following document outlines a sample of how to make changes to BOPS (Buy Online - Pickup in Store) items in your shopping bag.  In the following example we are going to add, delete and edit a BOPS item in your shopping bag.

1. Add BOPS Item to Shopping Bag:

If no user or bag is specified when adding an item, a guest bag/user is created. If you want to merge your guest bag with a specific user account, use Merge Bag. This sample is adding a Keurig Single Serve Brewer to a new bag.

Sample Request

POST

https://api.macys.com/order/v1/bags?storeLocNumber=5037

Header:

X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Content-type: application/json

Request Body

{

    "item": 
    {
       "quantity": 1, 

        "upcId": 31008298
     }
}

Response

{
    "bag": {
        "bagId": 427594399,
        "bagGUID": "a9e4c0e8-979c-4334-a327-0187d67b351d",
        "storeLocationNumber": 5037,
        "owner": {
            "userId": 9457083729,
            "userGuid": "c081105e-ba49-42a1-b08b-218375a83590",
            "bccUser": false,
            "userRegistryId": 0
        },
        "shippingSummary": {
            "discount": 0,
            "method": "G",
            "standardCharges": 0,
            "standardChargesBeforeDicsount": 0,
            "surcharges": 0,
            "total": 0
        },
        "bagSummary": {
            "estimatedTax": 6,
            "itemCount": 1,
            "grandTotal": 105.99,
            "merchandiseTotal": 99.99,
            "totalPersonalizationFee": 0,
            "totalSaved": 75,
            "yaqAmount": 0
        },
        "promotions": [],
        "items": [
            {
                "autoAddChoice": "ADD",
                "discount": 75,
                "giftCardAmount": 0,
                "giftId": 0,
                "personalizationFlag": false,
                "gwpItemFlag": false,
                "isItemFromWishList": false,
                "pwpItemFlag": false,
                "specialItemFlag": false,
                "itemTotal": 99.99,
                "mergeRequiredFlag": false,
                "originalPrice": 174.99,
                "personalizationFee": 0,
                "pickupRegistryApplicable": true,
                "pickUpFromStore": false,
                "promotionId": 0,
                "wishListId": 0,
                "quantity": 1,
                "retailPrice": 99.99,
                "sequenceNumber": 1,
                "siteAvailablilityFlag": true,
                "storeAvailability": "AVAILABLE",
                "surcharges": 0,
                "productId": 786173,
                "upcId": 31008298,
                "upcNumber": "649645200293",
                "uycTotalDiscountedPrice": 0,
                "uycDiscountedPercentage": 0,
                "uycPercentDiscount": 0
            }
        ],
        "promotionOffers": [],
        "uycApplicable": false
    }
}

Note: The "StoreAvailability" field will read "AVAILABLE" if both of the following conditions have been met:

1. The store specified is participating in the BOPS program.

2. The item is available.

If these conditions are not met the "StoreAvailability" field will return "UNAVAILABLE".

back to top

2. Retrieve BOPS Item From Shopping Bag:

In the last example above we added aKeurig Single Serve Brewer and choose to have it picked up at a store in CA that offers BOPS.  In the next example we have selected a different store location number to see if the item is available for BOPS pick up at a different store: Store Location number 5047 (Note:  If the store number is not specified when retreiving the bag, the BOPS service is removed from the item and the item will be ordered online.) Additionally any storelocation number can be entered to check product availablity. You can view the list of current BOPS stores by clicking here.

Sample Request

GET

https://api.macys.com/order/v1/bags?userId=9457083729&storeLocNumber=5047&show=product

Header:

X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json

Sample Response

{
    "bag": {
        "bagId": 427594399,
        "bagGUID": "a9e4c0e8-979c-4334-a327-0187d67b351d",
        "storeLocationNumber": 5047,
        "owner": {
            "userId": 9457083729,
            "bccUser": false,
            "userRegistryId": 0
        },
        "shippingSummary": {
            "discount": 0,
            "method": "G",
            "standardCharges": 0,
            "standardChargesBeforeDicsount": 0,
            "surcharges": 0,
            "total": 0
        },
        "bagSummary": {
            "estimatedTax": 6,
            "itemCount": 1,
            "grandTotal": 105.99,
            "merchandiseTotal": 99.99,
            "totalPersonalizationFee": 0,
            "totalSaved": 75,
            "yaqAmount": 0
        },
        "promotions": [],
        "items": [
            {
                "autoAddChoice": "ADD",
                "discount": 75,
                "giftCardAmount": 0,
                "giftId": 0,
                "personalizationFlag": false,
                "gwpItemFlag": false,
                "isItemFromWishList": false,
                "pwpItemFlag": false,
                "specialItemFlag": false,
                "itemTotal": 99.99,
                "mergeRequiredFlag": false,
                "originalPrice": 174.99,
                "personalizationFee": 0,
                "pickupRegistryApplicable": true,
                "pickUpFromStore": false,
                "promotionId": 0,
                "wishListId": 0,
                "quantity": 1,
                "retailPrice": 99.99,
                "sequenceNumber": 1,
                "siteAvailablilityFlag": true,
                "storeAvailability": "AVAILABLE",
                "surcharges": 0,
                "productId": 786173,
                "upcId": 31008298,
                "upcNumber": "649645200293",
                "uycTotalDiscountedPrice": 0,
                "uycDiscountedPercentage": 0,
                "uycPercentDiscount": 0
            }
        ],
        "promotionOffers": [],
        "uycApplicable": false
    }
}

Note: The "StoreAvailability" field will read "AVAILABLE" if both of the following conditions have been met.

1. The store specified is participating in the BOPS program

2. the item is available.

If these conditions are not met the "StoreAvailability" field will return "UNAVAILABLE".

back to top

3. Update BOPS Item From Shopping bag:

In this example we want to add another brewer, because two Keurig Coffee Brewers are better than one. When changing quantity, if the "storeAvailability" field changes to "UNAVAILABLE" the store does not currently have the quantity requested in stock.

Sample Request

PATCH

https://api.macys.com/order/v1/bags/a9e4c0e8-979c-4334-a327-0187d67b351d/items

Header:

X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json

Request Body

{
  "item":
    {
          "upcId": 31008298, 
     "quantity": 2
    }
}

NOTE: "BOPS Pickup Instructions" intended for the purchaser are avialable in the "BOPS_PICKUP_INSTRUCTIONS" field.

Sample Response

{
    "bag": {
        "bagId": 427594399,
        "bagGUID": "a9e4c0e8-979c-4334-a327-0187d67b351d",
        "storeLocationNumber": 0,
        "owner": {
            "userId": 9457083729,
            "bccUser": false,
            "userRegistryId": 0
        },
        "shippingSummary": {
            "discount": 0,
            "method": "G",
            "standardCharges": 0,
            "standardChargesBeforeDicsount": 0,
            "surcharges": 0,
            "total": 0
        },
        "bagSummary": {
            "estimatedTax": 6,
            "itemCount": 1,
            "grandTotal": 105.99,
            "merchandiseTotal": 99.99,
            "totalPersonalizationFee": 0,
            "totalSaved": 75,
            "yaqAmount": 0
        },
        "promotions": [],
        "items": [
            {
                "autoAddChoice": "ADD",
                "discount": 75,
                "giftCardAmount": 0,
                "giftId": 0,
                "personalizationFlag": false,
                "gwpItemFlag": false,
                "isItemFromWishList": false,
                "pwpItemFlag": false,
                "specialItemFlag": false,
                "itemTotal": 99.99,
                "mergeRequiredFlag": false,
                "originalPrice": 174.99,
                "personalizationFee": 0,
                "pickupRegistryApplicable": true,
                "pickUpFromStore": false,
                "promotionId": 0,
                "wishListId": 0,
                "quantity": 1,
                "retailPrice": 99.99,
                "sequenceNumber": 1,
                "siteAvailablilityFlag": true,
                "surcharges": 0,
                "productId": 786173,
                "upcId": 31008298,
                "upcNumber": "649645200293",
                "uycTotalDiscountedPrice": 0,
                "uycDiscountedPercentage": 0,
                "uycPercentDiscount": 0
            }
        ],
        "promotionOffers": [],
        "uycApplicable": false
    }
}

back to top

4. Delete from BOPS Item from Shopping Bag:

Delete is used to completely remove the item from the shopping bag. If you want to change quanity to a lesser amount use Update BOPS Item and specify the desired quantity in your call.

Sample Request

Request URL:

POST

https://api.macys.com/order/v1/bags/a9e4c0e8-979c-4334-a327-0187d67b351d/items/1

Header:

X-Macys-Webservice-Client-Id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json

Request Body

{

 "deleteitemsrequest" :

    {

  "upcid":31008298

    }

}

Sample Response

{
    "bag": {
        "bagId": 427594399,
        "storeLocationNumber": 0,
        "owner": {
            "userId": 9457083729,
            "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
    }
}

back to top

Docs Navigation