Retrieve Bag

Description

This service retrieves the shopping bag of a user for displaying its contents. It provides the total amount on the bag with details on each individual item.  Each service call handles only one request.

back to top

HTTP Method and Request URL

GET

https://api.macys.com/order/v1/bags

back to top

HTTP, Path and Query Parameters

HTTP Header Parameters
Parameter Description Mandatory Sample Value
x-macys-webservice-client-id Pass the apikey as a header value which is called x-macys-webservice-client-id. The api key is the 24 character alphanumeric string assigned to your application when you registered it. Click here for a list of your API keys.
Yes

xmj9js4jkdpe1983fmwu98gh

Accept Specifies the output format. Can be application/json or application/xml. Yes

application/json

application/xml

Cookie The cookie macys_online_uid needs to be set with the user id of the macys.com customer.
No, either this or guest user id as Param is mandatory macys_online_uid=user_id (macys.com)

Query Parameters

Parameter Description Mandatory Sample Value
userId 
User ID from user auth response or from add to bag response which is stored in the cookie/cache If bagId,userGuid, or bagGuid is not provided userId must be provided. 7788802192
userGuid GUID currently does not work on the API If bagId, userId, or bagGuid is not provided userGuid must be provided.  d0b93f0e-7b0d-4775-8fa7-d47a15951558
bagId When present in the cookie or stored in cache from add to bag
If userId, userGuid, or bagGuid is not provided bagId must be provided. 222115407
bagGuid When present in the cookie or stored in cache from add to bag If bagId, userGuid, or userId is not provided bagGuid must be provided. cdfb23bc-8afe-4210-aaf2-69b55f1540da
promocode Promotion code to be applied on the item/bag should be cached in the app when entered & used when GET shoppingbag is invoked No SHADES
bagOptions A list of bag options strings to get more data about bag example: "bagOptions=INCLUDE_SAVED_BAG" 
No INCLUDE_SAVED_BAG 
INCLUDE_PRODUCTINFO 
storeLocNumber The location number of the store you would like to see product availability for. No 73
cardType Certain promotions or offers are returned depending on the Credit Card type that will be used. Click here to get the full list. No Y
registryId This is used if you are adding an item to your bag that belongs to a registry. Registry options will be provided if this ID is provided. No 2055190
bagCount This parameter allows you to just get just the bag items count. This can be set to true or false.  By default it is set to false. No true
loyaltyPoints This query parameter sometimes returns promotions or offers depending on if this is set to true or false.  By default it is set to false. No true
channelType This is the channel of the application calling the service. Currently Mobile is the only valid channel. No Mobile

 

back to top

Sample Requests and Responses

Sample Request

Request URL:

GET

https://api.macys.com/order/v1/bags?userGuid=dec5963d-7449-4172-a490-254b99f100ca

Sample Header:

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

Sample 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": 63,
            "itemCount": 3,
            "grandTotal": 1112.97,
            "merchandiseTotal": 1049.97,
            "totalPersonalizationFee": 0,
            "totalSaved": 450,
            "yaqAmount": 0
        },
        "promotions": [],
        "items": [
            {
                "autoAddChoice": "ADD",
                "discount": 450,
                "giftCardAmount": 0,
                "giftId": 0,
                "personalizationFlag": false,
                "gwpItemFlag": false,
                "isItemFromWishList": false,
                "pwpItemFlag": false,
                "specialItemFlag": false,
                "itemTotal": 1049.97,
                "mergeRequiredFlag": false,
                "originalPrice": 499.99,
                "personalizationFee": 0,
                "pickupRegistryApplicable": true,
                "pickUpFromStore": false,
                "promotionId": 0,
                "wishListId": 0,
                "quantity": 3,
                "retailPrice": 349.99,
                "sequenceNumber": 1,
                "siteAvailablilityFlag": true,
                "surcharges": 0,
                "productId": 77589,
                "upcId": 185213,
                "upcNumber": "50946872827",
                "uycTotalDiscountedPrice": 0,
                "uycDiscountedPercentage": 0,
                "uycPercentDiscount": 0
            }
        ],
        "promotionOffers": [],
        "uycApplicable": false
    }
}

 

back to top

Error Codes

General Error Handling Documentation:

Click Here

back to top

Docs Navigation