Toshl Developer

Attachments

Attachment uploads are subject to pro limitations (only pro users can upload attachments) -> if your application tries to upload an attachment but does not have a valid pro account a 403 Forbidden error is returned.

Images (image/jpeg) and PDF documents (application/pdf) are supported.

Only one attachment can be uploaded at once. To upload multiple attachments please perform multiple requests.

Image should be uploaded as a jpeg and the Content-Type should be set to image/jpeg.

PDF document’s Content-Type should be set to application/pdf.

Attachments may not exceed 2MB in size.

Properties

id
readonly
string

Attachment id.

path
readonly
string

Path to the attachment. Append thumb.jpg (width 640px) or filename to path to get different variants of the attachment. Note that PDF attachments also have a thumb, which is the screenshot of the first page of the document.

filename
readonly
string

Name of the attachment file. Use it together with path to retrieve the attachment.

type
readonly
string

Attachment type can be either image or pdf.

status
read, write
string

Attachment status.

Possible values: new, uploaded, error, deleting
deleted
readonly
boolean

Is object deleted.

* denotes required field/parameter.