• Register

Category Index V3

Description

This API provides an option to obtain all the categoryIDs in a hierarchical structure by making a call with the ‘index’ parameter.  Then you can use the GetCategoryBrowse call (Below) to make subsequent calls to get the more detailed category info.

Obtain the category hierarchy

The API enables users to discover all available categories by invoking a category\index method. Every categoryID found in the index can then be used to query for more information on that category.

HTTP Method and Request URL

GET

 https://api.macys.com/v3/catalog/category/index

back to top

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. 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

Query Parameters

Parameter

Description

Mandatory

Sample Value

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

macgicofmacysapi

Sample Requests and Responses

Sample Request

Request URL:

GET

https://api.macys.com/v3/catalog/category/index

HTTP Header:

x-macys-webservice-client-id: xmj9js4jkdpe1983fmwu98gh

Accept: application/json

Sample Response

 

{
    "resultsperpage": 0,
    "currentpage": 0,
    "totalresults": 1208,
    "resptime": "1385ms",
    "querydate": "2013-06-04T14:55:39.230-04:00",
    "category": [{
        "id": 1,
        "name": "Men",
        "categorytype": "Flexible Template",
        "categorypageurl": "http://www1.macys.com/shop/men?id=1&edge=hybrid",
        "category": [{
            "id": 9557,
            "name": "MEN'S BRANDS",
            "categorytype": "Browse",
            "categorypageurl": "http://www1.macys.com/shop/mens-clothing/mens-brands?id=9557&edge=hybrid",
            "category": [{
                "id": 2519,
                "name": "Tommy Hilfiger",
                "categorytype": "Brand Sub Splash",
                "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger?id=2519&edge=hybrid",
                "category": [{
                    "id": 8399,
                    "name": "Tommy Hilfiger Shoes",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-shoes?id=8399&edge=hybrid"
                }, {
                    "id": 11528,
                    "name": "Tommy Hilfiger Underwear & Socks",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-underwear-socks?id=11528&edge=hybrid"
                }, {
                    "id": 14873,
                    "name": "Tommy Hilfiger Coats & Jackets",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-coats-jackets?id=14873&edge=hybrid"
                }, {
                    "id": 16419,
                    "name": "Tommy Hilfiger Watches",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-watches?id=16419&edge=hybrid"
                }, {
                    "id": 18114,
                    "name": "Tommy Hilfiger Shorts & Swim",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-shorts-swim?id=18114&edge=hybrid"
                }, {
                    "id": 29412,
                    "name": "Tommy Hilfiger Pants",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-pants?id=29412&edge=hybrid"
                }, {
                    "id": 31501,
                    "name": "Tommy Hilfiger Sweaters",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-sweaters?id=31501&edge=hybrid"
                }, {
                    "id": 39852,
                    "name": "Tommy Hilfiger Jeans",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-jeans?id=39852&edge=hybrid"
                }, {
                    "id": 43088,
                    "name": "Tommy Hilfiger Suit Separates & Blazers",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-suit-separates-blazers?id=43088&edge=hybrid"
                }, {
                    "id": 58220,
                    "name": "Tommy Hilfiger Shop All",
                    "categorytype": "Browse",
                    "categorypageurl": "http://www1.macys.com/shop/mens-clothing/tommy-hilfiger-shop-all?id=58220&edge=hybrid",
                    "category": [{
                        "id": 58401,
                        "name": "Coats & Jackets",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/coats-jackets?id=58401&edge=hybrid"
                    }, {
                        "id": 58402,
                        "name": "Casual Shirts",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/casual-shirts?id=58402&edge=hybrid"
                    }, {
                        "id": 58403,
                        "name": "Dress Shirts & Ties",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/dress-shirts-ties?id=58403&edge=hybrid"
                    }, {
                        "id": 58404,
                        "name": "Jeans",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/jeans?id=58404&edge=hybrid"
                    }, {
                        "id": 58405,
                        "name": "Pants",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/pants?id=58405&edge=hybrid"
                    }, {
                        "id": 58406,
                        "name": "Polos & T-Shirts",
                        "categorytype": "GoTo",
                        "categorypageurl": "http://www1.macys.com/shop/mens-clothing/polos-t-shirts?id=58406&edge=hybrid"
                    },

TRUNCATED </span>

cURL Example

curl -X GET -H "x-macys-webservice-client-id: xxxxxxxxxxx" -H "Accept: application/json" "http://api.macys.com/v3/catalog/category/index"

Error Codes

Call Specific Error Codes:

NONE

General Error Handling Documentation:

Click Here

Docs Navigation