Upload new attachment either to an existing receipt or initiate creating a new receipt.
An example of creating a new draft transaction and adding an attachment via curl:
curl -X POST -F "file=@/home/buru/Pictures/crycat.png" -F "draft=1" https://app.bezala.com/api/attachments?token=helloworld
Response:
{"id":1091,"file":"/uploads/tmp/1622055993-1726493-0003-4122/crycat.png","transaction_id":2804}
Param name | Description |
---|---|
file required |
Either a single FILE object or a hash with one or more files for upload, e.g. {“0”: FILE1, “1”: FILE2} Validations:
|
transaction_id optional |
Receipt id in case attachment is being added to existing receipt. Warning: optional only if “draft” param is set to 1 Validations:
|
draft optional |
If equal to 1, attachment can be saved without a transaction_id Validations:
|