LeanLaw Developer Platform
LeanLaw API

Client

Endpoint:https://api.leanlaw.io

Get a list of clients

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

Get a list of clientsquery Parameters

  • querystring

    Search for clients matching the query string. Returns clients that match partially on either name or reference.

  • referencestring

    Return client matching the reference (exact match only)

  • 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: contact, meta

  • sortstring

    Sorting parameters for clients. Supported sort fields: name, reference Example: "name,-reference" sorts by name ascending, then reference descending

  • 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 clientsResponses

OK

  • dataarray | null

    The list of items returned by the API

  • paginationobject

    Pagination information


Create a new client

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

Create a new clientRequest Body

  • namestring · minLength: 1 · required

    The name of the client

  • referencestring | null

    A reference number for the client

  • contactobject
  • notesstring | null

    Notes about the client

Create a new clientResponses

OK

  • dataobject

    A client of the firm with contact information and other detail

    Example: {"id":"f7335cff-78fe-411b-adc7-c6a07b8fbdef","name":"Doe, John","contact":{"firstName":"John","lastName":"Doe","email":"[email protected]"}}

Get a client by id

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

Get a client by idpath Parameters

  • idstring · uuid · required

    The id of the client

Get a client by idResponses

OK

  • dataobject

    A client of the firm with contact information and other detail

    Example: {"id":"f7335cff-78fe-411b-adc7-c6a07b8fbdef","name":"Doe, John","contact":{"firstName":"John","lastName":"Doe","email":"[email protected]"}}

Update a client

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

Update a clientpath Parameters

  • idstring · uuid · required

    The id of the client to update

Update a clientRequest Body

  • namestring | null

    The name of the client, if not provided, the current name will not be changed

  • referencestring | null

    A reference number for the client, if not provided, the current reference will not be changed

  • contactobject
  • notesstring | null

    Notes about the client, if not provided, the current notes will not be changed

Update a clientResponses

OK

  • dataobject

    A client of the firm with contact information and other detail

    Example: {"id":"f7335cff-78fe-411b-adc7-c6a07b8fbdef","name":"Doe, John","contact":{"firstName":"John","lastName":"Doe","email":"[email protected]"}}

Delete a client

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

Deleting a client will remove it from the system permanently. Clients that have associated matters in the system cannot be deleted.

Delete a clientpath Parameters

  • idstring · uuid · required

    The id of the client to delete

Delete a clientResponses

OK

No data returned

Get the invoice balances for a client

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

Get the invoice balances for a clientpath Parameters

  • idstring · uuid · required

    The id of the client

Get the invoice balances for a clientResponses

OK

  • dataobject

    Financial summary of the client