Save the choices for a scanned source on a new installation that has no user yet: the import mode, the cutover date, the answers to the scan's questions and who prepared it. Every problem is returned at once, keyed by field. It is closed for good once any user exists.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
mode
object
--
Import mode: full history or cutover.
cutover_date
object
--
Date the books move over from the source. Required in cutover mode.
mappings
object
--
Answers to the scan's questions, keyed by question.
prepared_by
object
--
Name of the person who prepared the migration, shown on the reconciliation pack. Optional, one line.
Responses
Status
Description
Body
200
Returns the scan with the saved decisions.
object
422
The request failed validation. The response lists each invalid field and why.
Create the first owner, the staged company and a preparing run in one commit, then
start it (``_claim``).
The bootstrap lock serializes racing starts; the loser re-checks and is refused. If the
response is lost after the commit, the owner signs in and is taken back to the run.
The setup code is consumed only after the commit.
Parameters
Name
In
Required
Type
Description
x-setup-code
header
--
string, optional
Setup code that authorizes this request while the instance is still being set up.
Identifier of the company move request to withdraw.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/migrations/move-requests/:request_id/withdraw \
-H "Authorization: Bearer $TOKEN"
GET/migrations/open
Get Open Runs
This person's moves still in progress, so any page can lead back to them.
Responses
Status
Description
Body
200
Successful Response
object
Example
curl -X GET http://localhost:8000/migrations/open \
-H "Authorization: Bearer $TOKEN"
POST/migrations/scan
Scan Migration Source
Upload a source file from another system and scan it, as a company owner. Send the file as a multipart upload. Nothing is imported at this step.
Responses
Status
Description
Body
200
Returns the `scan_token` and the scan: what the source holds, what Celerp cannot import, and the questions that need an answer.
object
Example
curl -X POST http://localhost:8000/migrations/scan \
-H "Authorization: Bearer $TOKEN"
POST/migrations/scan/decisions
Save Migration Decisions
Save the choices for a scanned source: the import mode, the cutover date, the answers to the scan's questions and who prepared it. Every problem is returned at once, keyed by field.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
mode
object
--
Import mode: full history or cutover.
cutover_date
object
--
Date the books move over from the source. Required in cutover mode.
mappings
object
--
Answers to the scan's questions, keyed by question.
prepared_by
object
--
Name of the person who prepared the migration, shown on the reconciliation pack. Optional, one line.
Responses
Status
Description
Body
200
Returns the scan with the saved decisions.
object
422
The request failed validation. The response lists each invalid field and why.
Return the view of a scanned source file. When the caller already started a migration from this scan, it returns that run's `run_id` instead, so a client whose start response was lost can return to the run.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
Responses
Status
Description
Body
200
Returns the scan, or the `run_id` of the run already started from it.
object
422
The request failed validation. The response lists each invalid field and why.
curl -X POST http://localhost:8000/migrations/several/:file_id/open \
-H "Authorization: Bearer $TOKEN"
GET/migrations/sources
List Migration Sources
List the source systems the migration importer reads. Each source names the files it accepts, with their extensions and maximum sizes.
Responses
Status
Description
Body
200
Returns the sources, each with its key, display name and accepted files.
array of object
Example
curl -X GET http://localhost:8000/migrations/sources \
-H "Authorization: Bearer $TOKEN"
GET/migrations/staged
Get Staged Migration Run
Return the latest migration run of the staged company the session is scoped to, which tells a client where the session belongs.
Responses
Status
Description
Body
200
Returns the migration run.
object
Example
curl -X GET http://localhost:8000/migrations/staged \
-H "Authorization: Bearer $TOKEN"
POST/migrations/start-company/decisions
Save Migration Decisions for a Login With No Company
Save the choices for a scanned source that was uploaded for a login with no company: the import mode, the cutover date, the answers to the scan's questions and who prepared it. Every problem is returned at once, keyed by field.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
mode
object
--
Import mode: full history or cutover.
cutover_date
object
--
Date the books move over from the source. Required in cutover mode.
mappings
object
--
Answers to the scan's questions, keyed by question.
prepared_by
object
--
Name of the person who prepared the migration, shown on the reconciliation pack. Optional, one line.
Responses
Status
Description
Body
200
Returns the scan with the saved decisions.
object
422
The request failed validation. The response lists each invalid field and why.
Upload a source file from another system for a login that has no company left. The request authenticates with the login's email and password as HTTP Basic credentials. Send the file as a multipart upload. Nothing is imported at this step.
Responses
Status
Description
Body
200
Returns the `scan_token` and the scan: what the source holds, what Celerp cannot import, and the questions that need an answer.
object
Example
curl -X POST http://localhost:8000/migrations/start-company/scan \
-H "Authorization: Bearer $TOKEN"
POST/migrations/start-company/scan/read
Read Migration Scan for a Login With No Company
Return the view of a scanned source file that was uploaded for a login with no company.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
Responses
Status
Description
Body
200
Returns the scan: what the source holds, what Celerp cannot import, and the questions that need an answer.
object
422
The request failed validation. The response lists each invalid field and why.
Start a migration as the company of a login that has none left, then sign in to that company. The request carries the login's email and password, the scan token and the company name. If the login already has a company the request is refused.
Request body
Field
Type
Required
Description
email
string
yes
Email address of the login.
password
string
yes
Password of the login.
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
company_name
string
yes
Name of the company to create from the source.
timezone
string
--
Timezone
Responses
Status
Description
Body
201
Returns the session tokens for the staged company, the `run_id`, and whether the run is waiting for modules to load.
object
422
The request failed validation. The response lists each invalid field and why.
Start a migration from a scan and its saved decisions. It creates a staged company and a migration run. A repeated start from the same scan returns the run it already created.
Request body
Field
Type
Required
Description
scan_token
string
yes
Token returned when the source file was scanned. It identifies the uploaded scan in later calls.
company_name
string
yes
Name of the company to create from the source.
timezone
string
--
Timezone
Responses
Status
Description
Body
201
Returns the `run_id` of the new run and whether it is waiting for modules to load.
object
422
The request failed validation. The response lists each invalid field and why.