---
title: "Create/Update vehicles."
method: POST
path: "/tracker/upsert"
tags: ["Tracking|Vehicle"]
---

# Create/Update vehicles.

`POST /tracker/upsert`

This method can be used to create or update vehicles.

An attempt is undertaken to locate an existing vehicle utilizing the selected identifier. If one is found, it
will be adjusted. Otherwise a new vehicle will be created.
For example, this endpoint allows you to change the name of the vehicle or the name of the driver.

## Request body

- StandardTrackerUpsertRequest
  - `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 vehicle ID | | identifier | The customer specific ID | | licenseNumber | The license plate | | identificationNumber | The vehicle identification number | | importKey | The external record ID |
    - `data` TrackerUpsertRequestRecordData
      - `id` integer — The internal vehicle ID.
      - `identifier` string — The customer-specific ID. (max. 64 characters)
      - `inventoryNumber` string — The inventory number. (max. 128 characters)
      - `licenseNumber` string — The vehicle license plate. (max. 255 characters)
      - `identificationNumber` string — The vehicle identification number. (max. 24 characters)
      - `importSource` string — External data source from which this vehicle originates. (max. 64 characters)
      - `importKey` string — External ID from the respective data source. (max. 64 characters)
      - `name` string — The vehicle name. (max. 255 characters)
      - `description` string — The vehicle description.
      - `driverName` string — The driver name. (max. 255 characters)
      - `driverPhoneNumber` string — The driver phone number. (max. 255 characters)
      - `costCenter` string — The cost center. (max. 25 characters)
      - `serialNumber` string — The serial number of the vehicle.
      - `manufacturingDate` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `trackerProfileId` integer — The internal id of the tracker profile.
      - `trackerManufacturerId` integer — The internal id of the tracker manufacturer.
      - `model` string — The name of the model. (max. 255 characters)
      - `activityType` string — The tracker activity type. (Default: DIST) | Value | Description | | ----- | ----------- | | DIST | Activity type distance | | TIME | Activity type duration |
      - `fuelType` string — The tracker fuel type. | Value | | ----- | | DIESEL | | SUPER_E10 | | GAS | | BENZIN | | SUPER | | LKW_DIESEL | | ELECTRIC | | METHANOL | | BLUEDIESEL |
      - `batteryCapacity` number — The battery capacity (only for electric vehicles).
      - `consumption` number — The tracker consumption per 100 kilometers/operating hour depending on the activity type.
      - `co2Emissions` number — The tracker co2 emissions in gramms per kilometer/operating hour depending on the activity type.
      - `poolVehicle` boolean — Is this vehicle a pool vehicle?
      - `locationId` integer — The internal id of the location.
      - `departmentId` integer — The internal id of the department.
      - `defaultDriverId` integer — The internal id of the default employee.
      - `usageStartDate` string — Represents a date. (ISO 8601) ICU-Format: yyyy-MM-dd
      - `defaultDriverName` string — The name of the default driver. (max. 255 characters)
      - `defaultDriverPhone` string — The phone number of the default driver. (max. 255 characters)
      - `categoryExternalId` string — The external ID of the tracker category.
  - `dryRun` boolean — Simulate the operation. (No records will be created or changed) This Parameter is optional.

## Response `200`

Success Response:

- StandardTrackerUpsertResponse
  - `updatedTrackers` object[] — The changed vehicles.
    - `id` integer — The internal vehicle ID.
    - `identifier` string — The customer-specific ID. (max. 64 characters)
    - `inventoryNumber` string — The inventory number. (max. 128 characters)
    - `licenseNumber` string — The vehicle license plate. (max. 255 characters)
    - `identificationNumber` string — The vehicle identification number. (max. 24 characters)
    - `importSource` string — External data source from which this vehicle originates. (max. 64 characters)
    - `importKey` string — External ID from the respective data source. (max. 64 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/versions/15839b24c497/schema)
