Website logo

Retrieve listing duration options for a category

Retrieves the default duration and the duration options that are available for listings in 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}/Durations.{file_format}
HTTP Method: GET
Requires Authentication? No
Permission Required: Public
Supported Formats: XML, JSON
Rate Limited? No

URL parameters

category String (required)

The number of the category to retrieve durations for.

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

Returns

<ListingDurations>

Default Enumeration

The default duration for the listing.

EndDate 0

An end date will be used to set the duration.

Two 2

Two days.

Three 3

Three days.

Four 4

Four days.

Five 5

Five days.

Six 6

Six days.

Seven 7

A week.

Ten 10

Ten days.

Fourteen 14

14 days.

TwentyOne 21

21 days.

TwentyEight 28

28 days.

Thirty 30

30 days.

FortyTwo 42

42 days.

FiftySix 56

56 days.

EightyFour 84

84 days (Commercial for Sale, Commercial for Lease, New Homes only).

Ninety 90

90 days (Retirement Villages only).

HundredSixtyEight 168

168 days (Commercial for Sale, Commercial for Lease only).

UntilWithdrawn -1

until withdrawn (only available for agents outside of the services category)

Durations Collection of Enumeration or null

A list of durations this category supports.

EndDate 0

An end date will be used to set the duration.

Two 2

Two days.

Three 3

Three days.

Four 4

Four days.

Five 5

Five days.

Six 6

Six days.

Seven 7

A week.

Ten 10

Ten days.

Fourteen 14

14 days.

TwentyOne 21

21 days.

TwentyEight 28

28 days.

Thirty 30

30 days.

FortyTwo 42

42 days.

FiftySix 56

56 days.

EightyFour 84

84 days (Commercial for Sale, Commercial for Lease, New Homes only).

Ninety 90

90 days (Retirement Villages only).

HundredSixtyEight 168

168 days (Commercial for Sale, Commercial for Lease only).

UntilWithdrawn -1

until withdrawn (only available for agents outside of the services category)

Examples

https://api.trademe.co.nz/v1/Categories/1443/Durations.xml - Retrieves the listing duration options for antiques > advertising category. https://api.trademe.co.nz/v1/Categories/0266/Durations.xml - Retrieves the listing duration options for music DVDs.

Example XML Response (switch to JSON)

<ListingDurations xmlns="http://api.trademe.co.nz/v1">
  <Default>EndDate</Default>
  <Durations>
    <Duration>EndDate</Duration>
    <Duration>EndDate</Duration>
  </Durations>
</ListingDurations>

Example JSON Response (switch to XML)

{
  "Default": 0,
  "Durations": [
    0,
    0
  ]
}