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

# Prepare DATEV Payroll

> What DATEV requires to prepare payroll is very specific and currently, as DATEV is not providing "read", this is not part of the unified model.

<Note>
  This endpoint requires the permission **Manage payroll** to be enabled in [your scope config](/scopes).
</Note>

### Example Request Body

```json theme={null}
{
  "employee_id": "EvLV61zdahkN4ftPJbmPCkdv",
  "payroll_run": {
    "date": "2022-05-01"
  },
  "fixed_payments": [
    {
      "amount": 560,
      "lohnart": 100
    }
  ],
  "hourly_payments": [
    {
      "hours": 14,
      "lohnart": 200
    },
    {
      "hours": 16,
      "lohnart": 232
    }
  ],
  "custom_lodas": [
    {
      "amount": 8,
      "lohnart": 300,
      "bearbeitungsschluessel": 4
    }
  ]
}
```


## OpenAPI

````yaml PUT /custom/datev/employees/{employee_id}/prepare-payroll
openapi: 3.1.0
info:
  title: Kombo API
  version: 1.0.0
servers:
  - url: https://api.kombo.dev/v1
    description: Kombo EU API
  - url: https://api.us.kombo.dev/v1
    description: Kombo US API
security:
  - ApiKey: []
tags:
  - name: General
  - name: Kombo Connect
    description: >-
      Endpoints for Kombo Connect, our end-user-facing flow for setting up new
      integrations.
  - name: Unified HRIS API
    description: Unified endpoints to access all the HR concepts you might need.
  - name: Unified ATS API
    description: Unified endpoints to access all the ATS concepts you might need.
  - name: Unified ATS (Assessment & Background Check) API
    description: >-
      Unified endpoints to operate Assessments and Background Checks for many
      applicant tracking systems.
  - name: Unified LMS API
    description: Unified endpoints to access all the LMS concepts you might need.
  - name: AI Apply
    description: Endpoints for AI-powered job application features.
  - name: Custom Endpoints
    description: Custom integration-specific endpoints.
paths:
  /custom/datev/employees/{employee_id}/prepare-payroll:
    put:
      tags:
        - Custom Endpoints
      summary: Prepare DATEV Payroll
      description: >-
        What DATEV requires to prepare payroll is very specific and currently,
        as DATEV is not providing "read", this is not part of the unified model.


        <Note>
          This endpoint requires the permission **Manage payroll** to be enabled in [your scope config](/scopes).
        </Note>


        ### Example Request Body


        ```json

        {
          "employee_id": "EvLV61zdahkN4ftPJbmPCkdv",
          "payroll_run": {
            "date": "2022-05-01"
          },
          "fixed_payments": [
            {
              "amount": 560,
              "lohnart": 100
            }
          ],
          "hourly_payments": [
            {
              "hours": 14,
              "lohnart": 200
            },
            {
              "hours": 16,
              "lohnart": 232
            }
          ],
          "custom_lodas": [
            {
              "amount": 8,
              "lohnart": 300,
              "bearbeitungsschluessel": 4
            }
          ]
        }

        ```
      operationId: PutCustomDatevEmployeesEmployeeIdPreparePayroll
      parameters:
        - in: header
          name: X-Integration-Id
          schema:
            type: string
          description: ID of the integration you want to interact with.
          example: datev:HWUTwvyx2wLoSUHphiWVrp28
          required: true
        - name: employee_id
          in: path
          required: true
          description: >-
            ID of the employee that should be updated. You can use their Kombo
            `id` or their ID in the remote system by prefixing it with `remote:`
            (e.g., `remote:12312`)
          schema:
            $ref: >-
              #/components/schemas/PutCustomDatevEmployeesEmployeeIdPreparePayrollParameterEmployeeId
          examples:
            example1:
              value: EvLV61zdahkN4ftPJbmPCkdv
      requestBody:
        description: PUT /custom/datev/employees/:employee_id/prepare-payroll Request body
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PutCustomDatevEmployeesEmployeeIdPreparePayrollRequestBody
            examples:
              example1:
                value:
                  payroll_run:
                    date: '2022-05-01'
                  fixed_payments:
                    - amount: 560
                      lohnart: 100
                  hourly_payments:
                    - hours: 14
                      lohnart: 200
                    - hours: 16
                      lohnart: 232
                  custom_lodas:
                    - amount: 8
                      lohnart: 300
                      bearbeitungsschluessel: 4
      responses:
        '200':
          description: >-
            PUT /custom/datev/employees/:employee_id/prepare-payroll Positive
            response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PutCustomDatevEmployeesEmployeeIdPreparePayrollPositiveResponse
        default:
          $ref: '#/components/responses/ErrorResponseGeneral'
