Add an affiliation
curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/affiliations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_id": "6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10",
"organization_id": "0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48",
"kind": "employee",
"title": "Veterinarian",
"started_on": "2024-03-01",
"is_primary": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
person_id: '6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10',
organization_id: '0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48',
kind: 'employee',
title: 'Veterinarian',
started_on: '2024-03-01',
is_primary: true
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/affiliations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/organizations/affiliations"
payload = {
"person_id": "6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10",
"organization_id": "0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48",
"kind": "employee",
"title": "Veterinarian",
"started_on": "2024-03-01",
"is_primary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"person_id": "<string>",
"organization_id": "<string>",
"kind": "employee",
"title": "<string>",
"started_on": "2023-12-25",
"ended_on": "2023-12-25",
"is_current": true,
"is_primary": true,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Affiliations
Add an affiliation
Records that a person works at, volunteers for or otherwise belongs to an organization. The kind is contact unless you say. A person has one primary affiliation at most: making this one primary takes it from the other. An organization that is not in your directory is refused with 400, and a person who is not yours with 404. Needs write on Organizations.
POST
/
api
/
organizations
/
affiliations
Add an affiliation
curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/affiliations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_id": "6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10",
"organization_id": "0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48",
"kind": "employee",
"title": "Veterinarian",
"started_on": "2024-03-01",
"is_primary": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
person_id: '6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10',
organization_id: '0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48',
kind: 'employee',
title: 'Veterinarian',
started_on: '2024-03-01',
is_primary: true
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/affiliations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/organizations/affiliations"
payload = {
"person_id": "6f1c2b0e-8d4a-4c1e-9b7a-2e5d1f3a9c10",
"organization_id": "0b7e4d2a-6c3f-4a1b-8e9d-7f2c5a1b3e48",
"kind": "employee",
"title": "Veterinarian",
"started_on": "2024-03-01",
"is_primary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"person_id": "<string>",
"organization_id": "<string>",
"kind": "employee",
"title": "<string>",
"started_on": "2023-12-25",
"ended_on": "2023-12-25",
"is_current": true,
"is_primary": true,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Body
application/json
Available options:
employee, volunteer, contractor, owner, board_member, contact, other Such as Veterinarian or Practice manager.
The day it began, YYYY-MM-DD.
The day it ended, YYYY-MM-DD. Not before started_on. Empty while it is current.
true makes this the person's primary affiliation.
Response
The affiliation.
Available options:
employee, volunteer, contractor, owner, board_member, contact, other true while there is no end date.