Update donor profile fields inline
Updates one through eight allowlisted canonical/compatibility fields on an organization donor, including archived donors while retaining archive status. Resolved donor type rejects incompatible personal/organization identity. Legacy donor forms require full edit for address fields. Enforces email/username uniqueness, country/subdivision and preferred-contact rules; normalizes tags, geo labels and phone. Saves immediately, synchronizes configured primary-contact fields to related donors, records activity/notification and refreshes search. Does not accept profile_revision optimistic concurrency; response includes directly applied canonical fields rather than every derived/synchronized change. Requires permission: one of donors_manage.
curl --request PATCH \
--url https://api.gratona.com/v1/donor/{id}/field \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": {
"username": "Example",
"email": "jane@example.org",
"first_name": "Jane",
"last_name": "Example",
"name": "Example",
"phone": "Example",
"phone_e164": "Example",
"address": "Example",
"address_line1": "Example",
"street": "Example",
"address_line2": "Example",
"location": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "US",
"subdivision_code": "US-CA",
"postal_code": "Example",
"organization_name": "Example",
"tags": "Education,Monthly",
"do_not_email": true,
"do_not_mail": true,
"can_receive_sms": true,
"preferred_contact_method": "email"
}
}
'import requests
url = "https://api.gratona.com/v1/donor/{id}/field"
payload = { "fields": {
"username": "Example",
"email": "jane@example.org",
"first_name": "Jane",
"last_name": "Example",
"name": "Example",
"phone": "Example",
"phone_e164": "Example",
"address": "Example",
"address_line1": "Example",
"street": "Example",
"address_line2": "Example",
"location": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "US",
"subdivision_code": "US-CA",
"postal_code": "Example",
"organization_name": "Example",
"tags": "Education,Monthly",
"do_not_email": True,
"do_not_mail": True,
"can_receive_sms": True,
"preferred_contact_method": "email"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: {
username: 'Example',
email: 'jane@example.org',
first_name: 'Jane',
last_name: 'Example',
name: 'Example',
phone: 'Example',
phone_e164: 'Example',
address: 'Example',
address_line1: 'Example',
street: 'Example',
address_line2: 'Example',
location: 'Example',
city: 'Example',
state: 'Example',
zip: 'Example',
country: 'Example',
country_code: 'US',
subdivision_code: 'US-CA',
postal_code: 'Example',
organization_name: 'Example',
tags: 'Education,Monthly',
do_not_email: true,
do_not_mail: true,
can_receive_sms: true,
preferred_contact_method: 'email'
}
})
};
fetch('https://api.gratona.com/v1/donor/{id}/field', 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/donor/{id}/field",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'username' => 'Example',
'email' => 'jane@example.org',
'first_name' => 'Jane',
'last_name' => 'Example',
'name' => 'Example',
'phone' => 'Example',
'phone_e164' => 'Example',
'address' => 'Example',
'address_line1' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'location' => 'Example',
'city' => 'Example',
'state' => 'Example',
'zip' => 'Example',
'country' => 'Example',
'country_code' => 'US',
'subdivision_code' => 'US-CA',
'postal_code' => 'Example',
'organization_name' => 'Example',
'tags' => 'Education,Monthly',
'do_not_email' => true,
'do_not_mail' => true,
'can_receive_sms' => true,
'preferred_contact_method' => 'email'
]
]),
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/donor/{id}/field"
payload := strings.NewReader("{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gratona.com/v1/donor/{id}/field")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/donor/{id}/field")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"message": "Donor field saved",
"fields": {
"username": "Example",
"email": "Example",
"first_name": "Example",
"last_name": "Example",
"phone": "Example",
"phone_e164": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "Example",
"subdivision_code": "Example",
"organization_name": "Example",
"tags": [
"Education"
],
"do_not_email": 0,
"do_not_mail": true,
"can_receive_sms": true,
"preferred_contact_method": "email"
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"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
Id in the current organization.
Body
Validated request fields for this operation.
One through eight named fields. Existing donor type gates personal versus organization identity. Inline address editing requires a standardized donor form.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://api.gratona.com/v1/donor/{id}/field \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": {
"username": "Example",
"email": "jane@example.org",
"first_name": "Jane",
"last_name": "Example",
"name": "Example",
"phone": "Example",
"phone_e164": "Example",
"address": "Example",
"address_line1": "Example",
"street": "Example",
"address_line2": "Example",
"location": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "US",
"subdivision_code": "US-CA",
"postal_code": "Example",
"organization_name": "Example",
"tags": "Education,Monthly",
"do_not_email": true,
"do_not_mail": true,
"can_receive_sms": true,
"preferred_contact_method": "email"
}
}
'import requests
url = "https://api.gratona.com/v1/donor/{id}/field"
payload = { "fields": {
"username": "Example",
"email": "jane@example.org",
"first_name": "Jane",
"last_name": "Example",
"name": "Example",
"phone": "Example",
"phone_e164": "Example",
"address": "Example",
"address_line1": "Example",
"street": "Example",
"address_line2": "Example",
"location": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "US",
"subdivision_code": "US-CA",
"postal_code": "Example",
"organization_name": "Example",
"tags": "Education,Monthly",
"do_not_email": True,
"do_not_mail": True,
"can_receive_sms": True,
"preferred_contact_method": "email"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: {
username: 'Example',
email: 'jane@example.org',
first_name: 'Jane',
last_name: 'Example',
name: 'Example',
phone: 'Example',
phone_e164: 'Example',
address: 'Example',
address_line1: 'Example',
street: 'Example',
address_line2: 'Example',
location: 'Example',
city: 'Example',
state: 'Example',
zip: 'Example',
country: 'Example',
country_code: 'US',
subdivision_code: 'US-CA',
postal_code: 'Example',
organization_name: 'Example',
tags: 'Education,Monthly',
do_not_email: true,
do_not_mail: true,
can_receive_sms: true,
preferred_contact_method: 'email'
}
})
};
fetch('https://api.gratona.com/v1/donor/{id}/field', 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/donor/{id}/field",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'username' => 'Example',
'email' => 'jane@example.org',
'first_name' => 'Jane',
'last_name' => 'Example',
'name' => 'Example',
'phone' => 'Example',
'phone_e164' => 'Example',
'address' => 'Example',
'address_line1' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'location' => 'Example',
'city' => 'Example',
'state' => 'Example',
'zip' => 'Example',
'country' => 'Example',
'country_code' => 'US',
'subdivision_code' => 'US-CA',
'postal_code' => 'Example',
'organization_name' => 'Example',
'tags' => 'Education,Monthly',
'do_not_email' => true,
'do_not_mail' => true,
'can_receive_sms' => true,
'preferred_contact_method' => 'email'
]
]),
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/donor/{id}/field"
payload := strings.NewReader("{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gratona.com/v1/donor/{id}/field")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/donor/{id}/field")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"username\": \"Example\",\n \"email\": \"jane@example.org\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"phone\": \"Example\",\n \"phone_e164\": \"Example\",\n \"address\": \"Example\",\n \"address_line1\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"location\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"zip\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"US\",\n \"subdivision_code\": \"US-CA\",\n \"postal_code\": \"Example\",\n \"organization_name\": \"Example\",\n \"tags\": \"Education,Monthly\",\n \"do_not_email\": true,\n \"do_not_mail\": true,\n \"can_receive_sms\": true,\n \"preferred_contact_method\": \"email\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"message": "Donor field saved",
"fields": {
"username": "Example",
"email": "Example",
"first_name": "Example",
"last_name": "Example",
"phone": "Example",
"phone_e164": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"zip": "Example",
"country": "Example",
"country_code": "Example",
"subdivision_code": "Example",
"organization_name": "Example",
"tags": [
"Education"
],
"do_not_email": 0,
"do_not_mail": true,
"can_receive_sms": true,
"preferred_contact_method": "email"
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}