components:
  schemas:
    PutCustomDatevEmployeesEmployeeIdPreparePayrollParameterEmployeeId:
      type: string
      description: >-
        ID of the employee that should be updated. You can use their Kombo `id`
        or their ID in the remote system by prefixing it with `remote:` (e.g.,
        `remote:12312`)
    PutCustomDatevEmployeesEmployeeIdPreparePayrollRequestBody:
      type: object
      properties:
        payroll_run:
          type: object
          properties:
            date:
              description: YYYY-MM-DDTHH:mm:ss.sssZ
              type: string
              format: date-time
              pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?)?Z?$
              externalDocs:
                url: >-
                  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
          required:
            - date
        hourly_payments:
          type: array
          items:
            type: object
            properties:
              hours:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: Number of hours this employee has worked.
              lohnart:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: >-
                  The "Lohnart" (payment-type) in DATEV. Make sure a Lohnart is
                  selected that actually supports hours.
            required:
              - hours
              - lohnart
          description: >-
            Add entries for all the hourly calculated supplements here. For
            example you can write "Overtime" or "Work on Holidays" (in hours
            here). Unfortunately, DATEV doens't allow showing a lable for the
            entries.
        fixed_payments:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
              lohnart:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: >-
                  The "Lohnart" (payment-type) in DATEV. Make sure a Lohnart is
                  selected that actually supports fixed payments (no hourly
                  modifier).
            required:
              - amount
              - lohnart
          description: >-
            Add entries for all the fixed supplements here. For example you can
            write "Bonuses" (in Euros here). Unfortunately, DATEV doens't allow
            showing a lable for the entries.
        custom_lodas:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: This amount value will be mapped to Datev "Wert" field.
              lohnart:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: Choose a valid Lodas Lohnart.
              bearbeitungsschluessel:
                type: number
                format: double
                minimum: -1.7976931348623157e+308
                description: >-
                  Choose a valid Lodas Bearbeitungsschlüssel. We list the valid
                  Bearbeitungsschlüssel
                  [here](https://storage.googleapis.com/kombo-assets/integrations/datev/lodas_bs.json).
            required:
              - amount
              - lohnart
              - bearbeitungsschluessel
          default: []
          description: Add custom entries to the DATEV Lodas Standard Erfassungstabelle.
      required:
        - payroll_run
        - hourly_payments
        - fixed_payments
    PutCustomDatevEmployeesEmployeeIdPreparePayrollPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
        warnings:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: >-
            These are the interaction warnings that are shown in the dashboard.
            They are meant to provide debug information to you. We recommend
            logging them to the console.
      required:
        - status
        - data
        - warnings
  responses:
    ErrorResponseGeneral:
      description: The standard error response with just the platform error codes.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type:
                      - string
                      - 'null'
                    enum:
                      - PLATFORM.RATE_LIMIT_EXCEEDED
                      - PLATFORM.CONCURRENCY_LIMIT_EXCEEDED
                      - PLATFORM.INTEGRATION_NOT_FOUND
                      - PLATFORM.INPUT_INVALID
                      - PLATFORM.UNKNOWN_ERROR
                      - PLATFORM.IP_NOT_WHITELISTED
                      - PLATFORM.AUTHENTICATION_INVALID
                      - PLATFORM.TASK_TIMED_OUT
                    example: PLATFORM.RATE_LIMIT_EXCEEDED
                    description: >-
                      Some errors include an error code that can be used to
                      identify their cause. See the [Error Handling
                      Docs](https://docs.kombo.dev/guides/errors) for more
                      information. For your error handling logic please use the
                      error `code` instead of other properties (e.g. message,
                      http status code, ...).
                  title:
                    type:
                      - string
                      - 'null'
                    description: A static, human-readable label.
                  message:
                    type: string
                    description: >-
                      A dynamic, detailed description of what went wrong in this
                      specific instance.
                  log_url:
                    type:
                      - string
                      - 'null'
                    format: uri
                    description: >-
                      The log page in the Kombo UI lists every interaction with
                      full details. If you need assistance, share that link with
                      our support team.
                required:
                  - code
                  - title
                  - message
                  - log_url
                description: Error details with structured code for programmatic handling.
            required:
              - status
              - error
          examples:
            Error Response:
              description: >-
                When building error handling logic, always use the `code` field
                to identify specific error types programmatically. See the
                complete list of error codes in the
                [docs](https://docs.kombo.dev/guides/errors).
              value:
                status: error
                error:
                  code: INTEGRATION.MODEL_NOT_AVAILABLE
                  title: >-
                    This data model isn't supported for the selected
                    integration.
                  message: >-
                    The "employees" model is not yet available for Greenhouse.
                    Please reach out to Kombo if you need this functionality.
                  log_url: https://app.kombo.dev/my-prod/logs?interactionId=123456
            Minimal Error Response:
              description: >-
                The "message" is always required while other fields can also be
                `null`. See the [docs](https://docs.kombo.dev/guides/errors) for
                more information.
              value:
                status: error
                error:
                  code: null
                  title: null
                  message: The message is always in the response.
                  log_url: null
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        Create an API key on the [Secrets](https://app.kombo.dev/secrets) page
        in the Kombo dashboard.

````