All Collections
Uptick API
Uptick API - Documents
Uptick API - Documents
JD avatar
Written by JD
Updated over a week ago

Uptick supports access and upload of documents programmatically.


PDFs for Uptick records

The following Uptick records generate their own PDFs:

  • Report

  • Defect quote

  • Service quote

  • Purchase order

  • Invoice

  • Dynamic form response

For any of these records, navigate to the record in the API

eg <yourcompany>.onuptick.com/api/v2/reports/1/

and then tack on a pdf/ at the end:

ie <yourcompany>.onuptick.com/api/v2/reports/1/pdf/

If the PDF has already been generated for this record, you'll receive a JSON response, including a url from which you can download the PDF.

If the PDF has not yet been generated, the response will be empty. Typically this means the Uptick record has not yet hit a point in its life cycle where the PDF should exist, however you can force the PDF to generate, or regenerate, by POSTing a blank payload to this same url.

Note that you cannot upload your own PDF for these records.


User-uploaded Documents (PDFs, images, other media)

Every record in Uptick which offers a file browser has a corresponding API endpoint through which the files can be accessed, and where additional files can be uploaded.

Firstly, navigate to the documents endpoint you're after. They all follow this format:

<yourcompany>.onuptick.com/api/v2/uploads/<resource_type_plural>/<id>/documents/

ie, for accessing documents on a property with pk=13:

<yourcompany>.onuptick.com/api/v2/uploads/properties/13/documents/

You'll see a list of files here under the "files" key, and can download them via their provided urls.

If you wish to upload your own files, you'll need to construct a multipart formdata payload using the information provided under the "upload" key, and POST it to the supplied "bucket_url".

Here is some sample javascript on how to construct your formdata payload:

// NOTE: the order of fields is important here.
const formData = new FormData()
formData.append('key', key)
formData.append('acl', preuploadConfig.acl)
formData.append('Content-Type', file.type)
formData.append('AWSAccessKeyId', preuploadConfig.aws_access_key)
formData.append('policy', preuploadConfig.policy)
formData.append('signature', preuploadConfig.signature)
if (preuploadConfig.aws_session_token) {
formData.append('X-Amz-Security-Token', preuploadConfig.aws_session_token) }
formData.append('file', file)

Happy integrating!


Frequently asked questions (click to expand)

Is it possible to bulk download PDFs of all documents from any part of Uptick using the API?

This is not possible in bulk, however the API does create endpoints for each of these for you to access these files individually.

Did this answer your question?