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.

POST Data

<DeliveryAddress>

Name String (required)

The name of the person whom the item is being delivered to.

Address1 String (required)

The first line of the address.

Address2 String (optional)

The second line of the address (optional).

Suburb String (optional)

The suburb (optional).

City String (required)

The city.

Postcode String (optional)

The postcode (optional).

Country String (optional)

The country (currently restricted to "New Zealand" or "Australia").

PhoneNumber String (optional)

The contact phone number (optional).

IsMembershipAddress Boolean (optional)

Indicates whether this address is a membership address. This type of address is comprised of address details that are supplied when registering an account. Do not supply this value when adding or updating a delivery address.

Id Integer (optional)

The ID of the delivery address. The membership address always has an ID of zero. This field is ignored when adding a delivery address.

Returns

<DeliveryAddressResponse>

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.

DeliveryAddressId Integer

The delivery address ID.

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
}