Website logo

Upload and set a member's profile image

Uploads and sets the member's profile image.

These images are retained indefinitely.

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

<PhotoUploadRequest>

PhotoData String (required) PhotoData
FileName String (required) FileName
FileType String (required) FileType

Returns

<PhotoResponse>

Success if the image was added to the member's account. Failure otherwise.

Status Enumeration Status
Failure 0 Failure
Success 1 Success
NotMemberPhoto 2 NotMemberPhoto
NotMemberAuction 3 NotMemberAuction
NotFound 4 NotFound

Example XML Request (switch to JSON)

<PhotoUploadRequest xmlns="http://api.trademe.co.nz/v1">
  <PhotoData>ABC</PhotoData>
  <FileName>ABC</FileName>
  <FileType>ABC</FileType>
</PhotoUploadRequest>

Example JSON Request (switch to XML)

{
  "PhotoData": "ABC",
  "FileName": "ABC",
  "FileType": "ABC"
}

Example XML Response (switch to JSON)

<PhotoResponse xmlns="http://api.trademe.co.nz/v1">
  <Status>Failure</Status>
</PhotoResponse>

Example JSON Response (switch to XML)

{
  "Status": 0
}