Skip to content
Back to Steward

Get a migration and its items

GET
/api/v1/migrations/{migrationId}
migrationId
required
string

Migration ID

object
id
required

Migration ID

string
Example
507f1f77bcf86cd799439011
accountId
required

Owning account ID

string
Example
507f1f77bcf86cd799439011
workflowId
required

Workflow each item is onboarded through

string
nullable
Example
507f1f77bcf86cd799439011
name
required

Display name for the migration batch

string
labels
required

Free-text labels for organizing migrations

Array<string>
sourceType
required
string
Allowed values: UPLOAD API FTP
status
required
string
Allowed values: UPLOADING MIGRATING PAUSED COMPLETED FAILED CANCELLED
isPreparing
required

True while the run is still unpacking staged archives (MIGRATING with a zip file still staged on a non-terminal item)

boolean
bulkStage
required

Which bulk pipeline stage (CLASSIFY / SUMMARIZE / VALIDATE) is currently processing, for bulk-mode runs — items parked awaiting the batch should read as in progress, not queued. Null when not bulk-processing.

string
nullable
discoveredApplicationCount
required

Applications discovered from the archive directory during unpack (null until an archive is read)

number
nullable
discoveredFileCount
required

Files discovered from the archive directory during unpack (null until an archive is read)

number
nullable
discoveredByteCount
required

Total uncompressed bytes of the discovered files, so progress can be shown by data size (null until an archive is read)

number
nullable
extractedFileCount
required

Archive entries streamed out to S3 so far in the current unpack pass (drives the live progress bar; null until a pass begins)

number
nullable
extractedByteCount
required

Bytes streamed out to S3 so far in the current unpack pass (drives the data-size progress bar; null until a pass begins)

number
nullable
recentExtractedFileNames
required

Most-recently-extracted file names (rolling window, newest last) for the live “Extracting …” line and its hover list

Array<string>
complianceChecks
required

Compliance checks selected for the run

object
screening
required

Run sanctions/PEP/adverse-media screening for each created application

boolean
idVerification
required

Run ID verification for each created application

boolean
kycDataVerification
required

Run KYC (individual) data verification for each created application

boolean
kybDataVerification
required

Run KYB (business) data verification for each created application

boolean
createdById
required

User who created the migration

string
nullable
Example
507f1f77bcf86cd799439011
itemCounts
required

Item counts by status for this migration

object
total
required

Total number of items in this migration

number
queued
required

Items queued and not yet started

number
inProgress
required

Items currently being processed

number
completed
required

Items that completed successfully

number
missingData
required

Items that completed with missing required data

number
failed
required

Items that failed processing

number
cancelled
required

Items cancelled before they finished processing

number
taskCount
required

Total outstanding tasks across the batch — the missing required fields summed over every item, not the number of items needing attention (one item can carry several tasks)

number
fileCount
required

Total number of staged source files across all items in this migration

number
startedAt
required

When the run started

string
nullable
Example
2026-03-30T12:00:00.000Z
completedAt
required

When the run finished

string
nullable
Example
2026-03-30T12:05:00.000Z
createdAt
required

Date the migration was created

string
Example
2026-03-30T10:00:00.000Z
updatedAt
required

Date the migration was last updated

string
Example
2026-03-30T12:05:00.000Z
items
required

Items in this migration, oldest first

Array<object>
object
id
required

Migration item ID

string
Example
507f1f77bcf86cd799439011
migrationId
required

Owning migration ID

string
Example
507f1f77bcf86cd799439011
applicationId
required

Application created from this item once the run processes it

string
nullable
Example
507f1f77bcf86cd799439011
name
required

Display name for the item: the created application’s current name when it has one (mirrors the application page, DEV-2729), else the operator-typed item label

string
entityType
required

Applicant entity type (BUSINESS/INDIVIDUAL); null defaults to business

string
Allowed values: BUSINESS INDIVIDUAL
status
required
string
Allowed values: QUEUED IN_PROGRESS COMPLETED MISSING_DATA FAILED CANCELLED
stage
required

Pipeline checkpoint. IN_PROGRESS + APP_READY means seeded but still waiting behind the queue (shown as Queued in the UI)

string
Allowed values: PENDING APP_READY CLASSIFIED EXTRACTED
files
required

Staged source files

Array<object>
object
fileName
required

Original uploaded file name

string
mimeType
required

Uploaded file MIME type

string
size
required

Uploaded file size in bytes

number
fileCount
required

Number of staged source files

number
progress
required

Per-file pipeline progress counts

object
classified
required

Files whose content classification has finished

number
summarized
required

Files summarized during the extraction stage

number
validated
required

Per-document validations completed (can exceed fileCount — one file fans out to several document types)

number
activeFile
required

File currently being processed in the active pipeline stage

string
nullable
onboardingPercent
required

Onboarding completion percent (0-100) during the finalize stage

number
nullable
validateTotal
required

Total documents queued for the validate stage — the denominator for “validated / N documents” (null before validate)

number
nullable
outstanding
required

Post-run gap summary

object
missingFields
required

Labels of required profile fields still unfilled once document extraction settled

Array<string>
error
required

Truncated error message when the item failed

string
nullable
startedAt
required

When this item started processing

string
nullable
Example
2026-03-30T12:00:00.000Z
completedAt
required

When this item finished processing

string
nullable
Example
2026-03-30T12:01:00.000Z
createdAt
required

