/Categories GET

Returns all the categories as a List Response filtered on the search criteria.

URL
/Categories
Verb
GET

Headers

Header Data Type Valid Values Required Description
Content-Type string application/json YES The format your data will be sent to our site.
X-DevKey string string YES The devkey assigned to the developer.
X-AccessToken string string Optional The token acquired from a POST to Users/AccessToken.

Input

NOTE: Variables to place in the query string of the request.

Parameter Data Type Valid Values Description
SearchTerm string string The keywords to use for searching items to find matching categories
SortType integer 1 - Alphabetical
2 - GunBroker.com Priority Order
Sorts output based upon SortType. Default = 2 ( GunBroker.com Priority Order )
ParentCategoryID integer positive # Returns subcategories for this parent. Default = 0 ( Top Level )
ShowOnlyFirstLevelSubCategories bool true/false Do you want all the categories one level down from the parentCategoryID? Default value = false

Optional PagingParameters

Output

If the ParentCategoryID is not valid, you will receive a 404 Not Found and a Message Response indicating the reason.

If there are no errors with the input parameters, this call will respond with a 200 OK and the following data as serialized JSON

Parameter Data Type Valid Values Description
CategoryID integer positive # id belonging to category
CategoryName string string The name of the category
CanContainItems boolean true/false Can this category contain items?
Description string string A description of the category
Count integer postive # Count by category of items found using the SearchTerm parameter
Category Path Category Path Category Path The Category Path of the current category. i.e. Bread Crumbs
SubCategories SubCategory [] SubCategoryInfos [] An arrray of SubCategoryInfo objects

Links

Rel Description Condition
search Search by this category