Add a new recipient during participation intake
Requires the participation feature, programs_view and access to this organization-owned program. Requires participation_record, participation_submit or participation_configure and access to the check’s site/cohort. Creates a donor-hidden recipient, pending current placement and new-entrant observation in a draft check. A usable recipient title field is required; display_name fills the first title field when no submitted title has a value. Required recipient fields and configured intake fields must be filled; field types/options and unique values are checked, including archived duplicates. Organization-wide idempotency key replays within the same check before stale-version/state validation, returning 200 with the original result (entity may be null if no longer available); new intake returns 201. New-request stale lock_version returns 422. Returns recipient identity and the full updated check.
curl --request POST \
--url https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lock_version": 42,
"display_name": "Jane Recipient",
"idempotency_key": "intake-recipient-120-001",
"fields": {},
"sp_num": 1,
"sp_amount": 1,
"email": "jsmith@example.com",
"waiting_days": 182500,
"waiting_since": "2023-12-25",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients"
payload = {
"lock_version": 42,
"display_name": "Jane Recipient",
"idempotency_key": "intake-recipient-120-001",
"fields": {},
"sp_num": 1,
"sp_amount": 1,
"email": "jsmith@example.com",
"waiting_days": 182500,
"waiting_since": "2023-12-25",
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
lock_version: 42,
display_name: 'Jane Recipient',
idempotency_key: 'intake-recipient-120-001',
fields: {},
sp_num: 1,
sp_amount: 1,
email: 'jsmith@example.com',
waiting_days: 182500,
waiting_since: '2023-12-25',
tags: ['<string>']
})
};
fetch('https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lock_version' => 42,
'display_name' => 'Jane Recipient',
'idempotency_key' => 'intake-recipient-120-001',
'fields' => [
],
'sp_num' => 1,
'sp_amount' => 1,
'email' => 'jsmith@example.com',
'waiting_days' => 182500,
'waiting_since' => '2023-12-25',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients"
payload := strings.NewReader("{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created": true,
"entity": {
"id": 123,
"display_name": "<string>",
"is_visible": true
},
"session": {
"id": 123,
"program_id": 123,
"scheduled_for": "2023-12-25",
"revision": 123,
"supersedes_session_id": 123,
"lock_version": 123,
"partial_reason": "<string>",
"source_note": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"available_new_entrants_count": 123,
"period": {
"id": 123,
"name": "<string>"
},
"site": {
"id": 123,
"name": "<string>"
},
"cohort": {
"id": 123,
"name": "<string>"
},
"session_type": "roster_verification",
"status": "draft",
"series_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_evidence_source": "official_record",
"counts": {
"expected": 123,
"seen": 123,
"confirmed_enrolled": 123,
"unresolved": 123,
"not_checked": 123,
"not_expected": 123,
"new_entrant": 123
},
"observations": [
{
"id": 123,
"entity_id": 123,
"gratona_id": 123,
"display_name": "<string>",
"is_archived": true,
"thumbnail_url": "<string>",
"site_name": "<string>",
"cohort_name": "<string>",
"expected_in_roster": true,
"is_new_entrant": true,
"reason_code": "<string>",
"note": "<string>",
"effective_on": "2023-12-25",
"destination_program_site_id": 123,
"destination_program_cohort_id": 123,
"destination_recipient_placement_id": 123,
"follow_up": {
"id": 123,
"due_date": "2023-12-25"
},
"encounter_status": "seen",
"enrollment_confirmation": "confirmed_enrolled",
"evidence_source": "official_record"
}
]
}
}{
"created": true,
"entity": {
"id": 123,
"display_name": "<string>",
"is_visible": true
},
"session": {
"id": 123,
"program_id": 123,
"scheduled_for": "2023-12-25",
"revision": 123,
"supersedes_session_id": 123,
"lock_version": 123,
"partial_reason": "<string>",
"source_note": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"available_new_entrants_count": 123,
"period": {
"id": 123,
"name": "<string>"
},
"site": {
"id": 123,
"name": "<string>"
},
"cohort": {
"id": 123,
"name": "<string>"
},
"session_type": "roster_verification",
"status": "draft",
"series_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_evidence_source": "official_record",
"counts": {
"expected": 123,
"seen": 123,
"confirmed_enrolled": 123,
"unresolved": 123,
"not_checked": 123,
"not_expected": 123,
"new_entrant": 123
},
"observations": [
{
"id": 123,
"entity_id": 123,
"gratona_id": 123,
"display_name": "<string>",
"is_archived": true,
"thumbnail_url": "<string>",
"site_name": "<string>",
"cohort_name": "<string>",
"expected_in_roster": true,
"is_new_entrant": true,
"reason_code": "<string>",
"note": "<string>",
"effective_on": "2023-12-25",
"destination_program_site_id": 123,
"destination_program_cohort_id": 123,
"destination_recipient_placement_id": 123,
"follow_up": {
"id": 123,
"due_date": "2023-12-25"
},
"encounter_status": "seen",
"enrollment_confirmation": "confirmed_enrolled",
"evidence_source": "official_record"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Program whose participation setup, placements and checks are being accessed.
x >= 1Participation check ID within this program.
x >= 1Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
x >= 142
1 - 255"Jane Recipient"
1 - 255"intake-recipient-120-001"
Current recipient field keys to values, with at most 100 entries. Discover types/options/required fields through overview.intake_fields. Unknown keys are ignored. Site/cohort source fields are populated from the check. Dates use YYYY-MM-DD, numeric fields accept numbers, select/radio values must match options and checkbox fields require arrays.
Show child attributes
Show child attributes
x >= 0x >= 0255Whole days waiting; do not combine a non-null value with waiting_since.
0 <= x <= 365000Waiting start date, no later than today in the organization timezone; do not combine with waiting_days.
100Tag name without commas.
255curl --request POST \
--url https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lock_version": 42,
"display_name": "Jane Recipient",
"idempotency_key": "intake-recipient-120-001",
"fields": {},
"sp_num": 1,
"sp_amount": 1,
"email": "jsmith@example.com",
"waiting_days": 182500,
"waiting_since": "2023-12-25",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients"
payload = {
"lock_version": 42,
"display_name": "Jane Recipient",
"idempotency_key": "intake-recipient-120-001",
"fields": {},
"sp_num": 1,
"sp_amount": 1,
"email": "jsmith@example.com",
"waiting_days": 182500,
"waiting_since": "2023-12-25",
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
lock_version: 42,
display_name: 'Jane Recipient',
idempotency_key: 'intake-recipient-120-001',
fields: {},
sp_num: 1,
sp_amount: 1,
email: 'jsmith@example.com',
waiting_days: 182500,
waiting_since: '2023-12-25',
tags: ['<string>']
})
};
fetch('https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lock_version' => 42,
'display_name' => 'Jane Recipient',
'idempotency_key' => 'intake-recipient-120-001',
'fields' => [
],
'sp_num' => 1,
'sp_amount' => 1,
'email' => 'jsmith@example.com',
'waiting_days' => 182500,
'waiting_since' => '2023-12-25',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients"
payload := strings.NewReader("{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/programs/{program_id}/participation/sessions/{session_id}/recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lock_version\": 42,\n \"display_name\": \"Jane Recipient\",\n \"idempotency_key\": \"intake-recipient-120-001\",\n \"fields\": {},\n \"sp_num\": 1,\n \"sp_amount\": 1,\n \"email\": \"jsmith@example.com\",\n \"waiting_days\": 182500,\n \"waiting_since\": \"2023-12-25\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created": true,
"entity": {
"id": 123,
"display_name": "<string>",
"is_visible": true
},
"session": {
"id": 123,
"program_id": 123,
"scheduled_for": "2023-12-25",
"revision": 123,
"supersedes_session_id": 123,
"lock_version": 123,
"partial_reason": "<string>",
"source_note": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"available_new_entrants_count": 123,
"period": {
"id": 123,
"name": "<string>"
},
"site": {
"id": 123,
"name": "<string>"
},
"cohort": {
"id": 123,
"name": "<string>"
},
"session_type": "roster_verification",
"status": "draft",
"series_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_evidence_source": "official_record",
"counts": {
"expected": 123,
"seen": 123,
"confirmed_enrolled": 123,
"unresolved": 123,
"not_checked": 123,
"not_expected": 123,
"new_entrant": 123
},
"observations": [
{
"id": 123,
"entity_id": 123,
"gratona_id": 123,
"display_name": "<string>",
"is_archived": true,
"thumbnail_url": "<string>",
"site_name": "<string>",
"cohort_name": "<string>",
"expected_in_roster": true,
"is_new_entrant": true,
"reason_code": "<string>",
"note": "<string>",
"effective_on": "2023-12-25",
"destination_program_site_id": 123,
"destination_program_cohort_id": 123,
"destination_recipient_placement_id": 123,
"follow_up": {
"id": 123,
"due_date": "2023-12-25"
},
"encounter_status": "seen",
"enrollment_confirmation": "confirmed_enrolled",
"evidence_source": "official_record"
}
]
}
}{
"created": true,
"entity": {
"id": 123,
"display_name": "<string>",
"is_visible": true
},
"session": {
"id": 123,
"program_id": 123,
"scheduled_for": "2023-12-25",
"revision": 123,
"supersedes_session_id": 123,
"lock_version": 123,
"partial_reason": "<string>",
"source_note": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"available_new_entrants_count": 123,
"period": {
"id": 123,
"name": "<string>"
},
"site": {
"id": 123,
"name": "<string>"
},
"cohort": {
"id": 123,
"name": "<string>"
},
"session_type": "roster_verification",
"status": "draft",
"series_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_evidence_source": "official_record",
"counts": {
"expected": 123,
"seen": 123,
"confirmed_enrolled": 123,
"unresolved": 123,
"not_checked": 123,
"not_expected": 123,
"new_entrant": 123
},
"observations": [
{
"id": 123,
"entity_id": 123,
"gratona_id": 123,
"display_name": "<string>",
"is_archived": true,
"thumbnail_url": "<string>",
"site_name": "<string>",
"cohort_name": "<string>",
"expected_in_roster": true,
"is_new_entrant": true,
"reason_code": "<string>",
"note": "<string>",
"effective_on": "2023-12-25",
"destination_program_site_id": 123,
"destination_program_cohort_id": 123,
"destination_recipient_placement_id": 123,
"follow_up": {
"id": 123,
"due_date": "2023-12-25"
},
"encounter_status": "seen",
"enrollment_confirmation": "confirmed_enrolled",
"evidence_source": "official_record"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}