get
https://example.com
POST /v2/migration/jobs — Upload CSV and start dry-run
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Uploads a CSV file to S3 and creates a migration job in PENDING_VALIDATION status. The job is immediately enqueued for dry-run validation — no records are written to the database during dry-run.
Request
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file | file | ✅ | CSV file (max 50 MB, text/csv MIME type only) |
type | string | ✅ | Entity type: PATIENTS, PRODUCTS, ORDERS, SUBSCRIPTIONS, or COUPONS |
Required role
affiliate_super_admin
Response 200
200{
"success": true,
"result": {
"id": "mjob::abc123",
"type": "PATIENTS",
"status": "PENDING_VALIDATION",
"dryRun": true,
"totalRows": 0,
"processedRows": 0,
"successRows": 0,
"errorRows": 0,
"skippedRows": 0,
"createdAt": "2026-05-30T14:00:00.000Z"
}
}totalRows is 0 until the validation worker processes the file.
Errors
| Status | Description |
|---|---|
400 | No file attached |
400 | File exceeds 50 MB |
400 | File is not a CSV |
400 | Invalid type value |
