---
title: "Create/Update tools."
method: POST
path: "/tool/upsert"
tags: ["Tools|Tool"]
---

# Create/Update tools.

`POST /tool/upsert`

This method can be used to create and update tools.

An effort is made to locate an existing tool using the selected primary key. If found, it will be modified,
whereas if no tool is found, a new one is created. If the `deleteMissing` flag is set to true, all tools absent
from the request shall be purged. Please note that removed tools may not be reinstated. You can enable the
`dryRun` setting to simulate the action without altering any live data.

The designated employee assigned in the tool will be accountable for the precise upkeep of the equipment.
You may also configure `purchaseCost`, `purchaseDate`, `warranty`, and `yearOfManufacture` to facilitate your
tool management. This data will be shown in geoCapture as tool details.

## Request body

- StandardToolUpsertRequest
  - `records` object[] — The records. This Parameter is optional.
    - `keyField` string — This parameter specifies the name of the unique key used to distinctly assign each dataset in the API. | Value | Description | |----------------|-----------------------------| | id | The internal tool ID | | externalid | The external ID of the tool |
    - `data` ToolUpsertRequestRecordData
      - `id` integer — The internal id of the tool.
      - `name` string — The name of the tool. (max. 255 characters)
      - `description` string — The description of the tool.
      - `categoryId` integer — The category of the tool.
      - `categoryName` string — The name of the tools' category (Used if categoryId not provided).
      - `serialNumber` string — The serial number of the tool. (max. 255 characters)
      - `externalId` string — The external ID of the tool. (max. 255 characters)
      - `inventoryNumber` string — The inventory number of the tool. (max. 255 characters)
      - `manufacturerId` integer — The manufacturer of the tool.
      - `manufacturerName` string — The name of the tools' manufacturer (Used if manufacturerId not provided).
      - `model` string — The model of the tool. (max. 255 characters)
      - `machineType` string — The machine type of the tool. (max. 255 characters)
      - `assessory` string — Additional information for the tool.
      - `supplier` string — The supplier of the tool. (max. 255 characters)
      - `iconName` string — Filename of the icon with file extension
      - `iconData` string — base64 encoded icon
      - `purchaseCost` number — The purchase costs of the tool.
      - `purchaseDate` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
      - `warrantyMonth` integer — The warranty of the tool in months.
      - `yearOfManufacture` integer — The tools year of manufacture.
      - `outgoingDate` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
      - `status` string — The status of the tool. | status | | -------------- | | NEW | | SOLD | | IN_REPAIR | | LOST | | RESERVED | | OK | | BROKEN | | LENT |
      - `weight` number — The weight of the tool in kgs.
      - `length` number — The length of the tool in meters.
      - `width` number — The width of the tool in meters.
      - `height` number — The height of the tool in meters.
      - `dguvCheckNumber` string — The dguv check number of the tool. (max. 32 characters)
      - `responsibleEmployeeId` integer — The id of the employee responsible for the tool.
      - `beaconId` integer — The internal id of the beacon assigned to the tool (Either a tracker or a beacon can be assigned).
      - `trackerId` integer — The internal id of the tracker assigned to the tool (Either a tracker or a beacon can be assigned).
      - `licenseNumber` string — The license plate of the tool. (max. 64 characters)
      - `synchronizeBeacon` boolean — Indicates that the beacon mirrors the device’s metadata. The name, photo, description, and serial number are kept synchronized from the device to the beacon. Whenever any of these fields on the device changes, the beacon is automatically updated accordingly (Default false).
      - `costCenter` string — The cost center.
  - `deleteMissing` boolean — Do you want to delete all tools missing from this request? This Parameter is optional. (Default: false)
  - `dryRun` boolean — Simulate the operation. (No records will be created or changed) This Parameter is optional.

## Response `200`

Success Response:

