Website logo

Withdraw an auction or classified

Withdraw a listing from Trade Me for either being sold or unsold.

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

<WithdrawRequest>

ListingId Integer (required) ListingId
ReturnListingDetails Boolean (optional) ReturnListingDetails
Type Enumeration (required) WithdrawType
ListingWasSold 1 ListingWasSold
ListingWasNotSold 2 ListingWasNotSold
Reason String (optional) Reason
SalePrice Number (optional) SalePrice

Returns

<ListingResponse>

Success Boolean Success
Description String or null Description
ListingId Integer ListingId
Listing <ListedItemDetail> or null Listing
(This type is defined elsewhere)

Example XML Request (switch to JSON)

<WithdrawRequest xmlns="http://api.trademe.co.nz/v1">
  <ListingId>123</ListingId>
  <ReturnListingDetails>false</ReturnListingDetails>
  <Type>ListingWasSold</Type>
  <Reason>ABC</Reason>
  <SalePrice>123.0</SalePrice>
</WithdrawRequest>

Example JSON Request (switch to XML)

{
  "ListingId": 123,
  "ReturnListingDetails": false,
  "Type": 1,
  "Reason": "ABC",
  "SalePrice": 123.0
}

Example XML Response (switch to JSON)

<ListingResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <ListingId>123</ListingId>
  <Listing> ... </Listing>
</ListingResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "ListingId": 123,
  "Listing": { ... }
}