POST /api/documents
Upload a new document

Upload a document that will serve as an attachment for an expense, a budget, or a sick leave. Allowed content types:

  • image/jpeg
  • image/png
  • image/gif
  • application/pdf
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.ms-excel
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Params

Param name Description
file
required

Validations:

  • Must be a File

owner_type
required

Type of an entity to attach the document to.

Validations:

  • Must be one of: Reward, Trip, DailyAllowance, Receipt, Budget, Absence.

owner_id
required

ID of an entity to attach the document to.

Validations:

  • Must be a Integer


DELETE /api/documents/:id
Delete a document

Params

Param name Description
id
required

Document ID

Validations:

  • Must be a Integer