curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Contoso Veterinary Clinic",
"kind": "veterinary_practice",
"email": "frontdesk@contoso.com",
"phone": "2075550188",
"website": "https://contoso.com",
"address": {
"country": "US",
"line1": "200 Commercial Street",
"city": "Portland",
"administrative_area": "ME",
"postal_code": "04101"
},
"is_primary_vet": true,
"relationship": "active_client"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Contoso Veterinary Clinic',
kind: 'veterinary_practice',
email: 'frontdesk@contoso.com',
phone: '2075550188',
website: 'https://contoso.com',
address: {
country: 'US',
line1: '200 Commercial Street',
city: 'Portland',
administrative_area: 'ME',
postal_code: '04101'
},
is_primary_vet: true,
relationship: 'active_client'
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/organizations/organizations"
payload = {
"name": "Contoso Veterinary Clinic",
"kind": "veterinary_practice",
"email": "frontdesk@contoso.com",
"phone": "2075550188",
"website": "https://contoso.com",
"address": {
"country": "US",
"line1": "200 Commercial Street",
"city": "Portland",
"administrative_area": "ME",
"postal_code": "04101"
},
"is_primary_vet": True,
"relationship": "active_client"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"kind": "veterinary_practice",
"email": "<string>",
"phone": "<string>",
"website": "<string>",
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"notes": "<string>",
"is_active": true,
"is_emergency": true,
"is_primary_vet": true,
"relationship": "prospect",
"relationship_since": "2023-12-25",
"industry_code": "<string>",
"industry_label": "<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)"
}Add an organization
Adds an organization to the directory. Only the name is required, and the kind is other unless you say. An address or phone sent here also becomes the organization’s main location, named Main. is_emergency and is_primary_vet belong to a veterinary practice only; making one the primary vet takes the flag from whichever practice had it. A relationship sent without relationship_since starts today. Needs write on Organizations.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Contoso Veterinary Clinic",
"kind": "veterinary_practice",
"email": "frontdesk@contoso.com",
"phone": "2075550188",
"website": "https://contoso.com",
"address": {
"country": "US",
"line1": "200 Commercial Street",
"city": "Portland",
"administrative_area": "ME",
"postal_code": "04101"
},
"is_primary_vet": true,
"relationship": "active_client"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Contoso Veterinary Clinic',
kind: 'veterinary_practice',
email: 'frontdesk@contoso.com',
phone: '2075550188',
website: 'https://contoso.com',
address: {
country: 'US',
line1: '200 Commercial Street',
city: 'Portland',
administrative_area: 'ME',
postal_code: '04101'
},
is_primary_vet: true,
relationship: 'active_client'
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/organizations/organizations"
payload = {
"name": "Contoso Veterinary Clinic",
"kind": "veterinary_practice",
"email": "frontdesk@contoso.com",
"phone": "2075550188",
"website": "https://contoso.com",
"address": {
"country": "US",
"line1": "200 Commercial Street",
"city": "Portland",
"administrative_area": "ME",
"postal_code": "04101"
},
"is_primary_vet": True,
"relationship": "active_client"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"kind": "veterinary_practice",
"email": "<string>",
"phone": "<string>",
"website": "<string>",
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"notes": "<string>",
"is_active": true,
"is_emergency": true,
"is_primary_vet": true,
"relationship": "prospect",
"relationship_since": "2023-12-25",
"industry_code": "<string>",
"industry_label": "<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)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Body
Cannot be emptied.
What the organization is.
veterinary_practice, rescue, shelter, supplier, employer, government, other The main phone number, kept as you send it. It is also the main location's phone.
Every part is optional, and a key not listed here is refused. An empty or null part is removed.
Show child attributes
Show child attributes
Veterinary practices only: it takes emergencies.
Veterinary practices only: the practice you use by default. One organization at most has it, so setting it takes it from the other.
What the organization is to you, or null for nothing yet.
prospect, active_client, past_client, partner, supplier, competitor, null The day the relationship began. Today when the relationship changes, unless you send it.
A NAICS or SIC code, 12 characters at most.
12What the industry code means, 160 characters at most.
160Response
The organization, as it was created.
What the organization is.
veterinary_practice, rescue, shelter, supplier, employer, government, other Every part is optional, and a key not listed here is refused. An empty or null part is removed.
Show child attributes
Show child attributes
false when it is archived.
Always false for anything but a veterinary practice.
Always false for anything but a veterinary practice.
prospect, active_client, past_client, partner, supplier, competitor, null