Website logo

Retrieve your CVs, cover letters and documents

Retrieves a list of your saved CVs, cover letters and/or other documents. The actual document data is not returned, only the metadata.

URL: https://api.trademe.co.nz/v1/mytrademe/SavedDocuments.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: MyTradeMeRead: Read your membership & listing data.
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.

Query String parameters

document_type Enumeration (optional)

The type of document to return. Defaults to returning all types of documents.

Cv

A CV document

CoverLetter

A cover letter

Other

Other documents

All

All saved documents

page Integer (optional)

The page number of the set of results to return, starting from 1. Defaults to 1.

rows Integer (optional)

The number of results per page; also the maximum number of results to return. Defaults to 50.

Returns

<SavedDocumentCollection>

A collection of documents.

TotalCount Integer

The total number of results in the collection. Can be larger than the number of returned results.

Page Integer

The index of the current page of results (starts at 1).

PageSize Integer

The number of results in the current page.

List Collection of <SavedDocument> or null

A list of the results in the current page.

SavedDocumentId Integer

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

FileName String or null

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

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 or null

The actual document data (base64 encoded).

UploadDate DateTime

The date the document was uploaded

Example XML Response (switch to JSON)

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

Example JSON Response (switch to XML)

{
  "TotalCount": 123,
  "Page": 123,
  "PageSize": 123,
  "List": [
    {
      "SavedDocumentId": 123,
      "FileName": "ABC",
      "DocumentType": 0,
      "SavedDocumentData": "ABC",
      "UploadDate": "\/Date(1514764800)\/"
    },
    {
      "SavedDocumentId": 123,
      "FileName": "ABC",
      "DocumentType": 0,
      "SavedDocumentData": "ABC",
      "UploadDate": "\/Date(1514764800)\/"
    }
  ]
}