> ## Documentation Index
> Fetch the complete documentation index at: https://developers.lucca.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# List legal-units

> Retrieve a paginated list of legal-units.



## OpenAPI

````yaml /openapi-specs/organization-v3.yaml get /organization/structure/api/legal-units
openapi: 3.1.0
info:
  title: Organization structure API
  version: '1.0'
  description: |
    Welcome on the documentation for the Organization Structure API
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: Legal-Units
    description: Structure > Legal-units
  - name: Establishments
    description: Structure > Establishments
  - name: Departments
    description: Structure > Departments
  - name: Axis-sections
    description: Structure > Axes & Axis-sections
paths:
  /organization/structure/api/legal-units:
    parameters:
      - $ref: '#/components/parameters/Authorization'
    get:
      tags:
        - Legal-Units
      summary: List legal-units
      description: Retrieve a paginated list of legal-units.
      operationId: list-legal-units
      parameters:
        - name: id
          in: query
          description: Comma-separated list of legal-unit IDs.
          style: form
          explode: true
          schema:
            type: array
            uniqueItems: true
            items:
              type: integer
              format: int32
              minimum: 1
        - name: search
          in: query
          description: Search legal-units based on their name.
          schema:
            type: string
        - name: isArchived
          in: query
          description: >
            Filter on the "isArchived" status.

            By default, is equal to "false", thus archived legal-units are not
            returned.

            To return both archived and non-archived legal units, use
            `?isArchived=true,false`.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - true,false
            default: 'false'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields.root'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/legal-unit'
                  prev:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor of the previous page (used with the
                      ?page={{cursor}} query parameter).
                  next:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor of the next page (used with the ?page={{cursor}}
                      query parameter).
        '401':
          description: Unauthorized
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
    page:
      name: page
      in: query
      description: Page index (int - starts at 1) or cursor (string)
      schema:
        type:
          - string
          - integer
        format: int32
        minimum: 1
        default: 1
    limit:
      name: limit
      in: query
      description: Page size.
      schema:
        type: integer
        format: int32
        minimum: 0
        maximum: 100
        default: 10
    fields.root:
      name: fields.root
      in: query
      description: >-
        Include prev and next pages cursors, as well as the number of all items
        across all pages (count).
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - prev
            - next
            - count
  schemas:
    legal-unit:
      title: legal-unit
      type: object
      required:
        - id
        - name
        - countryId
      properties:
        id:
          type: integer
          format: int32
          minimum: 1
          readOnly: true
        name:
          type: string
          minLength: 0
          maxLength: 0
        code:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 0
        legalIdentificationNumber:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 0
          description: |
            Depends on the country:
            - SIREN in France
            - NIF code in Spain
        activityCode:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 0
          description: |
            France only: NAF code. Null otherwise.
        countryId:
          type: string
          minLength: 2
          maxLength: 2
          description: |
            ISO 3166 alpha-2 code for the country this legal-unit belongs to.
        country:
          type: object
          readOnly: true
          properties:
            id:
              type: integer
              format: int32
              minimum: 1
            name:
              type: string
            code:
              type: string
              description: ISO 3166 alpha-2 code.
            currencyCode:
              $ref: '#/components/schemas/currency-code'
            currency:
              type: object
              properties:
                code:
                  $ref: '#/components/schemas/currency-code'
                englishName:
                  type: string
                  description: Human readable name for this currency.
                symbol:
                  type: string
                  minLength: 1
                  description: e.g. "€" for euros.
            defaultTimeZone:
              type: string
              description: |
                Identifier of the timezone this legal-unit resides in.
              example: Europe/Paris
        headquartersId:
          type: integer
          format: int32
          description: >-
            Identifier of the establishment that belongs to this legal-unit and
            should be considered headquarters for the whole group.
        createdAt:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp of the moment this legal-unit was created.
        isArchived:
          type: boolean
          description: Is this legal-unit archived and thus should no longer be used?
    currency-code:
      type: string
      minLength: 3
      maxLength: 3
      description: ISO 4217 code.

````