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)

FullScreenBanner 4

Branding full screen banner (Width= 1440px, Height= 250px)

Photo 5

Branding photo (Width= 712px, Height= 330px)

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

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 />
  <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": {
  },
  "Links": [
    {
      "Href": "ABC",
      "Rel": "ABC",
      "Prompt": "ABC",
      "Method": "ABC"
    },
    {
      "Href": "ABC",
      "Rel": "ABC",
      "Prompt": "ABC",
      "Method": "ABC"
    }
  ]
}