Website logo

Adds an image to the authenticated user's list of branding images

Adds an image to the authenticated user's list of branding images. These photos can be used when listing a classified. Branding images are only supported for Job listings.

At the moment, only the following image types are supported: Image types are inferred from the file name extensions and they should be one of the following types (Case is ignored): Maximum acceptable image size is 5MB.

URL: https://api.trademe.co.nz/v1/Member/{memberId}/BrandingImages.{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

memberId Integer (required)

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

POST Data

<UploadBrandingRequest>

FileName String (required)

File name (including the extension of the file to upload.)

BrandingImageType Enumeration (required)

Branding image type

Unknown 0

Default value; It should not be used

Logo 1

Branding logo (Width= 480px, Height= 200px)

Banner 2

Branding banner (Width= 758px, Height= 75px)

Square 3

Branding square (Width= 480px, Height= 480px)

ImageData String (required)

The actual image data which is base64 encoded.

Returns

<UploadBrandingResponse>

Information about the uploaded branding

Success Boolean

Indicates whether the operation was successful.

BrandingImageDetails <BrandingImageDetails> or null

The uploaded image information

BrandingId Integer

Branding image Id. Use this Id to add branding to your listings. This property is read-only.

FileName String or null

Branding image file name. This property is read-only. The file name may be different from the value provided during uploading the image.

FileSize Long Integer

Branding image file size in bytes. This property is read-only.

ImageUrl String or null

The location of the image. This property is read-only.

Priority Integer

The prorioty of this branding image relative to other uploaded images. This property is only applicable to agent branding and is ignored for listing specific branding. Default value is 0.

BrandingImageType Enumeration

Branding image type

Unknown 0

Default value; It should not be used

Logo 1

Branding logo (Width= 480px, Height= 200px)

Banner 2

Branding banner (Width= 758px, Height= 75px)

Square 3

Branding square (Width= 480px, Height= 480px)

Links Collection of <Link> or null

Links to related operations

Href String or null

An HREF representing the uri to the resource

Rel String or null

A REL representing the relationship between the sending resource and the linked resource

Prompt String or null

A PROMPT, optional display text to represent the resource to a user

Method String or null

A METHOD, optional field to represent the HTTP method/verb to use. If not provided, default to GET.

Example XML Request (switch to JSON)

<UploadBrandingRequest xmlns="http://api.trademe.co.nz/v1">
  <FileName>ABC</FileName>
  <BrandingImageType>Unknown</BrandingImageType>
  <ImageData>ABC</ImageData>
</UploadBrandingRequest>

Example JSON Request (switch to XML)

{
  "FileName": "ABC",
  "BrandingImageType": 0,
  "ImageData": "ABC"
}

Example XML Response (switch to JSON)

<UploadBrandingResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <BrandingImageDetails>
    <BrandingId>123</BrandingId>
    <FileName>ABC</FileName>
    <FileSize>123</FileSize>
    <ImageUrl>ABC</ImageUrl>
    <Priority>123</Priority>
    <BrandingImageType>Unknown</BrandingImageType>
  </BrandingImageDetails>
  <Links>
    <Link>
      <Href>ABC</Href>
      <Rel>ABC</Rel>
      <Prompt>ABC</Prompt>
      <Method>ABC</Method>
    </Link>
    <Link>
      <Href>ABC</Href>
      <Rel>ABC</Rel>
      <Prompt>ABC</Prompt>
      <Method>ABC</Method>
    </Link>
  </Links>
</UploadBrandingResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "BrandingImageDetails": {
    "BrandingId": 123,
    "FileName": "ABC",
    "FileSize": 123,
    "ImageUrl": "ABC",
    "Priority": 123,
    "BrandingImageType": 0
  },
  "Links": [
    {
      "Href": "ABC",
      "Rel": "ABC",
      "Prompt": "ABC",
      "Method": "ABC"
    },
    {
      "Href": "ABC",
      "Rel": "ABC",
      "Prompt": "ABC",
      "Method": "ABC"
    }
  ]
}