Skip to main content
POST
Queue document imports from a CSV mapping

Authorizations

Authorization
string
header
required

Passport bearer token authentication for legacy admin sessions.

Path Parameters

type
enum<string>
required

Required path value identifying which record type the documents should attach to. Accepted values are entity and donor; invalid values return 422.

Available options:
entity,
donor
program_id
integer
required

Required program ID used by the queued document import job to scope matching for the current client.

Body

multipart/form-data
csv_filename
string
required

Required string. S3 filename of the CSV mapping file already uploaded for this import.

Example:

"imports/documents.csv"

csv_unique_field_column
number
required

Required numeric zero-based CSV column index containing the recipient or donor unique field value.

Required range: x >= 0
Example:

0

csv_filename_column
number
required

Required numeric zero-based CSV column index containing each source document filename.

Required range: x >= 0
Example:

1

csv_permission_column
number
required

Required numeric zero-based CSV column index containing the desired file permission value.

Required range: x >= 0
Example:

2

unique_field
string
required

Required string. Field key used to match each CSV row to a recipient or donor.

Example:

"hys_id"

files
file[]
required

Required document uploads staged for the background import. Each file must pass the configured document import size limit.

create_thumbnails
boolean | null

Optional boolean. When true, the job may create thumbnails for image-like documents.

Example:

false

Response

Document import job queued.

message
string
Example:

"Document import job has been queued. You will be notified when the import is complete."