• Register

Product Recommendations V4

Description

The Product recommendations service allows you to specify a product and return related products that are recommended just as is done on Macys.com.

back to top

HTTP Method and Request URL

GET

http://api.macys.com/v4/recommendations/product/[productID]?visitorid=[visitorid]

back to top

Path and Query Parameters

HTTP Header Parameters

Parameter

Description

Mandatory

Sample Value

Accept

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

Yes

application/json

application/xml

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

Path Parameters

Parameter

Description

Mandatory

Sample Value

productID

Unique ID for each product. Multiple productIDs can be sent in one call

optional, but you need at least upcNumber or productId.

 77589 or multiple with comma separator

 

Query Parameters

Parameter

Description

Mandatory

Sample Value

visitorid Visitor ID is a unique ID that captures a person's session No 123456789
maxprods Max product returned. Default is 10.  This number should be between 1 and 9. No 5
callback If sent, the format is JSONP (JSON with Padding) with the callback returned with the JSON response. You can put anything in the callback parameter and whatever you send is returned. No magicofmacysapi

 

 

 

back to top

Sample Requests and Responses

Sample Requests

Request URL:

GET

http://api.macys.com/v4/recommendations/product/77589?visitorid=123456789&maxprods=5

HTTP Header:

x-macys-webservice-client-id: xmj9js4jkdpe1983fmwu98gh

Accept: application/json

Sample Response

{
    "recommendedproducts": [{
        "productid": 136737,
        "name": "KitchenAid KP26M1X Professional 600 6 Qt. Stand Mixer",
        "primaryimage": "1416292_fpx.tif",
        "reviewrating": 4.6341,
        "reviewsnumber": 205,
        "productprice": {
            "original": {
                "pricevalue": {
                    "low": 599.99
                }
            }
        }
    }, {
        "productid": 136769,
        "name": "KitchenAid K45SSWH Classic 4.5 Qt. Stand Mixer",
        "primaryimage": "401377_fpx.tif",
        "reviewrating": 4.8618,
        "reviewsnumber": 123,
        "productprice": {
            "original": {
                "pricevalue": {
                    "low": 349.99
                }
            }
        }
    }, {
        "productid": 393917,
        "name": "KitchenAid KSM150AP Architect 5 Qt. Stand Mixer",
        "primaryimage": "1928790_fpx.tif",
        "reviewrating": 4.7746,
        "reviewsnumber": 71,
        "productprice": {
            "original": {
                "pricevalue": {
                    "low": 499.99
                }
            }
        }
    }, {
        "productid": 494420,
        "name": "KitchenAid KSM155 5 Qt. Stand Mixer",
        "primaryimage": "1766427_fpx.tif",
        "reviewrating": 4.8621,
        "reviewsnumber": 29,
        "productprice": {
            "original": {
                "pricevalue": {
                    "low": 529.99
                }
            }
        }
    }, {
        "productid": 802011,
        "name": "KitchenAid KSM75SL 4.5 Qt. Classic Plus Stand Mixer",
        "primaryimage": "1465232_fpx.tif",
        "reviewrating": 4.7614,
        "reviewsnumber": 88,
        "productprice": {
            "original": {
                "pricevalue": {
                    "low": 349.99
                }
            }
        }
    }]
}

back to top

 

cURL Example

curl -X GET -H "X-Macys-Webservice-Client-ID: XXXXXXXXXX" -H "Accept: application/json" "http://api.macys.com/v4/recommendations/product/77589?visitorid=123456789&maxprods=5"

Error Codes

Call Specific Error Codes:

NONE

General Error Handling Documentation:

Click Here

back to top

Docs Navigation