• Register

Category Browse Product v3

Get Category Browse Product

Description

Within the Category service users can browse the products in a specific category.

HTTP Method and Request URL

GET

 https://api.macys.com/v3/catalog/category/[categoryID]/browseproducts

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. Go tohttp://developer.macys.com/apps/mykeys for a list of your API keys. 

Yes

xmj9js4jkdpe1983fmwu98gh

 

Path Parameters

Parameter

Description

Mandatory

Sample Value

CategoryID

Unique ID for each category. Multiple categoryIDs can be sent in one call, limited to max 250

Yes

118 or 12,118,1

 

Query Parameters

Parameter

Description

Mandatory

Sample Value

 browseproducts

 Allows access to additional parameters below

 No

 browseproducts?sortby=price&sortorder=asc 

resultsperpage default 12. not more than 24 per page
No 20
currentpage What is current page number requested. default 1
No 2
show We return facets and products by default.  You can use this parameter to show only products or only facets No product, facet
sortby
No

price, customerrating, name, bestseller, newarrival

sortorder default is the original order returned by the database call No

asc, desc

imagewidth

imagewidth of images returned

No 100 (Pixels)
imagequality
No

90

upcimagewidth imagewidth of upc images returned No 100 (Pixels)
swatchimagewidth imagewidth of swatch images returned No 100 (Pixels)
Ex. SPECIAL_OCCASIONS There is also an ability narrow your query by using returned facet. No Bridesmaid
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 formation of URL's:

https://api.macys.com/v3/catalog/category/21683/browseproducts?currentpage=3&resultsperpage=20 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=price&sortorder=asc 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=price&sortorder=desc 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=customerrating&sortorder=desc 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=name&sortorder=asc 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=name&sortorder=desc 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=bestseller 
https://api.macys.com/v3/catalog/category/21683/browseproducts?sortby=newarrival 
https://api.macys.com/v3/catalog/category/21683/browseproducts?imagewidth=300&imagequality=90 
https://api.macys.com/v3/catalog/category/21683/browseproducts?currentpage=1&resultsperpage=1&sortby=price&sortorder=asc&SPECIAL_OCCASIONS=Bridesmaid&imagewidth=300&imagequality=90 

 

Sample Requests and Responses

Sample Request

Request URL:

GET

 https://api.macys.com/v3/catalog/category/21683/browseproducts?currentpage=1&resultsperpage=10&sortby=price&sortorder=asc&imagewidth=300&imagequality=90

HTTP Header:

x-macys-webservice-client-id: xmj9js4jkdpe1983fmwu98gh

Accept: application/json

back to top

Sample Response

{
    "resultsperpage": 12,
    "currentpage": 1,
    "totalresults": 1,
    "resptime": "199ms",
    "querydate": "2014-04-03T14:02:37.673-04:00",
    "category": [{
        "id": 21683,
        "summary": {
            "name": "Dresses",
            "categorytype": "Flexible Template",
            "categorypageurl": "http://www1.macys.com/shop/womens-apparel/dresses?id=21683&edge=hybrid",
            "categoryHighlight": false,
            "pageId": "splash_women_apparel_dresses",
            "pageType": "Browse",
            "pageTitle": "Women's Dresses,  Cocktail, Prom, Evening, Maxi",
            "metaDesc": "Shop for Womens Dresses at macys.com"
        },
        "parentcategory": {
            "type": "categoryResponseEven",
            "id": 3016,
            "summary": {
                "name": "Apparel",
                "categorytype": "Flexible Template",
                "categorypageurl": "http://www1.macys.com/shop/womens-apparel/apparel?id=3016&edge=hybrid",
                "categoryHighlight": false,
                "pageType": "Browse"
            }
 	}]
    }]
}

 

 

back to top

cURL Example

curl -X GET -H "X-Macys-Webservice-Client-ID: XXXXXXXXXX" -H "Accept: application/json" "https://api.macys.com/v3/catalog/category/118/browseproducts?currentpage=1&resultsperpage=10&sortby=price&sortorder=asc&imagewidth=300&imagequality=90"

Error Codes

Call Specific Error Codes:

NONE

General Error Handling Documentation:

Click Here


back to top

Docs Navigation