Website logo

Post a question or comment on a listing

Adds a question (or a comment) to a listing. The seller will be notified.

URL: https://api.trademe.co.nz/v1/Listings/{listingId}/addcomment.{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 to add the comment to.

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

POST Data

<ListingAddComment>

comment String (required)

The comment text (500 characters max).

FirearmsLicence String (optional)

The user's firearms licence number. This is required for firearms purchases.

FirearmsLicenceHolder <FirearmsLicenceHolderDetails> (optional)

The user Enters First, Middle, and Last Names associated to the firearms licence.

FirstName String (required)

First name of Licence Holder. Required;

MiddleNames String (optional)

Middle Names of Licence Holder. Optional;

LastName String (required)

Last name of Licence Holder. Required;

IsBuyerOlderThan18 Boolean (optional)

The user agrees they are older than 18. This is required for wine purchases.

Returns

<Question>

A ListingQuestion that contains the added comment.

ListingId Long Integer

The ID of the listing this question belongs to.

ListingQuestionId Long Integer

The question ID.

Comment String or null

The text of the question.

CommentDate DateTime

The date and time the question was asked.

Answer String or null

The answer given to the question by the owner of the listing.

AnswerDate DateTime

The date the question was answered.

IsSellerComment Boolean

Indicates whether this is a comment from the seller rather than a question.

AskingMember <Member> or null

The member details for the member asking the question.

MemberId Integer

The ID of the member. This may be 0, if we determine it is necessary to protect the member's privacy.

Nickname String or null

The nickname of the member. Some characters may be changed, if we determine it is necessary to protect the member's privacy.

DateAddressVerified DateTime

The date the member was address verified.

DateJoined DateTime

The date the member joined.

UniqueNegative Integer

The number of distinct members who have placed negative feedback against this member.

UniquePositive Integer

The number of distinct members who have placed positive feedback against this member.

FeedbackCount Integer

The member's total feedback (UniquePositive minus UniqueNegative).

IsAddressVerified Boolean

Indicates whether the member has been address verified.

IsDealer Boolean

Indicates whether the member is a car dealer.

IsAuthenticated Boolean

Indicates whether the member is authenticated.

Photo String or null

The profile photo URL of the member

Example XML Request (switch to JSON)

<ListingAddComment xmlns="http://api.trademe.co.nz/v1">
  <comment>ABC</comment>
  <FirearmsLicence>ABC</FirearmsLicence>
  <FirearmsLicenceHolder>
    <FirstName>ABC</FirstName>
    <MiddleNames>ABC</MiddleNames>
    <LastName>ABC</LastName>
  </FirearmsLicenceHolder>
  <IsBuyerOlderThan18>false</IsBuyerOlderThan18>
</ListingAddComment>

Example JSON Request (switch to XML)

{
  "comment": "ABC",
  "FirearmsLicence": "ABC",
  "FirearmsLicenceHolder": {
    "FirstName": "ABC",
    "MiddleNames": "ABC",
    "LastName": "ABC"
  },
  "IsBuyerOlderThan18": false
}

Example XML Response (switch to JSON)

<Question xmlns="http://api.trademe.co.nz/v1">
  <ListingId>123</ListingId>
  <ListingQuestionId>123</ListingQuestionId>
  <Comment>ABC</Comment>
  <CommentDate>2018-01-01T00:00:00Z</CommentDate>
  <Answer>ABC</Answer>
  <AnswerDate>2018-01-01T00:00:00Z</AnswerDate>
  <IsSellerComment>false</IsSellerComment>
  <AskingMember>
    <MemberId>123</MemberId>
    <Nickname>ABC</Nickname>
    <DateAddressVerified>2018-01-01T00:00:00Z</DateAddressVerified>
    <DateJoined>2018-01-01T00:00:00Z</DateJoined>
    <UniqueNegative>123</UniqueNegative>
    <UniquePositive>123</UniquePositive>
    <FeedbackCount>123</FeedbackCount>
    <IsAddressVerified>false</IsAddressVerified>
    <IsDealer>false</IsDealer>
    <IsAuthenticated>false</IsAuthenticated>
    <Photo>ABC</Photo>
  </AskingMember>
</Question>

Example JSON Response (switch to XML)

{
  "ListingId": 123,
  "ListingQuestionId": 123,
  "Comment": "ABC",
  "CommentDate": "\/Date(1514764800)\/",
  "Answer": "ABC",
  "AnswerDate": "\/Date(1514764800)\/",
  "IsSellerComment": false,
  "AskingMember": {
    "MemberId": 123,
    "Nickname": "ABC",
    "DateAddressVerified": "\/Date(1514764800)\/",
    "DateJoined": "\/Date(1514764800)\/",
    "UniqueNegative": 123,
    "UniquePositive": 123,
    "FeedbackCount": 123,
    "IsAddressVerified": false,
    "IsDealer": false,
    "IsAuthenticated": false,
    "Photo": "ABC"
  }
}