- StandardToolUpsertResponse
  - `createdTools` object[] — The created tools.
    - `id` integer — The internal id of the tool.
    - `name` string — The name of the tool.
    - `category` string — The name of the tool's category.
    - `serialNumber` string — The serial number of the tool.
    - `inventoryNumber` string — The inventory number of the tool.
    - `externalId` string — The external ID of the tool.
    - `status` string — The status of the tool.
    - `manufacturer` string — The name of the manufacturer of the tool.
    - `vehicleId` string — The id of the assigned locating device if it is a vehicle.
    - `beaconId` string — The id of the assigned locating device if it is a beacon.
    - `currentProject` StandardToolBaseProjectItem
      - `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.
    - `multipleProjectsPossible` boolean — Indicates if multiple current projects were possible.
    - `currentProjectChangedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `licenseNumber` string — The license plate of the tool.
    - `description` string — The description of the tool.
    - `costCenter` string — The Cost Center of the tracker.
    - `beacon` ToolUpsertResponseToolBeaconItem
      - `id` integer — The internal id of the beacon.
      - `name` string — The name of the beacon.
      - `description` string — The description of the beacon.
      - `status` string — The status of the beacon.
      - `currentProjectId` integer — The current project of the beacon.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
      - `estimatedPosition` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `tracker` ToolUpsertResponseToolTrackerItem
      - `id` integer — The internal id of the tracker.
      - `name` string — The name of the tracker.
      - `description` string — The description of the tracker.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `synchronizeBeacon` boolean — Indicates that the beacon mirrors the device’s metadata. The name, photo, description, and serial number are kept synchronized from the device to the beacon. Whenever any of these fields on the device changes, the beacon is automatically updated accordingly.
  - `updatedTools` object[] — The changed tools.
    - `id` integer — The internal id of the tool.
    - `name` string — The name of the tool.
    - `category` string — The name of the tool's category.
    - `serialNumber` string — The serial number of the tool.
    - `inventoryNumber` string — The inventory number of the tool.
    - `externalId` string — The external ID of the tool.
    - `status` string — The status of the tool.
    - `manufacturer` string — The name of the manufacturer of the tool.
    - `vehicleId` string — The id of the assigned locating device if it is a vehicle.
    - `beaconId` string — The id of the assigned locating device if it is a beacon.
    - `currentProject` StandardToolBaseProjectItem
      - `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.
    - `multipleProjectsPossible` boolean — Indicates if multiple current projects were possible.
    - `currentProjectChangedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `licenseNumber` string — The license plate of the tool.
    - `description` string — The description of the tool.
    - `costCenter` string — The Cost Center of the tracker.
    - `beacon` ToolUpsertResponseToolBeaconItem
      - `id` integer — The internal id of the beacon.
      - `name` string — The name of the beacon.
      - `description` string — The description of the beacon.
      - `status` string — The status of the beacon.
      - `currentProjectId` integer — The current project of the beacon.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
      - `estimatedPosition` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `tracker` ToolUpsertResponseToolTrackerItem
      - `id` integer — The internal id of the tracker.
      - `name` string — The name of the tracker.
      - `description` string — The description of the tracker.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `synchronizeBeacon` boolean — Indicates that the beacon mirrors the device’s metadata. The name, photo, description, and serial number are kept synchronized from the device to the beacon. Whenever any of these fields on the device changes, the beacon is automatically updated accordingly.
  - `deletedTools` object[] — The deleted tools.
    - `id` integer — The internal id of the tool.
    - `name` string — The name of the tool.
    - `category` string — The name of the tool's category.
    - `serialNumber` string — The serial number of the tool.
    - `inventoryNumber` string — The inventory number of the tool.
    - `externalId` string — The external ID of the tool.
    - `status` string — The status of the tool.
    - `manufacturer` string — The name of the manufacturer of the tool.
    - `vehicleId` string — The id of the assigned locating device if it is a vehicle.
    - `beaconId` string — The id of the assigned locating device if it is a beacon.
    - `currentProject` StandardToolBaseProjectItem
      - `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.
    - `multipleProjectsPossible` boolean — Indicates if multiple current projects were possible.
    - `currentProjectChangedAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `licenseNumber` string — The license plate of the tool.
    - `description` string — The description of the tool.
    - `costCenter` string — The Cost Center of the tracker.
    - `beacon` ToolUpsertResponseToolBeaconItem
      - `id` integer — The internal id of the beacon.
      - `name` string — The name of the beacon.
      - `description` string — The description of the beacon.
      - `status` string — The status of the beacon.
      - `currentProjectId` integer — The current project of the beacon.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
      - `estimatedPosition` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `tracker` ToolUpsertResponseToolTrackerItem
      - `id` integer — The internal id of the tracker.
      - `name` string — The name of the tracker.
      - `description` string — The description of the tracker.
      - `lastSignalAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `latLng` number[] — Represents a geo coordinate. An array of two double values, representing the latitude and longitude.
    - `synchronizeBeacon` boolean — Indicates that the beacon mirrors the device’s metadata. The name, photo, description, and serial number are kept synchronized from the device to the beacon. Whenever any of these fields on the device changes, the beacon is automatically updated accordingly.

---

[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/versions/15839b24c497/schema)
