Add Item to Default List

Description

This service enables users to add items to a List. This particular call is for unauthenticated (guest) users.

NOTE: If no user or list is specified when adding an item, a guest list is created. To merge your guest list to an authenticated user, please follow merge list.

back to top

HTTP Method and Request URL

POST

http://api.macys.com/customer/v1/lists/

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

Content-type Specifies the format of body sent. 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. Either this or UserID (guest id) param is required  macys_online_uid=user_id (macys.com)
Request Body Parameters
Parameter Description Mandatory Sample Value

list

Object name that contains wishlist details Yes See sample payload below
listType Object name that contains wishlist type  Yes W

items

Object name that contains item details Yes See sample payload below

upc

Object name that contains upc id

Yes See sample payload below
product Object name that contains product id Yes See sample payload below
id The Object that contains the upc or product id Yes

1675059

customer Object name that contains customer id information No, If this is not provided a guest wishlist is created and guest customer id is created

 

id The object that contains customer id No,If this is not provided a guest wishlist is created and guest customer id is created 619984573

qtyRequested

Quantity you want to add to wishlist

Yes 1

 

back to top

 

Sample Requests and Responses

Sample Request

BASED ON UPC ID

Request URL:

POST

http://api.macys.com/customer/v1/lists/

Sample Header:

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

Request Body(Payload)

 

{"list":{"user": {"id": 1234},"items":[{"upc": {"id": 1675059},"qtyRequested":1}]}}

Sample Response

{
    "list": {
        "listGuid": "241885ba-adc9-4503-96a9-58668ad68de4",
        "name": "John's Guest List",
        "listType": "W",
        "defaultList": true,
        "onSaleNotify": false,
        "searchable": false,
        "numberOfItems": 1,
        "user": {
            "id": 1234,
            "guid": "6beadb27-8ee3-4394-a76c-757db7ac0dd2",
            "guestUser": true
        },
        "items": [
            {
                "itemGuid": "8e2f051b-ab72-4344-93d0-faac17874b05",
                "ItemId": 667920573,
                "retailPriceWhenAdded": 0,
                "qtyRequested": 1,
                "qtyStillNeeded": 0,
                "upc": {
                    "id": 1675059,
                    "upcNumber": 855329105154,
                    "price": {
                        "retailPrice": 0,
                        "originalPrice": 0,
                        "intermediateSalesValue": 0,
                        "salesValue": 0,
                        "onSale": false,
                        "priceType": 0,
                        "basePriceType": 0
                    },
                    "availability": {
                        "available": false
                    },
                    "product": {
                        "id": 381150,
                        "name": "Soprano Plus Size Short-Sleeve Smocked-Waist Dress",
                        "active": false
                    }
                }
            }
        ]
    }
}

back to top

Sample Request

BASED ON UPC NUMBER

Request URL:

POST

http://api.macys.com/customer/v1/lists/

Sample Header:

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

Request Body(Payload)

 

{"list":{"user": {"id": 1234},"items":[{"upc": {"upcNumber": 855329105154},"qtyRequested":1}]}}

Sample Response

{
    "list": {
        "listGuid": "241885ba-adc9-4503-96a9-58668ad68de4",
        "name": "John's Guest List",
        "listType": "W",
        "defaultList": true,
        "onSaleNotify": false,
        "searchable": false,
        "numberOfItems": 1,
        "showPurchaseInfo": true,
        "createdDate": "2015-08-31 15:44:29.317944",
        "lastModified": "2015-08-31 15:44:29.317944",
        "user": {
            "id": 1234,
            "guid": "6beadb27-8ee3-4394-a76c-757db7ac0dd2",
            "guestUser": false
        },
        "items": [
            {
                "itemGuid": "8e2f051b-ab72-4344-93d0-faac17874b05",
                "ItemId": 667920573,
                "lastModified": "2015-08-31 15:44:29.343579",
                "retailPriceWhenAdded": 0,
                "qtyRequested": 2,
                "qtyStillNeeded": 0,
                "upc": {
                    "id": 1675059,
                    "upcNumber": 855329105154,
                    "price": {
                        "retailPrice": 0,
                        "originalPrice": 0,
                        "intermediateSalesValue": 0,
                        "salesValue": 0,
                        "onSale": false,
                        "priceType": 0,
                        "basePriceType": 0
                    },
                    "availability": {
                        "available": false
                    },
                    "product": {
                        "id": 381150,
                        "name": "Soprano Plus Size Short-Sleeve Smocked-Waist Dress",
                        "active": false
                    }
                }
            }
        ]
    }
}

 

Sample Request

BASED ON USER GUID

Request URL:

