• Register

Update Bag


Description

This service enables users update quantity of items that are already added to a shopping bag. It allows users to edit multiple items with each request.

back to top

HTTP Method and Request URL

PATCH

http://api.macys.com/order/v1/bags/{bagGUID}/items

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

Content-Type Specifies the format of body sent. Can be application/json or application/xml. Yes

application/json

application/xml

 Path Parameters

Parameter Description Mandatory Sample Value
bagGuid When present in the cookie or stored in cache from add to bag No cdfb23bc-8afe-4210-aaf2-69b55f1540da

Query Parameters

Parameter Description Mandatory Sample Value
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
scanStoreLocationNumber The location number of the store your scaning from.  (Typically used with an application that can scan bar codes) This parameter is used to see if the user qualifies for any store promotions or discounts No 73
channelType This is the channel of the application calling the service. Currently Mobile is the only valid channel. No Mobile

 

Request Body Parameters

userid

Guest User ID 

Yes, if Cookie is not provided

2150911673

upcid

UPC ID that identifies the item

Yes

3174

itemseq

The sequence number assigned to a product in bag

No

2

quantity

Quantity of the item selected 

Yes

2

gWPIndicator

Indicates if the item is a GWP or not (Gift with Purchase) Click here for more info

No, unless adding MAKECHOICE GWP

true

makeChoice

Indicates if the GWP is a MAKECHOICE GWP. Click here for more info

No, unless adding MAKECHOICE GWP

true

promoID

The promoid for the item. This can be found in the retieve bag call. Click here for more info

No, unless adding MAKECHOICE GWP

1245678

gwpUPCIdUpd

Indicates if the upcid is a GWP or not. Click here for more info

No, unless adding MAKECHOICE GWP

true

PromoCode

Promotion code to be applied on the item/bag

No

registryID

If an item from the registry is selected, add registry ID 

No

707317

wishlistID

If an item from a wishlist is selected, add registry ID 

No

landingcostcoefficient

$ value for international customer purchases

No

exchangerate

$ value for international customer purchases

No

customprice

Value of the gift card & only applicable for Virtual or Electronic Gift card (VGC/EGC)

No

200

recipientemail

Recipients email for Virtual Gift Card (VGC)

No

daniel.smith@macys.com

from

Name of user to be used in gift card subject

No

Mr. Smith

message

Gift card message

No

Happy Birthday!

to

Recipients name

No

Ms. Smith

Item Source

Only for any third party

No

Item ID

Only for Electronic Gift Card (EGC)

No

itemDescription

Only for Electronic Gift Card (EGC)

No

Gift Item ID

Only for Virtual Gift Card (VGC)

No

syndicationTransactionID

Only for Electronic Gift Card (EGC)

No

Syndication Item ID

Only for Electronic Gift Card (EGC)

No

Sample Requests and Responses

PATCH

http://api.macys.com/order/v1/bags/8709998e-a5ca-445f-af57-5c2c102ddbef/items

Sample Header:

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

Sample Request Body

{
    "item": {
        "promotionId": 19837345,
        "quantity": "1",
        "sequenceNumber": 7,
        "upcId": "32525889"
    }
} 

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
            },
            {
                "discount": 0,
                "errors": [
                    {
                        "code": 0,
                        "message": "ERROR_132_BAGSERVICE_UNAVAILABLEPRODUCT_ERRORCODE"
                    }
                ],
                "giftCardAmount": 0,
                "giftId": 0,
                "personalizationFlag": false,
                "gwpItemFlag": false,
                "isItemFromWishList": false,
                "pwpItemFlag": false,
                "specialItemFlag": false,
                "itemTotal": 2,
                "mergeRequiredFlag": false,
                "originalPrice": 2,
                "personalizationFee": 0,
                "pickupRegistryApplicable": true,
                "promotionId": 19837345,
                "wishListId": 0,
                "quantity": 1,
                "registry": {
                    "id": 0
                },
                "retailPrice": 2,
                "sequenceNumber": 7,
                "siteAvailablilityFlag": true,
                "surcharges": 0,
                "productId": 1407508,
                "upcId": 32525889,
                "upcNumber": "3360374000080",
                "uycTotalDiscountedPrice": 0,
                "uycDiscountedPercentage": 0,
                "uycPercentDiscount": 0
            }
        ],
        "promotionOffers": [],
        "uycApplicable": false
    }
}

back to top

Error Codes

Call Specific Error Codes:

 

General Error Handling Documentation:

Click Here

back to top

Docs Navigation