New Light partners with Amesto GlobalLight and Amesto Global Read the announcementRead more

List books

GET
https://api.light.inc/v1/books

Returns the company's books with the entities that post in each, the default book first and the others by name. Each ledger account belongs to one book.

Permissions checked: ledger-accounts:choose and ledger-accounts:read. What a call needs depends on the caller, the record and the request.

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

Query parameters

  • limit integer · int32

    Maximum number of items to return. Default is 50, maximum is 200.

  • cursor string

    The cursor position to start returning results from. Omit it, or provide 0, for the initial request. For subsequent requests, use nextCursor from the previous response to navigate. Cursor values are opaque and should not be constructed manually. This endpoint paginates by cursor only and has no offset parameter.

Response

  • records array of object

    List of records for the current page

    • id string · uuid

    • name string

    • groupCurrency string

      The currency the book keeps its group amounts in

    • isDefault boolean

      Whether this is the company's default book. Every company has exactly one

    • entities array of object

      The company entities that post in this book

      • companyEntityId string · uuid

      • localCurrency string

        The currency the entity's amounts are kept in within this book

      • isPrimary boolean

        Whether this book is the entity's primary book

  • hasMore boolean

    Boolean flag indicating if there are more records available

  • nextCursor string

    Cursor for fetching the next page

  • prevCursor string

    Cursor for fetching the previous page