Website logo

Update a delivery address

Modifies a delivery addresses in the authenticated user's profile. The phone number, if present, is ignored.

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

Query String parameters

POST Data

<DeliveryAddress>

Name String (required) Name
Address1 String (required) Address1
Address2 String (optional) Address2
Suburb String (optional) Suburb
City String (required) City
Postcode String (optional) Postcode
Country String (optional) Country
PhoneNumber String (optional) PhoneNumber
IsMembershipAddress Boolean (optional) IsMembershipAddress
Id Integer (optional) Id

Returns

<DeliveryAddressResponse>

Details on whether the operation was successful.

Success Boolean Success
Description String or null Description
DeliveryAddressId Integer DeliveryAddressId

Examples

<DeliveryAddress xmlns="http://api.trademe.co.nz/v1">
<Name>John Doe</Name>
<Address1>Parliament Buildings</Address1>
<Address2>Molesworth Street</Address2>
<Suburb>Wellington Central</Suburb>
<City>Wellington</City>
<Postcode>6160</Postcode>
<Country>New Zealand</Country>
<Id>123456</Id>
</DeliveryAddress>

Example XML Request (switch to JSON)

<DeliveryAddress xmlns="http://api.trademe.co.nz/v1">
  <Name>ABC</Name>
  <Address1>ABC</Address1>
  <Address2>ABC</Address2>
  <Suburb>ABC</Suburb>
  <City>ABC</City>
  <Postcode>ABC</Postcode>
  <Country>ABC</Country>
  <PhoneNumber>ABC</PhoneNumber>
  <IsMembershipAddress>false</IsMembershipAddress>
  <Id>123</Id>
</DeliveryAddress>

Example JSON Request (switch to XML)

{
  "Name": "ABC",
  "Address1": "ABC",
  "Address2": "ABC",
  "Suburb": "ABC",
  "City": "ABC",
  "Postcode": "ABC",
  "Country": "ABC",
  "PhoneNumber": "ABC",
  "IsMembershipAddress": false,
  "Id": 123
}

Example XML Response (switch to JSON)

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

Example JSON Response (switch to XML)

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