v1 - Expenses

Create upload URL

Creates a pre-signed URL for uploading an expense receipt document

post/v1/expenses/upload-url

Request

  • Base URL
    https://light.inc (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Request body

filenamestring required

Name of the file being uploaded; kept as the receipt's file name

contentTypestring required

MIME type of the file: application/pdf, image/jpeg, image/png, image/heic, image/heif or image/tiff

shouldAutoCreateExpenseboolean

When true (default), the uploaded receipt is converted to PDF, an expense is created automatically and its fields are extracted by OCR. When false, the receipt is only stored: no expense is created and nothing is parsed; the caller creates the expense itself from the returned key.

Response

default response

uploadUrlstring url
keystring
metadataobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.