curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/organizations/{id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Westbrook clinic",
"address": {
"country": "US",
"line1": "12 Main Street",
"city": "Westbrook",
"administrative_area": "ME",
"postal_code": "04092"
},
"phone": "(207) 555-0164",
"phone_country": "1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Westbrook clinic',
address: {
country: 'US',
line1: '12 Main Street',
city: 'Westbrook',
administrative_area: 'ME',
postal_code: '04092'
},
phone: '(207) 555-0164',
phone_country: '1'
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/organizations/{id}/locations', 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/{id}/locations"
payload = {
"name": "Westbrook clinic",
"address": {
"country": "US",
"line1": "12 Main Street",
"city": "Westbrook",
"administrative_area": "ME",
"postal_code": "04092"
},
"phone": "(207) 555-0164",
"phone_country": "1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"phone": "<string>",
"phone_country": "<string>",
"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)"
}Add a location
Adds a place to the organization. It needs an address or a phone number. The first location is the main one whatever you send; a later one becomes the main one when you send is_primary: true. The main location’s address and phone are copied onto the organization. Needs write on Organizations.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/organizations/organizations/{id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Westbrook clinic",
"address": {
"country": "US",
"line1": "12 Main Street",
"city": "Westbrook",
"administrative_area": "ME",
"postal_code": "04092"
},
"phone": "(207) 555-0164",
"phone_country": "1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Westbrook clinic',
address: {
country: 'US',
line1: '12 Main Street',
city: 'Westbrook',
administrative_area: 'ME',
postal_code: '04092'
},
phone: '(207) 555-0164',
phone_country: '1'
})
};
fetch('https://{organization}.rescueconsole.com/api/organizations/organizations/{id}/locations', 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/{id}/locations"
payload = {
"name": "Westbrook clinic",
"address": {
"country": "US",
"line1": "12 Main Street",
"city": "Westbrook",
"administrative_area": "ME",
"postal_code": "04092"
},
"phone": "(207) 555-0164",
"phone_country": "1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"phone": "<string>",
"phone_country": "<string>",
"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_.
Path Parameters
The organization's ID.
Body
An address or a phone number is needed.
Such as Westbrook clinic. Cut to 120 characters; empty unless you say.
120Every part is optional, and a key not listed here is refused. An empty or null part is removed.
Show child attributes
Show child attributes
Kept as digits only. At most 15 digits together with the calling code.
The calling code, one to three digits, like 1 or 44. A value that is not a calling code is refused.
Cut to 2,000 characters.
2000true makes this the main location.
Response
The location.
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
Whether this is the main location.