Create Donors
POST
/v3/ingest/donors/
const url = 'https://example.com/v3/ingest/donors/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[{"cause_of_death":"Died of cancer","date_alive_after_lost_to_followup":{"day_interval":1,"month_interval":1},"date_of_birth":{"day_interval":1,"month_interval":1},"date_of_death":{"day_interval":1,"month_interval":1},"date_resolution":"example","gender":"Man","is_deceased":"Yes","lost_to_followup_after_clinical_event_identifier":"example","lost_to_followup_reason":"Completed study","program_id":"example","sex_at_birth":"Male","submitter_donor_id":"example","uuid":"example"}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v3/ingest/donors/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ { "cause_of_death": "Died of cancer", "date_alive_after_lost_to_followup": { "day_interval": 1, "month_interval": 1 }, "date_of_birth": { "day_interval": 1, "month_interval": 1 }, "date_of_death": { "day_interval": 1, "month_interval": 1 }, "date_resolution": "example", "gender": "Man", "is_deceased": "Yes", "lost_to_followup_after_clinical_event_identifier": "example", "lost_to_followup_reason": "Completed study", "program_id": "example", "sex_at_birth": "Male", "submitter_donor_id": "example", "uuid": "example" } ]'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
Payload
Array<object>
DonorIngestSchemaobject
cause_of_death
Any of:
CauseOfDeathEnum
string
null
date_alive_after_lost_to_followup
Any of:
DateInterval
null
date_of_birth
Any of:
DateInterval
null
date_of_death
Any of:
DateInterval
null
gender
Any of:
GenderEnum
string
null
is_deceased
Any of:
uBooleanEnum
string
null
lost_to_followup_reason
Any of:
LostToFollowupReasonEnum
string
null
program_id
required
Program Id
string
sex_at_birth
Any of:
SexAtBirthEnum
string
null
submitter_donor_id
required
Submitter Donor Id
string
Responses
Section titled “ Responses ”OK