Light APIv1.0.0

API / Reference / Expenses

Create line item

POST https://api.light.inc/v1/expenses/{expenseId}/line-items

Creates a new line item

Every field is optional here; reimbursementCategoryId, originalAmount and description only become mandatory at POST /v1/expenses/submit. What is given is validated: the category (and any accountId) must belong to the user's entity (EXPENSE_VALIDATION_FAILED). billingAmount is derived from originalAmount when the expense already has a currency and date. Only while the expense is IN_DRAFT or CREATED.

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

Path parameters

  • expenseId string · uuidrequired

Request body

application/json;charset=UTF-8

  • originalAmount integer · int64

  • billingAmount integer · int64

  • accountId string · uuid

  • costCenterId string · uuid

  • description string

  • reimbursementCategoryId string · uuid

Response

  • 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