v1 - Expenses

Create expense

Creates an expense synchronously from a receipt uploaded with shouldAutoCreateExpense: false and the given line items. No OCR runs: the fields you send are what is stored. A PDF receipt is kept as-is; JPEG, PNG, HEIC and TIFF receipts are converted to PDF first. The expense is created as a draft for the authenticated user and is included in the next POST /v1/expenses/submit.

post/v1/expenses

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

Headers

X-Idempotency-Keystring

Request body

receiptDocumentKeystring required

Key returned by POST /v1/expenses/upload-url called with shouldAutoCreateExpense=false, once the file has been uploaded. A PDF is attached as-is; JPEG, PNG, HEIC and TIFF files are converted to PDF first.

originalCurrencystring required
performedDatestring date required

Date the expense was incurred; also the date of the exchange rate used when billingAmount is derived

detailedDescriptionstring nullable

Free-text description of the expense as a whole; each line carries its own description

Example request

{
  "originalCurrency": "USD"
}

Response

default response

idstring uuid
receiptDocumentKeystring
originalCurrencystring
billingCurrencystring
status'CREATED' | 'IN_DRAFT' | 'SUBMITTED_FOR_REVIEW' | 'CANCELLED'

⚠️ This enum is not exhaustive; new values may be added in the future.

userIdstring uuid
companyIdstring uuid
performedDatestring date
detailedDescriptionstring
createdAtstring date-time
updatedAtstring date-time

Example response

{
  "originalCurrency": "USD",
  "billingCurrency": "USD"
}

Changes

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