> ## 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 document permissions

## Field support per integration

> [accordion] DATEV Rechnungswesen
>
> > [!NOTE]
> >
> > If you're not using the [Interactive Authentication Flow](https://docs.maesn.com/authentication.md#interactive-authentication-flow), make sure the query parameter `companyId` is accurately populated with the appropriate company ID. You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
>
> > [!NOTE]
> >
> > This endpoint checks whether document storage is enabled for the authenticated account. Call this before uploading files to verify that document uploads are supported.
>
> Query parameters:
>
> **companyId** `string`
>
> **rawData** `boolean`
>
> Supported response fields:
>
> **isDocumentStorageEnabled** `boolean`


## OpenAPI

````yaml get /accounting/files/documentPermissions
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:
  /accounting/files/documentPermissions:
    get:
      tags:
        - accounting
      operationId: getDocumentPermissions
      parameters:
        - 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
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: rawData
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/DocumentPermissionsResponseDto'
                        type: object
components:
  schemas:
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    DocumentPermissionsResponseDto:
      type: object
      properties:
        isDocumentStorageEnabled:
          type: boolean
          nullable: true
          example: true
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
        partialErrors:
          type: array
          description: >-
            Secondary operations that failed after the main operation succeeded.
            See [Partial Errors](/guides/partial-errors).
          items:
            type: object
            properties:
              code:
                type: string
                example: FILE_UPLOAD_FAILED
              message:
                type: string
                example: >-
                  Attachment invoice.pdf could not be uploaded to the target
                  system.
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.