Expenses

Generate new expense reference

Changed on

Creates a reference for the new expense to be imported into the system Returns a pre-signed url that allows you to send the expense file directly to the system's storage.

In order to finish the job you need to use the pre-signed link from response (data.uploadURL) in another PUT command, attaching the file in question.

Note: The response now returns invoiceId instead of fileId to align with the expense creation workflow.

post/expenses/generate

Request

  • Base URL
    https://api.altera.co
  • URL
    https://api.altera.co/expenses/generate
  • Auth
    API key in header Authorization

Request body

namestring required

The filename (including extension)

mimestring required

Mime type of the file we wish to upload

md5string required

MD5 checksum of the file we wish to upload

overrideboolean

Override if a duplicate was found?

privateboolean

Whether the file should be marked as private

Response

OK

resultstring

Example response

{
  "result": "OK",
  "data": {
    "invoiceId": 1500
  }
}

Changes

    • info

      added the non-success response with the status

    • breaking

      the request property's minLength was increased from 0 to 3

    • breaking

      added the pattern ^[a-f0-9]{32}$ to the request property

    • warning

      the request property's maxLength was set to 255

    • warning

      removed the optional property / from the response with the status

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status