Category Index v4
- Description
- Request URL
- Path and Query Parameters
- Sample Requests and Responses
- cURL Example
- Error Codes
Description
This service provides a list of all the active categories (or whichever categories are specified) in a hierarchical tree that can be navigated in either direction.
HTTP Method and Request URL
GET
http://api.macys.com/v4/catalog/category/[ids]?expand=[child,parent]&fields=[summary,attributes]&application=[application]&assortment=[assortment]
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 |
Query Parameters
Parameter |
Description |
Mandatory |
Sample Value |
ids |
Unique ID for each category. Multiple categoryIDs can be sent in one call, limited to max 250 |
No |
118 or 12,1 |
expand | This query parameter is used to expand the requested category parent tree/ child tree or both. expand takes the values: child, parent. The depth to which the tree needs to be expanded is specified as per example | No | child (depth(2)) or parent |
fields | The fields specifies the fields that need to be returned in the response. Currently Category Object consists of two objects summary and attributes. these are the two accepted values for fields. | No | attributes, summary |
application | Context parameter: Business logic is specific to PC/DESKTOP versus MOBILE | No | MOBILE or SITE |
assortment | Context Parameter: Business logic is specific to SITE/ WEDDING_REGISTRY | No | SITE or WEDDING_REGISTRY |
redirect |
redirect=true triggers three behaviors:
redirect=false is the Default behavior, Defined below:
|
No | true or false |
Sample Requests and Responses
Sample Request
Request URL:
GET
http://api.macys.com/v4/catalog/category/9557?expand=parent&fields=summary
HTTP Header:
x-macys-webservice-client-id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
Sample Response
{ "categoryDetails": [ { "id": 9557, "summary": { "name": "Men's Brands", "url": "http://www1.macys.com/shop/mens-clothing/mens-brands?id=9557&edge=hybrid", "child": [ { "id": 29415, "name": "Alfani" }, { "id": 28169, "name": "Calvin Klein" }, { "id": 43145, "name": "Dockers" }, { "id": 31776, "name": "INC International Concepts" }, { "id": 43141, "name": "Levi's" }, { "id": 46108, "name": "Nautica" }, { "id": 3304, "name": "Polo Ralph Lauren" }, { "id": 11345, "name": "Sean John" }, { "id": 18253, "name": "The North Face" }, { "id": 2519, "name": "Tommy Hilfiger" }, { "id": 60285, "name": "adidas" }, { "id": 58082, "name": "7 for All Mankind" }, { "id": 53433, "name": "American Rag" }, { "id": 86842, "name": "Armani Exchange" }, { "id": 20392, "name": "Armani Jeans" }, { "id": 58083, "name": "Bar III" }, { "id": 29884, "name": "Buffalo David Bitton" }, { "id": 29414, "name": "Club Room" }, { "id": 57979, "name": "Denim & Supply Ralph Lauren" }, { "id": 43206, "name": "DKNY" }, { "id": 55271, "name": "Greg Norman" }, { "id": 63725, "name": "G-Star" }, { "id": 29889, "name": "GUESS" }, { "id": 59234, "name": "Haggar" }, { "id": 64942, "name": "Polo Sport" }, { "id": 58084, "name": "Hugo Boss" }, { "id": 44356, "name": "Izod" }, { "id": 54272, "name": "Jockey" }, { "id": 52843, "name": "Kenneth Cole" }, { "id": 36943, "name": "Lacoste" }, { "id": 38348, "name": "LRG" }, { "id": 29883, "name": "Lucky Brand Jeans" }, { "id": 58432, "name": "Nike" }, { "id": 26399, "name": "Perry Ellis" }, { "id": 58477, "name": "Puma" }, { "id": 11882, "name": "Quiksilver" }, { "id": 52099, "name": "Tallia" }, { "id": 11046, "name": "Tasso Elba" }, { "id": 3153, "name": "Timberland", "url": "/shop/mens-clothing/timberland?id=3153", "hId": 47558 }, { "id": 21707, "name": "Tommy Bahama" }, { "id": 64998, "name": "Under Armour" }, { "id": 67609, "name": "Fitbit" }, { "id": 68656, "name": "G.H. Bass & Co.", "url": "/shop/featured/bass-mens" }, { "id": 67632, "name": "Michael Kors" }, { "id": 68658, "name": "Point Zero", "url": "/shop/featured/point-zero-mens" }, { "id": 68293, "name": "Ryan Seacrest Distinction" }, { "id": 67044, "name": "Shaquille O'Neal Collection" }, { "id": 65292, "name": "Vince Camuto" }, { "id": 80421, "name": "WHT SPACE" }, { "id": 62039, "name": "Weatherproof" } ], "parent": 1 } }, { "id": 1, "summary": { "name": "Men", "url": "http://www1.macys.com/shop/mens-clothing?id=1&edge=hybrid", "t": true } } ], "reference": { "roots": [ "1" ], "goto": [ { "id": 47558, "rId": 3153 } ] } }
cUrl Example
curl -X GET -H "X-Macys-Webservice-Client-ID: XXXXXXXXXXXX" -H "Accept: application/json" "http://api.macys.com/v4/catalog/category/9557?expand=parent&fields=summary"
Error Codes
Call Specific Error Codes:
{ "errorCode" : 103, "message" : "Incorrect arguments types or combination", "errorDetail" : ["CategoryId should be a positive number."], "success" : false }
General Error Handling Documentation:
Docs Navigation
- Overview
- Customer Services
- Common API Characteristics
- Ad Media
- Catalog Services
- Order Services
- Mobile Utilities
- Promotion and Coupon Services
- Registry Services
- Review Services
- Store Services
- User Services
- Error Handling
- Deprecated Services
- Macy's API FAQ
- BOPS Stores
- What's New