---
title: "Create/Update locations."
method: POST
path: "/location/upsert"
tags: ["Employees|Location"]
---

# Create/Update locations.

`POST /location/upsert`

This endpoint enables you to create locations or update the ones you created.

## Request body

- StandardLocationUpsertRequest
  - `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 location id | | externalid | The external ID of the location |
    - `data` LocationUpsertRequestRecordData
      - `id` string — The internal id of the location.
      - `externalId` string — The external id of the location. (max. 255 characters)
      - `name` string — The name of the location. (max. 255 characters)
      - `identifier` string — The internal id of the location. (max. 255 characters)
      - `sequence` integer — The sequence of the location. This Parameter is optional. (Default: 0)
      - `zipCode` string — The zip code in which the location is located. This Parameter is optional.
      - `city` string — The city in which the location is located. This Parameter is optional.
      - `street` string — The street in which the location is located. This Parameter is optional. (max. 255 characters)
      - `countryCode` string — The two-digit ISO 3166 country code. This Parameter is optional.
      - `accountingClient` string — The accounting client of the location. This Parameter is optional. (max. 25 characters)
      - `worktimeApprovalRuleId` string — The worktime approval rule id of the location. This Parameter is optional.
      - `stampApplicationApprovalRuleId` string — The stamp approval rule id of the location. This Parameter is optional.
      - `absenceApplicationApprovalRuleId` string — The absence approvale rule id of the location. This Parameter is optional.
      - `sicknessApplicationApprovalRuleId` string — The sickness approval rule id of the location. This Parameter is optional.
      - `accountingEntryApplicationApprovalRuleId` string — The accounting entry approval rule id of the location. This Parameter is optional.
      - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
  - `deleteMissing` boolean — Do you want to delete all locations 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:

- StandardLocationUpsertResponse
  - `createdLocations` object[] — The created locations.
    - `id` string — The internal id of the location.
    - `externalId` string — The external id of the location. (max. 255 characters)
    - `name` string — The name of the location. (max. 255 characters)
    - `identifier` string — The internal id of the location. (max. 255 characters)
    - `sequence` integer — The sequence of the location. This Parameter is optional. (Default: 0)
    - `zipCode` string — The zip code in which the location is located. This Parameter is optional.
    - `city` string — The city in which the location is located. This Parameter is optional.
    - `street` string — The street in which the location is located. This Parameter is optional. (max. 255 characters)
    - `countryCode` string — The two-digit ISO 3166 country code. This Parameter is optional.
    - `accountingClient` string — The accounting client of the location. This Parameter is optional. (max. 25 characters)
    - `worktimeApprovalRuleId` string — The worktime approval rule id of the location. This Parameter is optional.
    - `stampApplicationApprovalRuleId` string — The stamp approval rule id of the location. This Parameter is optional.
    - `absenceApplicationApprovalRuleId` string — The absence approvale rule id of the location. This Parameter is optional.
    - `sicknessApplicationApprovalRuleId` string — The sickness approval rule id of the location. This Parameter is optional.
    - `accountingEntryApplicationApprovalRuleId` string — The accounting entry approval rule id of the location. This Parameter is optional.
    - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
  - `updatedLocations` object[] — The changed locations.
    - `id` string — The internal id of the location.
    - `externalId` string — The external id of the location. (max. 255 characters)
    - `name` string — The name of the location. (max. 255 characters)
    - `identifier` string — The internal id of the location. (max. 255 characters)
    - `sequence` integer — The sequence of the location. This Parameter is optional. (Default: 0)
    - `zipCode` string — The zip code in which the location is located. This Parameter is optional.
    - `city` string — The city in which the location is located. This Parameter is optional.
    - `street` string — The street in which the location is located. This Parameter is optional. (max. 255 characters)
    - `countryCode` string — The two-digit ISO 3166 country code. This Parameter is optional.
    - `accountingClient` string — The accounting client of the location. This Parameter is optional. (max. 25 characters)
    - `worktimeApprovalRuleId` string — The worktime approval rule id of the location. This Parameter is optional.
    - `stampApplicationApprovalRuleId` string — The stamp approval rule id of the location. This Parameter is optional.
    - `absenceApplicationApprovalRuleId` string — The absence approvale rule id of the location. This Parameter is optional.
    - `sicknessApplicationApprovalRuleId` string — The sickness approval rule id of the location. This Parameter is optional.
    - `accountingEntryApplicationApprovalRuleId` string — The accounting entry approval rule id of the location. This Parameter is optional.
    - `createdAt` string — Represents a date and a time. (ISO 8601) ICU-Format: yyyy-MM-dd'T'HH:mm:ssxxx
  - `deletedLocations` object[] — The deleted locations.
    - `id` string — The internal id of the location.
    - `externalId` string — The external id of the location. (max. 255 characters)
    - `name` string — The name of the location. (max. 255 characters)
    - `identifier` string — The internal id of the location. (max. 255 characters)
    - `sequence` integer — The sequence of the location. This Parameter is optional. (Default: 0)
    - `zipCode` string — The zip code in which the location is located. This Parameter is optional.
    - `city` string — The city in which the location is located. This Parameter is optional.
    - `street` string — The street in which the location is located. This Parameter is optional. (max. 255 characters)
    - `countryCode` string — The two-digit ISO 3166 country code. This Parameter is optional.
    - `accountingClient` string — The accounting client of the location. This Parameter is optional. (max. 25 characters)
    - `worktimeApprovalRuleId` string — The worktime approval rule id of the location. This Parameter is optional.
    - `stampApplicationApprovalRuleId` string — The stamp approval rule id of the location. This Parameter is optional.
    - `absenceApplicationApprovalRuleId` string — The absence approvale rule id of the location. This Parameter is optional.
    - `sicknessApplicationApprovalRuleId` string — The sickness approval rule id of the location. This Parameter is optional.
    - `accountingEntryApplicationApprovalRuleId` string — The accounting entry approval rule id of the location. This Parameter is optional.
    - `createdAt` 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/869b05603541/schema)
