Website logo

Retrieve your favourite searches with details

URL: https://api.trademe.co.nz/v1/favourites/searches-detail/{filter}.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: MyTradeMeRead: Read your membership & listing data.
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

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

Returns

<VersionedSavedSearchListViewModel>

TotalCount Integer

The total number of items available across all pages.

Page Integer

The current page number.

PageSize Integer

The number of items per page.

Version String or null

The version of the view model.

List Collection of <SavedSearchCard> or null

The list of saved search cards for the current page.

favouriteId Integer

The ID of the favourite.

searchApi Enumeration

The search API endpoint that should be used in conjunction with the SearchString property to build up a search URL. Examples include "General", "Motors/Used", etc.

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.

emailOptions Enumeration

Indicates how often the email updates should be sent for this favourite.

None 0

No emails are sent.

Daily 1

An email is sent every day.

Every3Days 3

An email is sent each third day.

Weekly 7

An email is sent every week.

option Enumeration

The favourite type. Only used when updating and deleting.

None 0

Nothing

Category 1

Category

Search 3

General search

AttributeSearch 4

Attributed search

Seller 6

Seller

favouritePushFrequency Enumeration

The push notification of the favourite, which the FavouriteId property refers to.

None 0

Push not enabled for this favourite.

Instant 1

Push is enabled for this favourite.

lastAccessed DateTime or null

The date the favourite was last accessed in UTC format.

searchName String or null

The custom name the user has given to the saved search.

title String or null

The primary title to display for the saved search card.

subTitle String or null

The secondary text or subtitle to display for the saved search card.

imageUrls Collection of String

A URL for a representative images to display on the card. This could be a single image or a static map image.

hasNewSearches Boolean

A flag indicating if there are new results for this search since it was last viewed.

newSearchText String or null

The display text for the new results label (e.g., "15 new").

newSearchesSearchString String or null

An optional search string to view only the new items. Null if there are no new items.

This type is not used directly, refer to usage of the following sub-types.

SavedSearchListViewModel <SavedSearchListViewModel>
Usage Format for JSON { "__type"="SavedSearchListViewModel:http://api.trademe.co.nz/v1" }
Format for XML < i:type="SavedSearchListViewModel">
TotalCount Integer

The total number of items available across all pages.

Page Integer

The current page number.

PageSize Integer

The number of items per page.

Version String or null

The version of the view model.

List Collection of <SavedSearchCard> or null

The list of saved search cards for the current page.

favouriteId Integer

The ID of the favourite.

searchApi Enumeration

The search API endpoint that should be used in conjunction with the SearchString property to build up a search URL. Examples include "General", "Motors/Used", etc.

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.

emailOptions Enumeration

Indicates how often the email updates should be sent for this favourite.

None 0

No emails are sent.

Daily 1

An email is sent every day.

Every3Days 3

An email is sent each third day.

Weekly 7

An email is sent every week.

option Enumeration

The favourite type. Only used when updating and deleting.

None 0

Nothing

Category 1

Category

Search 3

General search

AttributeSearch 4

Attributed search

Seller 6

Seller

favouritePushFrequency Enumeration

The push notification of the favourite, which the FavouriteId property refers to.

None 0

Push not enabled for this favourite.

Instant 1

Push is enabled for this favourite.

lastAccessed DateTime or null

The date the favourite was last accessed in UTC format.

searchName String or null

The custom name the user has given to the saved search.

title String or null

The primary title to display for the saved search card.

subTitle String or null

The secondary text or subtitle to display for the saved search card.

imageUrls Collection of String

A URL for a representative images to display on the card. This could be a single image or a static map image.

hasNewSearches Boolean

A flag indicating if there are new results for this search since it was last viewed.

newSearchText String or null

The display text for the new results label (e.g., "15 new").

newSearchesSearchString String or null

An optional search string to view only the new items. Null if there are no new items.

Example XML Response (switch to JSON)

<VersionedSavedSearchListViewModel xmlns="http://api.trademe.co.nz/v1">
  <TotalCount>123</TotalCount>
  <Page>123</Page>
  <PageSize>123</PageSize>
  <Version>ABC</Version>
  <List>
    <SavedSearchCard>
      <favouriteId>123</favouriteId>
      <searchApi>General</searchApi>
      <searchString>ABC</searchString>
      <emailOptions>None</emailOptions>
      <option>None</option>
      <favouritePushFrequency>None</favouritePushFrequency>
      <lastAccessed>2018-01-01T00:00:00Z</lastAccessed>
      <searchName>ABC</searchName>
      <title>ABC</title>
      <subTitle>ABC</subTitle>
      <imageUrls>
        <string>ABC</string>
        <string>ABC</string>
      </imageUrls>
      <hasNewSearches>false</hasNewSearches>
      <newSearchText>ABC</newSearchText>
      <newSearchesSearchString>ABC</newSearchesSearchString>
    </SavedSearchCard>
    <SavedSearchCard>
      <favouriteId>123</favouriteId>
      <searchApi>General</searchApi>
      <searchString>ABC</searchString>
      <emailOptions>None</emailOptions>
      <option>None</option>
      <favouritePushFrequency>None</favouritePushFrequency>
      <lastAccessed>2018-01-01T00:00:00Z</lastAccessed>
      <searchName>ABC</searchName>
      <title>ABC</title>
      <subTitle>ABC</subTitle>
      <imageUrls>
        <string>ABC</string>
        <string>ABC</string>
      </imageUrls>
      <hasNewSearches>false</hasNewSearches>
      <newSearchText>ABC</newSearchText>
      <newSearchesSearchString>ABC</newSearchesSearchString>
    </SavedSearchCard>
  </List>
</VersionedSavedSearchListViewModel>

Example JSON Response (switch to XML)

{
  "TotalCount": 123,
  "Page": 123,
  "PageSize": 123,
  "Version": "ABC",
  "List": [
    {
      "favouriteId": 123,
      "searchApi": 0,
      "searchString": "ABC",
      "emailOptions": 0,
      "option": 0,
      "favouritePushFrequency": 0,
      "lastAccessed": "\/Date(1514764800)\/",
      "searchName": "ABC",
      "title": "ABC",
      "subTitle": "ABC",
      "imageUrls": [
        "ABC",
        "ABC"
      ],
      "hasNewSearches": false,
      "newSearchText": "ABC",
      "newSearchesSearchString": "ABC"
    },
    {
      "favouriteId": 123,
      "searchApi": 0,
      "searchString": "ABC",
      "emailOptions": 0,
      "option": 0,
      "favouritePushFrequency": 0,
      "lastAccessed": "\/Date(1514764800)\/",
      "searchName": "ABC",
      "title": "ABC",
      "subTitle": "ABC",
      "imageUrls": [
        "ABC",
        "ABC"
      ],
      "hasNewSearches": false,
      "newSearchText": "ABC",
      "newSearchesSearchString": "ABC"
    }
  ]
}