---
title: "Create/Update project assignments"
method: POST
path: "/project_assignment/upsert"
tags: ["Projects|Project assignment"]
---

# Create/Update project assignments

`POST /project_assignment/upsert`

This method can be used to create and update project assignments.

## Request body

- StandardProjectAssignmentUpsertRequest
  - `records` object[] — The records.
    - `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 project assignment ID |
    - `data` ProjectAssignmentUpsertRequestRecordData
      - `id` integer — The internal id of the project assignment.
      - `trackerId` integer — The id for the vehicle that is assigned.
      - `toolId` integer — The id for the tool that is assigned.
      - `type` string — The assignment type | Value | Description | |----------------|-----------------------------| | RELEASE | The given vehicle/tool is assigned to no current project (released) | | FIXED_ASSIGNMENT | The given vehicle/tool is assigned to a fixed project |
      - `assignedProjectId` integer — The internal id of the assigned project. Only relevant if type is FIXED_ASSIGNMENT.
      - `fromDate` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `toDate` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
      - `note` string — A note for the project assignment.
  - `dryRun` boolean — Simulate the operation. (No records will be created or changed) This Parameter is optional.

## Response `200`

Success Response:

- StandardProjectAssignmentUpsertResponse
  - `createdProjectAssignments` object[] — The created project assignments.
    - `id` integer — The id of the project assignment
    - `type` string — | Value | Description | |----------------|-----------------------------| | RELEASE | The given vehicle/tool is assigned to no current project (released) | | FIXED_ASSIGNMENT | The given vehicle/tool is assigned to a fixed project |
    - `assignedProject` StandardProjectAssignmentBaseProjectItem
      - `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.
    - `tracker` StandardProjectAssignmentBaseTrackerItem
      - `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)
    - `tool` StandardToolBaseToolItem
      - `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.
    - `from` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `to` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
  - `updatedProjectAssignments` object[] — The changed project assignments.
    - `id` integer — The id of the project assignment
    - `type` string — | Value | Description | |----------------|-----------------------------| | RELEASE | The given vehicle/tool is assigned to no current project (released) | | FIXED_ASSIGNMENT | The given vehicle/tool is assigned to a fixed project |
    - `assignedProject` StandardProjectAssignmentBaseProjectItem
      - `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.
    - `tracker` StandardProjectAssignmentBaseTrackerItem
      - `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)
    - `tool` StandardToolBaseToolItem
      - `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.
    - `from` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `to` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
  - `deletedProjectAssignments` object[] — The deleted project assignments.
    - `id` integer — The id of the project assignment
    - `type` string — | Value | Description | |----------------|-----------------------------| | RELEASE | The given vehicle/tool is assigned to no current project (released) | | FIXED_ASSIGNMENT | The given vehicle/tool is assigned to a fixed project |
    - `assignedProject` StandardProjectAssignmentBaseProjectItem
      - `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.
    - `tracker` StandardProjectAssignmentBaseTrackerItem
      - `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)
    - `tool` StandardToolBaseToolItem
      - `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.
    - `from` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
    - `to` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx

---

[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)
