Website logo

Upload an agent branding image

Adds the agent branding image to the authenticated user's list of agent branding images. These images can be used to enhance an agent contact details. This API method is currently available only for property agents.

These images are retained indefinitely.

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

The ID of the added agent branding image.

Status Enumeration Status
Failure 0 Failure
Success 1 Success
NotMemberPhoto 2 NotMemberPhoto
NotMemberAuction 3 NotMemberAuction
NotFound 4 NotFound
PhotoId Integer PhotoId
Description String or null Description
PhotoUrls <PhotoUrl> or null PhotoUrls
Thumbnail String or null Thumbnail
List String or null List
Medium String or null Medium
Gallery String or null Gallery
Large String or null Large
FullSize String or null FullSize
PlusSize String or null PlusSize
PhotoId Integer PhotoId

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>
  <PhotoId>123</PhotoId>
  <Description>ABC</Description>
  <PhotoUrls>
    <Thumbnail>ABC</Thumbnail>
    <List>ABC</List>
    <Medium>ABC</Medium>
    <Gallery>ABC</Gallery>
    <Large>ABC</Large>
    <FullSize>ABC</FullSize>
    <PlusSize>ABC</PlusSize>
    <PhotoId>123</PhotoId>
  </PhotoUrls>
</PhotoResponse>

Example JSON Response (switch to XML)

{
  "Status": 0,
  "PhotoId": 123,
  "Description": "ABC",
  "PhotoUrls": {
    "Thumbnail": "ABC",
    "List": "ABC",
    "Medium": "ABC",
    "Gallery": "ABC",
    "Large": "ABC",
    "FullSize": "ABC",
    "PlusSize": "ABC",
    "PhotoId": 123
  }
}