---
title: "Create/Update employee accounting entries."
method: POST
path: "/employee_accounting_entry/upsert"
tags: ["Time Tracking|Employee Accounting Entry"]
---

# Create/Update employee accounting entries.

`POST /employee_accounting_entry/upsert`

This method can be used to create and update employee accounting entries.

An attempt is made to locate an existing employee accounting entry based on the selected primary key. If one is found, it will be
adjusted. Otherwise, a new employee accounting entry will be created. If the `dryRun` option is enabled, no actual changes will occur. It is
important to note that employee accounting entries could affect the employees' time account.

## Request body

- StandardEmployeeAccountingEntryUpsertRequest
  - `records` object[] — The records.
    - `keyField` string — This parameter specifier the name of the unique key used to distinctly assign each dataset in the API. | Value | Description | |-------|----------------------| | id | The internal employee accounting entry id |
    - `data` EmployeeAccountingEntryUpsertRequestRecordData
      - `id` integer — The internal id of the employee accounting entry.
      - `date` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
      - `description` string — The description of the employee accounting entry.
      - `salaryTypeId` integer — The salary type id of the employee accounting entry.
      - `value` number — The value of the employee accounting entry.
      - `valueUnit` string — The value unit of the employee accounting entry.
      - `projectId` integer — The id of the project associated with the employee accounting entry.
      - `costCenter` string — The Costcenter of the employee accounting entry.
      - `employeeId` integer — The id of the employee associated with the accounting entry.
  - `dryRun` boolean — Simulate the operation. (No records will be created or changed) This Parameter is optional.

## Response `200`

Success Response:

- StandardEmployeeAccountingEntryUpsertResponse
  - `createdEmployeeAccountingEntries` object[] — The created employee accounting entries.
    - `id` integer — The internal id of the accounting entry.
    - `employee` ApiHelperResponseEmployeeReference
      - `id` integer — The internal employee ID.
      - `reference` string — The personal number. (max. 20 characters)
      - `cardNumber` string — The driver card number.
      - `importSource` string — External data source from which this employee originates. (max. 16 characters)
      - `importKey` string — External ID from the respective data source. (max. 64 characters)
    - `date` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
    - `updatedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `salaryType` EmployeeAccountingEntryFetchResponseSalaryTypeItem
      - `id` integer — The internal salary type ID.
      - `name` string — The name of the salary type.
      - `type` string — The salary type.
      - `isVacation` boolean — Whether the salary type is the holiday salary type.
    - `value` number — The value of the accounting entry.
    - `valueUnit` string — The value unit of the accounting entry. | Value | Description | | ------------------------- | -------------------------------------- | | HOUR | Hours | | DAY | Days | | CURRENCY | Currency | | QUANTITY | Quantity |
    - `project` EmployeeAccountingEntryFetchResponseProjectItem
      - `id` integer — The internal project ID.
      - `reference` string — The project number.
      - `importSource` string — External data source from which this project originated.
      - `importKey` string — External ID from the respective data source.
      - `name` string — The project name.
    - `description` string — The description of the accounting entry.
    - `costCenter` string — The costCenter of the accounting entry. (max. 128 characters)
  - `updatedEmployeeAccountingEntries` object[] — The changed employee accounting entries.
    - `id` integer — The internal id of the accounting entry.
    - `employee` ApiHelperResponseEmployeeReference
      - `id` integer — The internal employee ID.
      - `reference` string — The personal number. (max. 20 characters)
      - `cardNumber` string — The driver card number.
      - `importSource` string — External data source from which this employee originates. (max. 16 characters)
      - `importKey` string — External ID from the respective data source. (max. 64 characters)
    - `date` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
    - `updatedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `salaryType` EmployeeAccountingEntryFetchResponseSalaryTypeItem
      - `id` integer — The internal salary type ID.
      - `name` string — The name of the salary type.
      - `type` string — The salary type.
      - `isVacation` boolean — Whether the salary type is the holiday salary type.
    - `value` number — The value of the accounting entry.
    - `valueUnit` string — The value unit of the accounting entry. | Value | Description | | ------------------------- | -------------------------------------- | | HOUR | Hours | | DAY | Days | | CURRENCY | Currency | | QUANTITY | Quantity |
    - `project` EmployeeAccountingEntryFetchResponseProjectItem
      - `id` integer — The internal project ID.
      - `reference` string — The project number.
      - `importSource` string — External data source from which this project originated.
      - `importKey` string — External ID from the respective data source.
      - `name` string — The project name.
    - `description` string — The description of the accounting entry.
    - `costCenter` string — The costCenter of the accounting entry. (max. 128 characters)
  - `deletedEmployeeAccountingEntries` object[] — The deleted employee accounting entries.
    - `id` integer — The internal id of the accounting entry.
    - `employee` ApiHelperResponseEmployeeReference
      - `id` integer — The internal employee ID.
      - `reference` string — The personal number. (max. 20 characters)
      - `cardNumber` string — The driver card number.
      - `importSource` string — External data source from which this employee originates. (max. 16 characters)
      - `importKey` string — External ID from the respective data source. (max. 64 characters)
    - `date` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
    - `updatedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `salaryType` EmployeeAccountingEntryFetchResponseSalaryTypeItem
      - `id` integer — The internal salary type ID.
      - `name` string — The name of the salary type.
      - `type` string — The salary type.
      - `isVacation` boolean — Whether the salary type is the holiday salary type.
    - `value` number — The value of the accounting entry.
    - `valueUnit` string — The value unit of the accounting entry. | Value | Description | | ------------------------- | -------------------------------------- | | HOUR | Hours | | DAY | Days | | CURRENCY | Currency | | QUANTITY | Quantity |
    - `project` EmployeeAccountingEntryFetchResponseProjectItem
      - `id` integer — The internal project ID.
      - `reference` string — The project number.
      - `importSource` string — External data source from which this project originated.
      - `importKey` string — External ID from the respective data source.
      - `name` string — The project name.
    - `description` string — The description of the accounting entry.
    - `costCenter` string — The costCenter of the accounting entry. (max. 128 characters)

---

[API](https://skmtc.net/geocapture/apis/geocapture-api.md) · [All operations](https://skmtc.net/geocapture/apis/geocapture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geocapture/geocapture-api/revisions/15839b24c497/schema)
