Website logo

Sends an email to a friend about a listing

Sends a message to a friend via an email.

URL: https://api.trademe.co.nz/v1/Listings/{listingId}/EmailFriend.{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

listingId Integer (required)

The ID of the listing the email is about.

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

POST Data

<EmailFriendRequest>

Message String (required) Message
CopyToSelf Boolean (optional) CopyToSelf
PhoneNumber String (optional) PhoneNumber
EmailAddress String (optional) EmailAddress
FirstName String (optional) FirstName
LastName String (optional) LastName
EnquiryType Enumeration (optional) EnquiryType
Unknown 0

Default option when the EnquiryType is not known

General 1

General question

Finance 2

Finance options for the listing

TradeIn 3

Questions about Trade-In of a vehicle

TestDrive 4

Questions about a Test Drive

SpecialOffer 5

Questions about a special offer

InTransit 6

Questions about a listing that is in transit from the factory

Warranty 7

Questions about the Warranty

Insurance 8

Questions about Insurance

AvailableToOrder 9

Questions about a listing this is available to order

CertifiedPreOwned 10

Questions about a certified pre owned listin

ReferringSearchId String (optional) ReferringSearchId
EmailTo String (optional)

The email address of the recipient.

Returns

<EmailResponse>

Success Boolean

Indicates whether the operation was successful.

Example XML Request (switch to JSON)

<EmailFriendRequest xmlns="http://api.trademe.co.nz/v1">
  <Message>ABC</Message>
  <CopyToSelf>false</CopyToSelf>
  <PhoneNumber>ABC</PhoneNumber>
  <EmailAddress>ABC</EmailAddress>
  <FirstName>ABC</FirstName>
  <LastName>ABC</LastName>
  <EnquiryType>Unknown</EnquiryType>
  <ReferringSearchId>ABC</ReferringSearchId>
  <EmailTo>ABC</EmailTo>
</EmailFriendRequest>

Example JSON Request (switch to XML)

{
  "Message": "ABC",
  "CopyToSelf": false,
  "PhoneNumber": "ABC",
  "EmailAddress": "ABC",
  "FirstName": "ABC",
  "LastName": "ABC",
  "EnquiryType": 0,
  "ReferringSearchId": "ABC",
  "EmailTo": "ABC"
}

Example XML Response (switch to JSON)

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

Example JSON Response (switch to XML)

{
  "Success": false
}