Update Run
PATCH /api/v1/payroll-migrations/{migration_id}/runs/{id}/
Update the details of an existing run within a migration. Only the fields you include in the request body will be updated.
Authentication
Requires an API key with migrations:write scope. Pass via the X-API-Key header.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
migration_id | string (UUID) | The unique identifier of the parent migration. |
id | string (UUID) | The unique identifier of the run. |
Request
Content type: application/json
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
run_type | string | No | Either "source" or "target". |
document_id | string (UUID) | No | Updated document ID to associate with this run. |
Response
Status: 200 OK
{
"id": "d4e5f6a7-b8c9-0123-def0-123456789abc",
"migration": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"run_type": "target",
"document_id": "f6a7b8c9-d0e1-2345-f012-3456789abcde",
"status": "pending",
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T14:30:00Z"
}Errors
| Status | Description |
|---|---|
400 | Invalid request body fields or invalid run_type. |
401 | Missing or invalid API key. |
403 | API key does not have migrations:write scope. |
404 | Migration or run not found. |
Code Examples
curl -X PATCH https://api.parsifyhq.com/api/v1/payroll-migrations/b2c3d4e5-f6a7-8901-bcde-f12345678901/runs/d4e5f6a7-b8c9-0123-def0-123456789abc/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"run_type": "target"}'