Website logo

Create or update a note

Creates or updates the note on a listing.

URL: https://api.trademe.co.nz/v1/MyTradeMe/Notes.{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

<SaveNoteRequest>

Text String (required)

The text to display in the note. Cannot be empty.

ListingId Long Integer (required)

The ID of the listing to associate the note with.

NoteId Integer (optional)

The ID of the note. Can be omitted when creating a note.

OfferId Integer (optional)

The ID of the fixed price offer to associate the note with. Can be omitted if the note is not associated with a fixed price offer.

PurchaseId Integer (optional)

The ID of the Purchase to associate the note with (such as a won or sold item). Can be omitted if the note is not associated with a Purchase.

Returns

<NoteResponse>

Whether the operation was successful and the note details.

Success Boolean

Indicates whether the operation was successful.

Description String or null

The description of the error, if the operation failed.

NoteId Integer

The ID of the note.

Text String or null

The note text.

OfferId Integer

The ID of the fixed price offer, or 0 if the note is not associated with a fixed price offer.

Example XML Request (switch to JSON)

<SaveNoteRequest xmlns="http://api.trademe.co.nz/v1">
  <Text>ABC</Text>
  <ListingId>123</ListingId>
  <NoteId>123</NoteId>
  <OfferId>123</OfferId>
  <PurchaseId>123</PurchaseId>
</SaveNoteRequest>

Example JSON Request (switch to XML)

{
  "Text": "ABC",
  "ListingId": 123,
  "NoteId": 123,
  "OfferId": 123,
  "PurchaseId": 123
}

Example XML Response (switch to JSON)

<NoteResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <NoteId>123</NoteId>
  <Text>ABC</Text>
  <OfferId>123</OfferId>
</NoteResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "NoteId": 123,
  "Text": "ABC",
  "OfferId": 123
}