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)

The id of the member to add to the blacklist

Returns

<BlacklistResponse>

Details on whether the operation was successful.

Success Boolean

Indicates whether the operation was successful.

Description String or null

The description of the error, if the operation failed.

MemberId Integer

The ID of the member added to the blacklist.

Status Enumeration

The status of the blacklist request.

None 0

The member was blacklisted.

Ok 0

The member was blacklisted.

MemberNotFound 1

Member was not found.

NotAuthenticated 2

The member asking is not authenticated.

NotSelf 3

Cannot blacklist self.

AlreadyBlacklisted 4

The member is already blacklisted.

OtherError 5

Something else went wrong.

NotOnBlacklist 100

The member is not in the blacklist.

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
}