Website logo

Set In Trade Status

Set whether the member is a professional trader. If they are a professional trader then their listings are protected by the Consumer Guarantees Act. See also get in trade reasons API.

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

<InTradeRequest>

IsInTrade Boolean (required)

Is the member in trade

ReasonId Integer (required)

The reason for changing the in trade status. See 'ReasonId' in get in trade reasons API.

Comment String (optional)

An additional comment that is needed for specific reasons. See 'NeedsComment' in get in trade reasons API.

Returns

<InTradeResponse>

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)

<InTradeRequest xmlns="http://api.trademe.co.nz/v1">
  <IsInTrade>false</IsInTrade>
  <ReasonId>123</ReasonId>
  <Comment>ABC</Comment>
</InTradeRequest>

Example JSON Request (switch to XML)

{
  "IsInTrade": false,
  "ReasonId": 123,
  "Comment": "ABC"
}

Example XML Response (switch to JSON)

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

Example JSON Response (switch to XML)

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