Skip to main content
POST
Migrate donor field data between custom JSON and standardized columns

Authorizations

Authorization
string
header
required

Passport bearer token authentication for legacy admin sessions.

Body

application/json
hysform_id
integer
required

Donor form whose data to migrate. Must belong to the authenticated client and be of type=donor.

Example:

42

direction
enum<string>
required

Direction of the migration. Any other value returns 422.

Available options:
custom_to_standardized,
standardized_to_custom
Example:

"custom_to_standardized"

mapping
object

Optional override of the default custom-key → standardized-key map. Defaults to MigrateDonorFieldsJob::getDefaultCustomKeys() when omitted. Non-array values are ignored.

Example:

Response

Migration started. data.run is only present in the custom_to_standardized branch.

message
string
Example:

"Migration started. Donor data will be updated in the background."

status
string
Example:

"success"

data
object | null