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

ParameterTypeDescription
migration_idstring (UUID)The unique identifier of the parent migration.
idstring (UUID)The unique identifier of the run.

Request

Content type: application/json

Body Parameters

FieldTypeRequiredDescription
run_typestringNoEither "source" or "target".
document_idstring (UUID)NoUpdated 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

StatusDescription
400Invalid request body fields or invalid run_type.
401Missing or invalid API key.
403API key does not have migrations:write scope.
404Migration 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"}'