Skip to content

MngPreviewMigration

Validates a batch and creates a preview job. This command does not create accounts or import trades.

Access

SuperAdmin manager session or SuperAdmin manager API token. Authorization is checked against the current manager record.

Request fields

Field Type Required Description
kind string Yes accounts or closed_trades.
name string No Operator label, at most 128 bytes.
rows array Yes 1–1000 normalized row objects. See account rows and closed-trade rows.
{"command":"MngPreviewMigration","extID":"mig-preview-1","__token":"<superadmin-token>","data":{"kind":"accounts","name":"Initial account import","rows":[{"source_id":"legacy-42","group":"Standard","name":"Alex Doe","email":"[email protected]","login":120045,"regdate":1760000000,"password":"<temporary-password>","leverage":100,"enable":1,"country":"CY","city":"Nicosia","comment":"Imported account"}]}}

Success response

The command returns the created job object directly in data. Status is ready when all rows validate or invalid if any row fails validation.

{"extID":"mig-preview-1","status":200,"data":{"id":"e2f6b1a8-3749-4dd7-b204-97dcdb8203a1","kind":"accounts","name":"Initial account import","status":"ready","owner_id":1,"created_at":1794300000,"updated_at":1794300000,"total":1,"valid":1,"invalid":0,"processed":0,"error":"","errors":[],"summaries":[],"results":[]}}

Job fields

Field Type Description
id string Migration identifier used by apply/get/delete commands.
kind string accounts or closed_trades.
name string Optional operator label; empty when omitted.
status string Job state: ready, invalid, queued, running, completed, failed, or interrupted.
owner_id integer Manager ID that created the job.
created_at, updated_at integer Unix timestamps.
total, valid, invalid, processed integer Total, valid, invalid, and processed row counts.
error string Job-level error code, empty when none.
errors array Row errors {row, field, error}; row indexes are zero-based. field may be an empty string for row-level or global validation errors.
summaries array Closed-trade balance summaries {login,currency,money_digits,balance_before,history_net,correction,balance_after}. Empty for account imports. Completed jobs may also include correction_order when a nonzero correction was posted.
results array Processed-row results {row,source_id,login,order?,correction_order?}. order is included for imported closed trades; correction_order identifies the corresponding account correction when one was needed.

Invalid input returns a job with row errors rather than applying any data. Do not call apply unless status is ready.

Password preparation for a large account batch can take time. The TCP preview processing timeout is 120 seconds; BackOffice waits slightly longer. A response timeout does not apply accounts or trades, but a prepared job can appear in the history list after the connection is lost. Inspect that list before repeating preparation.