Website logo

Add a listing to your watchlist with options

Adds a listing to the authenticated user's watchlist with the option to control when and if an email is sent to the member warning that the auction is closing soon.

URL: https://api.trademe.co.nz/v1/MyTradeMe/WatchList/Add.{file_format}
HTTP Method: POST
Requires Authentication? Yes
Permission Required: MyTradeMeWrite: Maintain your watchlist, answer questions and post comments.
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.

POST Data

<SaveToWatchlistRequest>

ListingId Long Integer (required)

The ID of the listing to add to the watchlist.

EmailOption Enumeration (optional)

The amount of time before the auction closes to email the member.

None 0

None.

OneHour 1

One hour before the listing expires.

TwelveHours 12

Twelve hours before the listing expires.

TwentyFourHours 24

Twenty four hours before the listing expires.

UseDefault 100

Use the members saved default email option.

SaveEmailOption Boolean (optional)

Indicates whether to save the email preference as the member's default choice.

ReferringSearchQueryId String (optional)

The search query ID for the search which referred the user to the listing.

Returns

<WatchListResponse>

Details on whether the operation succeeded.

Success Boolean

Indicates whether the operation was successful.

Description String or null

The description of the error, if the operation failed.

Example XML Request (switch to JSON)

<SaveToWatchlistRequest xmlns="http://api.trademe.co.nz/v1">
  <ListingId>123</ListingId>
  <EmailOption>None</EmailOption>
  <SaveEmailOption>false</SaveEmailOption>
  <ReferringSearchQueryId>ABC</ReferringSearchQueryId>
</SaveToWatchlistRequest>

Example JSON Request (switch to XML)

{
  "ListingId": 123,
  "EmailOption": 0,
  "SaveEmailOption": false,
  "ReferringSearchQueryId": "ABC"
}

Example XML Response (switch to JSON)

<WatchListResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
</WatchListResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC"
}