CategoriesList

List of product categories

📘

New endpoint available: CategoryList

Introduction

The list of categories is related to a given classification available in the TraceParts database.

API Key

This web service requires an API Key. Please use the form to request your API Key.

Description

This API returns the list of categories for one given classification. This web service gives the structure and the labels (for one given language) of the classification.

Building a URL

The CategoriesList API request takes the following form:

https://ws.tracepartsonline.net/tpowebservices/CategoriesList?parameters

Parameters

Certain parameters are required while others are optional. As it is standard in URLs, all parameters are separated using the ampersand (&) character. The list of parameters and their possible values are enumerated below.

Required parameters

Parameter NameData typeDefault valueDescription
ApiKeystringnoneCode calling an API to track and control how the API is used
FormatstringnoneAnswer file type (xml, json)
ClassificationIDstringnoneClassificationId given by the CatalogsList API
LanguagestringenLanguageID given by the LanguagesList API

Optional parameters

Parameter NameData typeDefault valueDescription
UserEmailstringnoneUser email / User ID
ActiveJsonLightboolean0Enables the light version when json is the answer file type
httpsboolean0URL returned in the answer will use the https protocol

Example of CategoriesList API

The request below returns all categories of the Accuride International catalog, as an xml file, with an English content.

https://ws.tracepartsonline.net/tpowebservices/CategoriesList?ClassificationId=ACCURIDE&Language=en&Format=xml&ApiKey={ApiKey}&https=1

By changing the Format and adding the ActiveJsonLight, CategoriesList returns all categories of the Accuride International catalog, as a light Json file.

https://ws.tracepartsonline.net/tpowebservices/CategoriesList?ClassificationId=ACCURIDE&Language=en&Format=json&ActiveJsonLight=1&ApiKey={ApiKey}&https=1

CategoriesList responses

CategoriesList responses are returned in the format indicated by the Format parameter within the URL request’s path.

JSON Output

A sample HTTP request is shown below, displaying some of the available categories.

{
"path":"/F_ACCURIDE/",
"title":"Accuride International"
"pathCaption":"/accuride-international/"
"classificationId":"ACCURIDE"
"pictureUrl":""
"level":0
"description":""
},
{
"path":"/F_ACCURIDE/ACCURIDE.010/",
"title":"Slides for Electronic Enclosures / Rack Mounting"
"pathCaption":"/accuride-international/slides-for-electronic-enclosures-rack-mounting/"
"classificationId":"ACCURIDE"
"pictureUrl":"https://www.tracepartsonline.net/PartsDefs/Production/System/Pictures/ACCURIDE/3507M.gif"
"level":1
"description":"Slides for Electronic Enclosures / Rack Mounting | Load Rating: 100 to 200 lbs"
},
{
"path":"/F_ACCURIDE/ACCURIDE.010/ACCURIDE.010.010/",
"title":"2807 - Electronic Enclosure, Low Profile Slide"
"pathCaption":"/accuride-international/slides-for-electronic-enclosures-rack-mounting/2807-electronic-enclosure-low-profile-slide/"
"classificationId":"ACCURIDE"
"pictureUrl":"https://www.tracepartsonline.net/PartsDefs/Production/System/Pictures/ACCURIDE/2807_pic_smM.gif"
"level":2
"description":""
}

XML Output

Same example as above.

<WsCategorie>
<ClassificationId>ACCURIDE</ClassificationId>
<Description/>
<Level>0</Level>
<Path>/F_ACCURIDE/</Path>
<PathCaption>/accuride-international/</PathCaption>
<PictureUrl/>
<Title>Accuride International</Title>
</WsCategorie>
<WsCategorie>
<ClassificationId>ACCURIDE</ClassificationId>
<Description>Slides for Electronic Enclosures / Rack Mounting | Load Rating: 100 to 200 lbs</Description>
<Level>1</Level>
<Path>/F_ACCURIDE/ACCURIDE.010/</Path>
<PathCaption>/accuride-international/slides-for-electronic-enclosures-rack-mounting/</PathCaption>
<PictureUrl>https://www.tracepartsonline.net/PartsDefs/Production/System/Pictures/ACCURIDE/3507M.gif</PictureUrl>
<Title>Slides for Electronic Enclosures / Rack Mounting</Title>
</WsCategorie>
<WsCategorie>
<ClassificationId>ACCURIDE</ClassificationId>
<Description/>
<Level>2</Level>
<Path>/F_ACCURIDE/ACCURIDE.010/ACCURIDE.010.010/</Path>
<PathCaption>/accuride-international/slides-for-electronic-enclosures-rack-mounting/2807-electronic-enclosure-low-profile-slide/</PathCaption>
<PictureUrl>https://www.tracepartsonline.net/PartsDefs/Production/System/Pictures/ACCURIDE/2807_pic_smM.gif</PictureUrl>
<Title>2807 - Electronic Enclosure, Low Profile Slide</Title>
</WsCategorie>

CategoriesList response elements

CategoriesList responses contain seven elements:

  • “classificationId”: TraceParts ID for the catalog. It is 33 characters maximum (A through Z, 0 through 9 and – and _ ).
  • “Description”: description of the category, depending on the language.
  • “Title”: label of the category, depending on the language.
  • “Path”: path of the structure of the classification treeview, with the CategoryIDs.
  • “PathCaption”: path of the structure of the classification treeview, with the labels usable in a URL, for instance.
  • “PictureURL”: path to the category’s logo. It is 80 pixels high with a maximum width of 108 pixels. There is no minimum width.
  • “Level”: integer which gives the level in the classification treeview (0: root | 1: first level | 2: second level | …).

Developer support

Please contact us for any problem, question or comment related to this content integration.

Last updated October 26, 2017