PUT /api/attachments/:id
Rotate image

Update an existing image by changing its rotation angle

Params

Param name Description
attachment
required

Validations:

  • Must be a Hash

attachment[transaction_id]
required

Receipt ID

Validations:

  • Must be Integer

attachment[rotate_angle]
optional

How many degrees to rotate an image to; may be either positive or negative number, e.g. 30, -90

Validations:

  • Must be Integer


POST /api/attachments
Upload new image

Upload new attachment either to existing receipt or initiate creating new receipt

Params

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:

  • Must be Hash

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:

  • Must be Integer

draft
optional

If equal to 1, attachment can be saved without a transaction_id

Validations:

  • Must be Integer


DELETE /api/attachments/:id
Delete image

Params

Param name Description
id
required

Attachment ID

Validations:

  • Must be Integer