Light APIv1.0.0

API / Reference / Expenses

Create expense

POST https://api.light.inc/v1/expenses

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.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Headers

  • X-Idempotency-Key string

Request body

application/json;charset=UTF-8

  • receiptDocumentKey stringrequired

    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.

  • originalCurrency stringrequired

  • performedDate string · daterequired

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

  • detailedDescription string

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

  • lineItems array of objectrequired

    At least one line. The reimbursement category of a line drives the GL account and tax code of the reimbursement.

    • originalAmount integer · int64required

      Amount in minor units of originalCurrency (e.g. 1250 for 12.50)

    • billingAmount integer · int64

      Amount in minor units of the user's reimbursement currency. Optional: equals originalAmount when the currencies match, otherwise derived from the exchange rate of performedDate.

    • description stringrequired

      What the line is for; shown on the expense and on the reimbursement

    • reimbursementCategoryId string · uuidrequired

      Reimbursement category of the line, which decides the GL account and tax code on the reimbursement. Must belong to the user's company entity.

Response

  • id string · uuid

  • receiptDocumentKey string

  • originalCurrency string

  • billingCurrency string

  • status string

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

    One of CREATED IN_DRAFT SUBMITTED_FOR_REVIEW CANCELLED

  • userId string · uuid

  • companyId string · uuid

  • performedDate string · date

  • detailedDescription string

  • lineItems array of object

    • id string · uuid

    • expenseId string · uuid

    • originalAmount integer · int64

    • billingAmount integer · int64

    • accountId string · uuid

    • costCenterId string · uuid

    • description string

    • reimbursementCategoryId string · uuid

    • createdAt string · date-time

    • updatedAt string · date-time

  • createdAt string · date-time

  • updatedAt string · date-time