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

# Get companies

## System-specific requirements

<AccordionGroup>
  <Accordion title="Business Central" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/businesscentral.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=9cdc50aa9f467133e9e9372eab83f38b" width="24" height="24" data-path="logo/businesscentral.svg">
    <Note>
      Please ensure the query parameter *environmentName* is accurately filled with the respective environment to which the company belongs.
      You can obtain this value by using the `GET Environments` endpoints available under the Authentication section.
    </Note>

    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="environmentId" type="string" />
  </Accordion>

  <Accordion title="Datev Rechnungswesen" icon="https://mintcdn.com/maesn/NQwZPkomn6wLid0x/logo/datev.svg?fit=max&auto=format&n=NQwZPkomn6wLid0x&q=85&s=5589154dcfa064e1d967a067e488896a" width="24" height="24" data-path="logo/datev.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="client_number" type="number" />

    <ResponseField name="consultant_number" type="number" />

    <ResponseField name="subscription" type="Subscription">
      <Expandable title="properties">
        <ResponseField name="name" type="string" />

        <ResponseField name="active" type="boolean" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="DATEV Unternehmen Online" icon="https://mintcdn.com/maesn/NQwZPkomn6wLid0x/logo/datev.svg?fit=max&auto=format&n=NQwZPkomn6wLid0x&q=85&s=5589154dcfa064e1d967a067e488896a" width="24" height="24" data-path="logo/datev.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="client_number" type="number" />

    <ResponseField name="consultant_number" type="number" />

    <ResponseField name="subscription" type="Subscription">
      <Expandable title="properties">
        <ResponseField name="name" type="string" />

        <ResponseField name="active" type="boolean" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Dinero" icon="https://mintcdn.com/maesn/kIVKlwzahCAaENRK/logo/dinero.svg?fit=max&auto=format&n=kIVKlwzahCAaENRK&q=85&s=5c26225da75d99a6f6e099c50483eaa3" width="200" height="200" data-path="logo/dinero.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />
  </Accordion>

  <Accordion title="Exact Online" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/exact.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=afa1af7a261b22f843ac73ee60896ede" width="24" height="24" data-path="logo/exact.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />
  </Accordion>

  <Accordion title="Moneybird" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/moneybird.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4cf7d956fec579e320389df5b2a6c828" width="24" height="24" data-path="logo/moneybird.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />
  </Accordion>

  <Accordion title="Sage Accounting" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/sageactive.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=db4ef71b40820611bd17295476ff28f9" width="24" height="24" data-path="logo/sageactive.svg">
    <Note>
      This endpoint retrieves the **subscriptions** available for the user.
    </Note>

    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="subscription" type="Subscription[]">
      <Expandable title="properties">
        <ResponseField name="id" type="string" />

        <ResponseField name="name" type="string" />

        <ResponseField name="status" type="string" />

        <ResponseField name="active" type="boolean" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Sage Active" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/sageactive.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=db4ef71b40820611bd17295476ff28f9" width="24" height="24" data-path="logo/sageactive.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="environmentId" type="string" />
  </Accordion>

  <Accordion title="Twinfield" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/twinfield.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=aacf76ab75d30aabd615bc761d08f405" width="24" height="24" data-path="logo/twinfield.svg">
    Supported Response Parameters:

    <ResponseField name="id" type="string" />

    <ResponseField name="name" type="string" />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml get /auth/companies
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /auth/companies:
    get:
      tags:
        - auth
      operationId: getCompanies
      parameters:
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
          required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/CompanyResponseDto'
components:
  schemas:
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    CompanyResponseDto:
      type: object
      properties:
        id:
          type: string
          example: string
        client_number:
          type: number
          example: '1'
        consultant_number:
          type: number
          example: '223344'
        environmentId:
          type: string
          example: string
        name:
          type: string
          example: string
        subscription:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionDto'
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    SubscriptionDto:
      type: object
      properties:
        id:
          type: string
          example: ACCOUNTING
        active:
          type: boolean
          example: true
        name:
          type: string
          example: Accounting
        status:
          type: string
          example: paying
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````