Date the item was created

string
Example
2026-03-30T10:00:00.000Z
updatedAt
required

Date the item was last updated

string
Example
2026-03-30T12:01:00.000Z
retryable
required

Whether an operator may re-run this item: a settled status (MISSING_DATA / FAILED / CANCELLED) whose application (if any) is still PENDING. False once the app has SUBMITTED/APPROVED — re-running would re-extract and overwrite reviewed data.

boolean
runBreakdown
required

Run time/cost breakdown — present only for BACKOFFICE callers, null otherwise

object
bulkMode
required

Whether this run executed in bulk mode (resolved per-migration override → account default)

boolean
batchStages
required

Per-stage Batch API records for bulk runs (empty for live runs)

Array<object>
object
stage
required

Pipeline stage (CLASSIFY / SUMMARIZE / VALIDATE)

string
submittedAt
required

When the stage batches were submitted to OpenAI (ISO)

string
nullable
completedAt
required

When the stage batches settled (ISO)

string
waitedMs
required

Milliseconds waited on OpenAI for this stage

number
nullable
requested
required

Requests the stage wanted covered (pre-dedup)

number
nullable
deduplicated
required

Duplicate-content requests collapsed before submission

number
nullable
submitted
required

Requests actually sent to OpenAI

number
nullable
cached
required

Results ingested into the cache

number
failed
required

Requests that failed (per-line errors + whole-batch failures)

number
inputTokens
required

Input tokens billed for the stage batches

number
nullable
outputTokens
required

Output tokens billed for the stage batches

number
nullable
estimatedCostUsd
required

Estimated USD at the batch rate (live-equivalent is 2×)

number
nullable
outcome
required

How the stage’s batch phase ended (‘completed’ | ‘timeout’)

string
liveCalls
required

Live (non-batch) OpenAI calls attributed to this run

number
liveInputTokens
required

Input tokens across attributed live calls

number
liveOutputTokens
required

Output tokens across attributed live calls

number
liveCostUsd
required

Estimated USD across attributed live calls, standard rates

number
liveBatchableInputTokens
required

Subset of live input tokens from batchable file-stage calls

number
liveBatchableOutputTokens
required

Subset of live output tokens from batchable file-stage calls

number
liveBatchableCostUsd
required

Subset of live cost from batchable file-stage calls — what bulk mode would have halved

number
liveCacheHits
required

Live calls served from the OpenAI cache — real activity at $0 spend (tokens unknown)

number
currentStageSince
required

When the currently in-flight bulk stage (bulkStage) was submitted — drives a live wait ticker pre-settlement

string
nullable
phaseTimes
required

Per-phase processing time summed across items

object
itemsCounted
required

Items whose timestamps contributed to the sums

number
classifyMs
required

Classify + store (item start → classified), summed ms

number
nullable
extractMs
required

Summarize + extract (classified → extracted), summed ms

number
nullable
validateMs
required

Validate (extracted → finalize start), summed ms

number
nullable
buildMs
required

Build application (finalize start → item settled), summed ms

number
nullable
Example
{
"id": "507f1f77bcf86cd799439011",
"accountId": "507f1f77bcf86cd799439011",
"workflowId": "507f1f77bcf86cd799439011",
"name": "string",
"labels": [
"string"
],
"sourceType": "UPLOAD",
"status": "UPLOADING",
"isPreparing": false,
"bulkStage": "string",
"discoveredApplicationCount": 0,
"discoveredFileCount": 0,
"discoveredByteCount": 0,
"extractedFileCount": 0,
"extractedByteCount": 0,
"recentExtractedFileNames": [
"string"
],
"complianceChecks": {
"screening": false,
"idVerification": false,
"kycDataVerification": false,
"kybDataVerification": false
},
"createdById": "507f1f77bcf86cd799439011",
"itemCounts": {
"total": 0,
"queued": 0,
"inProgress": 0,
"completed": 0,
"missingData": 0,
"failed": 0,
"cancelled": 0
},
"taskCount": 0,
"fileCount": 0,
"startedAt": "2026-03-30T12:00:00.000Z",
"completedAt": "2026-03-30T12:05:00.000Z",
"createdAt": "2026-03-30T10:00:00.000Z",
"updatedAt": "2026-03-30T12:05:00.000Z",
"items": [
{
"id": "507f1f77bcf86cd799439011",
"migrationId": "507f1f77bcf86cd799439011",
"applicationId": "507f1f77bcf86cd799439011",
"name": "string",
"entityType": {},
"status": {},
"stage": {},
"files": [],
"fileCount": 0,
"progress": {},
"activeFile": "string",
"onboardingPercent": 0,
"validateTotal": 0,
"outstanding": {},
"error": "string",
"startedAt": "2026-03-30T12:00:00.000Z",
"completedAt": "2026-03-30T12:01:00.000Z",
"createdAt": "2026-03-30T10:00:00.000Z",
"updatedAt": "2026-03-30T12:01:00.000Z",
"retryable": false
}
],
"runBreakdown": {
"bulkMode": false,
"batchStages": [],
"liveCalls": 0,
"liveInputTokens": 0,
"liveOutputTokens": 0,
"liveCostUsd": 0,
"liveBatchableInputTokens": 0,
"liveBatchableOutputTokens": 0,
"liveBatchableCostUsd": 0,
"liveCacheHits": 0,
"currentStageSince": "string",
"phaseTimes": {}
}
}