---
title: "Import Cost-Centers"
method: POST
path: "/cleemy-procurement/services/imports/costcenters"
tags: ["Cost-Centers"]
---

# Import Cost-Centers

`POST /cleemy-procurement/services/imports/costcenters`

Import a list of cost-centers. Endpoint to use for bulk import of cost-centers.

## Request body

- object
  - `mode` 'AllOrNothing' | 'SkipInvalidItems' — AllOrNothing: all items are imported or none. SkipInvalidItems: items are imported if valid, skipped if not.
  - `items` object[] — List of cost-centers to import.
    - `name` string, required — Name of the cost-center.
    - `code` string, required — Code of the cost-center.
    - `ownerId` integer — ID of the user who will be the owner of the cost-center.
    - `state` 'Disabled' | 'Enabled' — Disabled: the cost-center is disabled. Enabled: the cost-center is enabled.
    - `establishmentIds` integer[] — IDs of the establishments to which the cost-center belongs.

## Response `200`

Successful cost-centers import.

- object
  - `mode` 'AllOrNothing' | 'SkipInvalidItems' — AllOrNothing: all items are imported or none. SkipInvalidItems: items are imported if valid, skipped if not.
  - `imported` integer — Number of items imported.
  - `failedValidation` integer — Number of items failed validation.
  - `items` object[]
    - `result` CostCenter — Cost-center.
      - `id` integer
      - `name` string, required
      - `code` string, required
      - `ownerId` integer — ID of the user who will be the owner of the cost-center.
      - `owner` object — **Read-only.** Owner of the cost-center.
        - `id` integer
        - `href` string, uri
        - `name` string
        - `firstName` string
        - `lastName` string
        - `pictureHref` string, uri, nullable — **Read-only.** URL to this user picture image file.
      - `state` 'Disabled' | 'Enabled' — Disabled: the cost-center is disabled. Enabled: the cost-center is enabled.
      - `establishmentIds` integer[] — **Write-only.** IDs of the establishments to which the cost-center belongs."
      - `establishments` EstablishmentReference[] — **Read-only.** Establishments to which the cost-center belongs.
        - `id` integer
        - `name` string
        - `href` string, uri
    - `problem` Problem
      - `type` string, nullable
      - `title` string, nullable
      - `status` integer, nullable
      - `detail` string, nullable
      - `instance` string, nullable

---

[API](https://skmtc.net/luccasoftware/apis/lucca-expenses.md) · [All operations](https://skmtc.net/luccasoftware/apis/lucca-expenses/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/luccasoftware/lucca-expenses/revisions/110f9897756c/schema)
