Website logo

Upload a CV, cover letter or document

Uploads a new CV, cover letter or document.

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

<SavedDocument>

SavedDocumentId Integer (optional)

The unique identifier of the document. Not required when uploading a document.

FileName String (optional)

The file name of the document. When uploading a new document, this can be the full path or just the file name, with or without a file extension.

DocumentType Enumeration (required)

The type of document.

Cv 0

A CV document

CoverLetter 1

A cover letter

Other 2

Other documents

All 4

All saved documents

SavedDocumentData String (optional)

The actual document data (base64 encoded).

UploadDate DateTime (optional)

The date the document was uploaded

Returns

<MemberSavedDocumentResponse>

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.

SavedDocumentId Integer

The unique identifier of the document.

Example XML Request (switch to JSON)

<SavedDocument xmlns="http://api.trademe.co.nz/v1">
  <SavedDocumentId>123</SavedDocumentId>
  <FileName>ABC</FileName>
  <DocumentType>Cv</DocumentType>
  <SavedDocumentData>ABC</SavedDocumentData>
  <UploadDate>2018-01-01T00:00:00Z</UploadDate>
</SavedDocument>

Example JSON Request (switch to XML)

{
  "SavedDocumentId": 123,
  "FileName": "ABC",
  "DocumentType": 0,
  "SavedDocumentData": "ABC",
  "UploadDate": "\/Date(1514764800)\/"
}

Example XML Response (switch to JSON)

<MemberSavedDocumentResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <SavedDocumentId>123</SavedDocumentId>
</MemberSavedDocumentResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "SavedDocumentId": 123
}