---
title: "Preview or resume an authorized freestyle bookkeeping import"
method: POST
path: "/imports/freestyle"
tags: ["Import/Export"]
---

# Preview or resume an authorized freestyle bookkeeping import

`POST /imports/freestyle`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/imports/freestyle`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Normalizes unfamiliar source files through agent computation, then validates and imports a workspace JSON package. Preview returns a content digest. Import saves every journal entry in one call with source-row idempotency; an unchanged retry replays saved entries. Customer and opening-invoice details use existing services. No ledger replacement.

## Request body

- object
  - `action` 'preview' | 'import', required
  - `packageFile` object, required: Exactly one authorized cabinet fileId or legacy firm workspace path
    - `fileId` string, uuid
    - `path` string
  - `digest` string: Required for import: exact SHA-256 returned by preview

## Response `200`

Validation or saved progress and verified completion receipt

## Other responses

- `409`: Source changed, conflicting retry or import already running
- `422`: Invalid package or accounting facts

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
