---
title: "Import accounting data"
method: POST
path: "/api/import/profiles/{profileId}/accounting"
---

# Import accounting data

`POST /api/import/profiles/{profileId}/accounting`

## Request

- Base URL: `https://cityvizor.cz`
- URL: `https://cityvizor.cz/api/import/profiles/{profileId}/accounting`
- Auth: HTTP bearer

This endpoint allows user to import accounting data to CityVizor profile.

Authentication is done by providing access token in a HTTP header. This access token can be obtained from the CityVizor administration interface.

## Request body `multipart/form-data`

- object
  - `dataFile` string, binary
  - `eventsFile` string, binary
  - `paymentsFile` string, binary
  - `zipFile` string, binary
  - `year` integer, required

## Response `200`

OK

- object
  - `id` integer, required
  - `profileId` integer, required
  - `year` integer, required
  - `userId` integer, required
  - `created` string, required
  - `started` string
  - `finished` string
  - `status` string, required
  - `error` string
  - `validity` string

## Other responses

- `400`: Missing data file or zip file or Invalid year value
- `403`: Token revoked
- `500`: Failed to create import record in database

## Changes

- **2019-10-22** `e79332a1183e`: 1 breaking
  - the `year` request property type changed from `number` to `integer`
- **2019-10-22** `a1831cd60983`: 4 breaking, 1 info
  - the `id` response's property type changed from `integer` to `number` for status `200`
  - the `profileId` response's property type changed from `integer` to `number` for status `200`
  - the `userId` response's property type changed from `integer` to `number` for status `200`
  - the `year` response's property type changed from `integer` to `number` for status `200`
  - …1 more

[Operation history](https://skmtc.dev/cityvizor/apis/cityvizor-import-api/changes/api/import/profiles/:profileId/accounting/post.md)

---

[API](https://skmtc.dev/cityvizor/apis/cityvizor-import-api.md) - [All operations](https://skmtc.dev/cityvizor/apis/cityvizor-import-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cityvizor/apis/cityvizor-import-api/revisions/93b4572e9ba2?raw)
