Website logo

Blacklist a member

Adds a member to the authenticated user's blacklist.

URL: https://api.trademe.co.nz/v1/mytrademe/Blacklist/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

<BlacklistRequest>

MemberId Integer (optional) MemberId

Returns

<BlacklistResponse>

Details on whether the operation was successful.

Success Boolean Success
Description String or null Description
MemberId Integer MemberId
Status Enumeration Status
None 0 None
Ok 0 Ok
MemberNotFound 1 MemberNotFound
NotAuthenticated 2 NotAuthenticated
NotSelf 3 NotSelf
AlreadyBlacklisted 4 AlreadyBlacklisted
OtherError 5 OtherError
NotOnBlacklist 100 NotOnBlacklist

Example XML Request (switch to JSON)

<BlacklistRequest xmlns="http://api.trademe.co.nz/v1">
  <MemberId>123</MemberId>
</BlacklistRequest>

Example JSON Request (switch to XML)

{
  "MemberId": 123
}

Example XML Response (switch to JSON)

<BlacklistResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <MemberId>123</MemberId>
  <Status>None</Status>
</BlacklistResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "MemberId": 123,
  "Status": 0
}