July 30, 2012 15:25
mike tran
tps (edit) Topic created 9 months ago Edit Topic
How would I get products by a specific department id?
Message edited by tps (edit) 9 months ago
Mike (edit) – 9 months ago Edit Post
hi tps,
The syntax is …/products/{department-name-url-encoded-with-hyphens}~d~department_id?api_key=your_api_key
Example: http://api.sierratradingpost.com/api/1.0/products/mens-jackets-and-coats~d~142/?api_key=your_api_key
You could also grab the “ProductsUrl” field from the JSON’s results of your Department’s List or Department’s Details calls:
Dept. list call: api.sierratradingpost.com/api/1.0/departments/?api_key=your_api_key
Dept. Details Call: api.sierratradingpost.com/api/1.0/department/5/?api_key=your_api_key
JSON Results: “ProductsUrl”:“/api/1.0/products/mens-jackets-and-coats~d~142/”
Hope that helps,
-Mike