Website logo

Retrieves a list of curated promotions

Retrieves a list of curated promotions, where each promotion links to a search.

URL: https://api.trademe.co.nz/v1/SearchPromotions.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: None
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

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

Returns

Collection of <SearchPromotion>

A list of curated promotions.

Title String or null

The title of the promotion.

ImageUrl String or null

The URL for the photo. The aspect ratio is currently required to be 1.376:1.

SearchApi Enumeration

The search API endpoint that should be used in conjunction with the SearchString property to build up a search URL.

General 0

General search.

UsedMotors 1

Used cars.

MotorBoat 2

Motor boats.

MotorBike 3

Motor bikes.

Residential 4

Residential property for sale.

Rental 5

Residential property to rent.

CommercialSale 6

Commercial property for sale.

CommercialLease 7

Commercial property leases.

Rural 8

Rural property.

Lifestyle 9

Lifestyle blocks.

Flatmate 10

Flatmates.

OpenHomes 11

Open homes.

Retirement 12

Retirement villages.

Job 13

Jobs.

NewHomes 14

New Homes property.

Caravan 15

Motors caravan property

Motorhome 16

Motors motorhomes property

SearchString String or null

A string containing the search parameters. This is formatted like a HTTP query string (but without a leading question mark) and can include any of the parameters accepted by the search APIs.

Example XML Response (switch to JSON)

<SearchPromotionCollection xmlns="http://api.trademe.co.nz/v1">
  <SearchPromotion>
    <Title>ABC</Title>
    <ImageUrl>ABC</ImageUrl>
    <SearchApi>General</SearchApi>
    <SearchString>ABC</SearchString>
  </SearchPromotion>
  <SearchPromotion>
    <Title>ABC</Title>
    <ImageUrl>ABC</ImageUrl>
    <SearchApi>General</SearchApi>
    <SearchString>ABC</SearchString>
  </SearchPromotion>
</SearchPromotionCollection>

Example JSON Response (switch to XML)

[
  {
    "Title": "ABC",
    "ImageUrl": "ABC",
    "SearchApi": 0,
    "SearchString": "ABC"
  },
  {
    "Title": "ABC",
    "ImageUrl": "ABC",
    "SearchApi": 0,
    "SearchString": "ABC"
  }
]