Retrieve attributes for a category
Retrieves the list of attributes which are applicable to a specific category.
Some categories are currently unsupported (including subcategories): 350 (Real Estate), 5000 (Jobs) and 36 (Businesses for sale).
This API is deprecated in favour of the category details API.
URL: | https://api.trademe.co.nz/v1/Categories/{category}/Attributes.{file_format} |
---|---|
HTTP Method: | GET |
Requires Authentication? | No |
Permission Required: | Public |
Supported Formats: | XML, JSON |
Rate Limited? | No |
URL parameters
category | String (required) |
The category number for which you wish to see the attributes for. This must be a leaf category (for example, you cannot view the attributes for Computers > Desktops, but you can for Computers > Desktops > CRT monitors). |
||||
---|---|---|---|---|---|---|
file_format | Enumeration (required) | The format of the response. | ||||
|
Returns
Collection of <Attribute>
Name | String or null |
A name which uniquely identifies the attribute. Required when selling or editing. |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DisplayName | String or null |
The name of the attribute, in a form suitable for displaying to users. Not required when selling or editing. |
||||||||||||||||||
Type | Enumeration |
The type of the attribute, which determines the range of acceptable values. Not required when selling or editing. |
||||||||||||||||||
|
||||||||||||||||||||
Range | <AttributeRange> or null |
The allowed range of the attribute. Only applies to numeric attributes. Not required when selling or editing. |
||||||||||||||||||
|
||||||||||||||||||||
MaxStringLength | Integer |
The maximum allowed length of the attribute value, in characters. Only applies to string attributes. Some string attributes do not have a maximum length because they are restricted to a fixed list of options, or because any length is acceptable. Not required when selling or editing. |
||||||||||||||||||
Options | Collection of <AttributeOption> or null |
A list of options, if the attribute is restricted to a fixed set of values. Not required when selling or editing. |
||||||||||||||||||
|
||||||||||||||||||||
Units | Collection of <AttributeUnit> or null |
A list of units that apply (MHz, hectares, etc). Only applies to numeric attributes. Not required when selling or editing. |
||||||||||||||||||
|
||||||||||||||||||||
IsRequiredForSell | Boolean |
Indicates whether the attribute must be present when selling an item. |
||||||||||||||||||
GroupName | String or null |
Suggests the category name for the attribute grouping on the UI level. |
Examples
https://api.trademe.co.nz/v1/Categories/9374-9375-9377-/Attributes.xml - Retrieves attribute information for the International Accommodation category.