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-Keystring
Request body
application/json;charset=UTF-8
-
receiptDocumentKeystringrequiredKey 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.
-
originalCurrencystringrequired -
performedDatestring · daterequiredDate the expense was incurred; also the date of the exchange rate used when billingAmount is derived
-
detailedDescriptionstringFree-text description of the expense as a whole; each line carries its own description
-
lineItemsarray of objectrequiredAt least one line. The reimbursement category of a line drives the GL account and tax code of the reimbursement.
-
originalAmountinteger · int64requiredAmount in minor units of originalCurrency (e.g. 1250 for 12.50)
-
billingAmountinteger · int64Amount in minor units of the user's reimbursement currency. Optional: equals originalAmount when the currencies match, otherwise derived from the exchange rate of performedDate.
-
descriptionstringrequiredWhat the line is for; shown on the expense and on the reimbursement
-
reimbursementCategoryIdstring · uuidrequiredReimbursement category of the line, which decides the GL account and tax code on the reimbursement. Must belong to the user's company entity.
-
Response
-
idstring · uuid -
receiptDocumentKeystring -
originalCurrencystring -
billingCurrencystring -
statusstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CREATEDIN_DRAFTSUBMITTED_FOR_REVIEWCANCELLED -
userIdstring · uuid -
companyIdstring · uuid -
performedDatestring · date -
detailedDescriptionstring -
lineItemsarray of object-
idstring · uuid -
expenseIdstring · uuid -
originalAmountinteger · int64 -
billingAmountinteger · int64 -
accountIdstring · uuid -
costCenterIdstring · uuid -
descriptionstring -
reimbursementCategoryIdstring · uuid -
createdAtstring · date-time -
updatedAtstring · date-time
-
-
createdAtstring · date-time -
updatedAtstring · date-time