LeanLaw Developer Platform
LeanLaw API

Expense

Endpoint:https://api.leanlaw.io

Get a list of expenses

GET
https://api.leanlaw.io
/v2/expenses

Get a list of expensesquery Parameters

  • startDatestring · date

    Only return expenses that are dated after or including this date

  • endDatestring · date

    Only return expenses that are dated before or including this date

  • userIdstring · uuid

    Only return expenses that are associated with this user

  • matterIdstring · uuid

    Only return expenses that are associated with this matter

  • clientIdstring · uuid

    Only return expenses that are associated with this client

  • billedboolean

    Return items based on whether they are billed or not

  • selectstring

    Used to include additional detail in the response with a comma separated list of object identifiers.. Fields can be prefixed with a minus sign to exclude them. Supported fields: client, matter, user, meta

  • sortstring

    Sorting parameters for expenses. Supported sort fields: date, amount, description Example: "-date,amount" sorts by date descending, then amount ascending

  • limitinteger · int32

    Maximum number of items to return (default: 1000)

  • offsetinteger · int32

    Number of items to offset (default: 0)

  • modifiedSincestring · date-time

    Only return results that have the ModifiedDate property after this date and time (optional)

Get a list of expensesResponses

OK

  • dataarray | null

    The list of items returned by the API

  • paginationobject

    Pagination information


Create a new expense

POST
https://api.leanlaw.io
/v2/expenses

Create a new expenseRequest Body

  • matterIdstring · uuid · required

    The matter is required.

  • datestring · date · required

    The date of the expense. Required

  • descriptionstring · minLength: 1 · required

    The description of the expense. Required

  • amountnumber · double · required

    The amount of the expense (Required)

  • userIdstring | null · uuid

    The user associated with the expense. If ommitted, the expense with associated with the firm

  • expenseCodestring | null

    LEDES activity code

Create a new expenseResponses

OK

No data returned

Get an expense by id

GET
https://api.leanlaw.io
/v2/expenses/{id}

Get an expense by idpath Parameters

  • idstring · uuid · required

    The id of the expense

Get an expense by idResponses

OK

  • dataobject

Update an expense

PUT
https://api.leanlaw.io
/v2/expenses/{id}

Updating an expense is only possible if it has not been billed (added to an invoice). The update is "sparse", where only the fields that are provided in the request will be updated.

Update an expensepath Parameters

  • idstring · uuid · required

    The id of the expense to update

Update an expenseRequest Body

  • matterIdstring | null · uuid

    Update the matter of the expense.

  • userIdstring | null · uuid

    Update the user of the expense.

  • datestring | null · date

    Update the date of the expense

  • descriptionstring | null

    Update the description of the expense, provide null to keep the current description

  • amountnumber | null · double

    Update the amount of the expense, provide null to keep the current amount

  • expenseCodestring | null

    LEDES expense code

Update an expenseResponses

OK

No data returned

Delete an expense

DELETE
https://api.leanlaw.io
/v2/expenses/{id}

Deleting an expense will remove it from the system permanently. Expenses that have been billed (added to an invoice) cannot be deleted.

Delete an expensepath Parameters

  • idstring · uuid · required

    The id of the expense to delete

Delete an expenseResponses

OK

No data returned