Skip to main content
POST
/
v5
/
files
/
upload
/
{entity}
Upload an attachment
curl --request POST \
  --url https://sandbox.hurdlr.com/rest/v5/files/upload/{entity} \
  --header 'Authorization: Bearer <token>'
{
  "result": "SUCCESS",
  "attachment": {
    "type": "FILE",
    "id": 123,
    "caption": "<string>",
    "publicFileUrl": "<string>",
    "date": "2023-11-07T05:31:56Z",
    "amount": 123,
    "entity": "<string>",
    "fileName": "<string>",
    "entityId": 123,
    "fileSize": "24 KB",
    "iconUrl": "https://cdn.sandbox.tight.com/icons/attachments/pdf.svg"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

entity
enum<string>
required

The Tight entity to which this attachment belongs

Available options:
bankTransfer,
business,
closing,
company,
expense,
invoice,
invoicePayment,
revenue,
taxPayment
Pattern: .+

Query Parameters

file
file
required

File to be uploaded

entityId
number

Id of the entity to which this attachment belongs

caption
string
required

Caption for the attachment, especially useful for images

date
string

Date of the attachment (e.g. if attachment is a receipt, optionally provide the receipt date)

amount
string

The dollar amount associated with the attachment (e.g. if attachment is a receipt, optionally provide the total cost on the receipt)

Response

200 - application/json

Successful operation

result
enum<string>
Available options:
SUCCESS,
FAILURE_CLOUDSTORAGE_NOT_SETUP,
FAILURE_UPLOAD_ERROR,
MASTER_SUCCESS_PERSONAL_FAILURE_UPLOAD_ERROR,
FAILURE_NO_DATA,
FAILURE_TOKEN_INVALIDATED,
FAILURE_EMAIL_TOKEN_INVALIDATED,
FAILURE_UNKNOWN_ERROR,
FAILURE_USER_OVER_QUOTA,
FAILURE_VALIDATION_ERROR
attachment
object