POST

http://api.macys.com/customer/v1/lists/

Sample Header:

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

Request Body(Payload)

 

{"list":{"user": {"guid": "6beadb27-8ee3-4394-a76c-757db7ac0dd2"},"items":[{"upc": {"id": 1675059},"qtyRequested":1}]}}

Sample Response

{
    "list": {
        "listGuid": "241885ba-adc9-4503-96a9-58668ad68de4",
        "name": "John's Guest List",
        "listType": "W",
        "defaultList": true,
        "onSaleNotify": false,
        "searchable": false,
        "numberOfItems": 1,
        "showPurchaseInfo": true,
        "createdDate": "2015-08-31 15:44:29.317944",
        "lastModified": "2015-08-31 15:44:29.317944",
        "user": {
            "id": 1234,
            "guid": "6beadb27-8ee3-4394-a76c-757db7ac0dd2",
            "guestUser": false
        },
        "items": [
            {
                "itemGuid": "8e2f051b-ab72-4344-93d0-faac17874b05",
                "ItemId": 667920573,
                "lastModified": "2015-08-31 15:49:28.842296",
                "retailPriceWhenAdded": 0,
                "qtyRequested": 3,
                "qtyStillNeeded": 0,
                "upc": {
                    "id": 1675059,
                    "upcNumber": 855329105154,
                    "price": {
                        "retailPrice": 0,
                        "originalPrice": 0,
                        "intermediateSalesValue": 0,
                        "salesValue": 0,
                        "onSale": false,
                        "priceType": 0,
                        "basePriceType": 0
                    },
                    "availability": {
                        "available": false
                    },
                    "product": {
                        "id": 381150,
                        "name": "Soprano Plus Size Short-Sleeve Smocked-Waist Dress",
                        "active": false
                    }
                }
            }
        ]
    }
}

Sample Request

BASED ON LIST TYPE

Request URL:

POST

http://api.macys.com/customer/v1/lists/

Sample Header:

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

Request Body(Payload)

 

{"list":{"listType":"W","user": {"id": 1234},"items":[{"upc": {"id": 1675059},"qtyRequested":1}]}}

Sample Response

{
    "list": {
        "listGuid": "241885ba-adc9-4503-96a9-58668ad68de4",
        "name": "John's Guest List",
        "listType": "W",
        "defaultList": true,
        "onSaleNotify": false,
        "searchable": false,
        "numberOfItems": 1,
        "showPurchaseInfo": true,
        "createdDate": "2015-08-31 15:44:29.317944",
        "lastModified": "2015-08-31 15:44:29.317944",
        "user": {
            "id": 1234,
            "guid": "6beadb27-8ee3-4394-a76c-757db7ac0dd2",
            "guestUser": false
        },
        "items": [
            {
                "itemGuid": "8e2f051b-ab72-4344-93d0-faac17874b05",
                "ItemId": 667920573,
                "lastModified": "2015-08-31 15:53:27.082043",
                "retailPriceWhenAdded": 0,
                "qtyRequested": 4,
                "qtyStillNeeded": 0,
                "upc": {
                    "id": 1675059,
                    "upcNumber": 855329105154,
                    "price": {
                        "retailPrice": 0,
                        "originalPrice": 0,
                        "intermediateSalesValue": 0,
                        "salesValue": 0,
                        "onSale": false,
                        "priceType": 0,
                        "basePriceType": 0
                    },
                    "availability": {
                        "available": false
                    },
                    "product": {
                        "id": 381150,
                        "name": "Soprano Plus Size Short-Sleeve Smocked-Waist Dress",
                        "active": false
                    }
                }
            }
        ]
    }
}

cURL Example

curl -X POST -H "X-Macys-Webservice-Client-Id: xxxxxxxxxx" -H "Accept: application/json" -H "Content-Type: application/json"  -d '{"list":{"user": {"id": 1234},"items":[{"upc": {"upcNumber": 855329105154},"qtyRequested":1}]}}' http://api.macys.com/customer/v1/lists/

Error Codes

Call Specific Error Codes:

  • Error Code: 10103 Error Message : Either user id or user guid missing or invalid

  • Error Code: 10104 Error Message : List type not supported

  • Error Code: 10105 Error Message : Invalid list type

  • Error Code: 100113 Error Message : Item details missing

  • Error Code: 100114 Error Message : Upc details missing

  • Error Code: 100115 Error Message : Item qty details missing

  • Error Code: 100116 Error Message : Adding Mulitple items in single call not supported

  • Error Code: 100117 Error Message : Invalid User

 

General Error Handling Documentation:

Click Here

back to top

Docs Navigation