Files

The files API main endpoint is https://app.tradetrak.com.au/api/file/ and the following functions are currently available.

Upload file

  • Endpoint: https://app.tradetrak.com.au/api/file/<JOB #>/upload > E.G. https://app.tradetrak.com.au/api/file/0/upload
  • Request Data: The file upload API will work as a form-data upload of any file. This is the only API request not made as a type of "application/json". All files will currently be uploaded to the root directory of the job. Currently only one file can be uploaded per request.
    • file (file data)
    • description (text to describe the file)
  • Returned Data: Returns array of uploaded file, or an array containing error information if one or more files could not be uploaded.

    [{
        "id": 1,
        "name": "file.pdf",
        "size": "1234",
        "description": "A file",
    }]