Create a site
Needs: Roster, Read-write
Creates a site with optional capacity, manager, participants (clients), support staff and admin staff, using the same rules as the Imploy site pages. All parts save together or not at all.
Errors
422withUnsupported fields: ...for any field outside the list above.
curl -X POST "https://app.imploy.com.au/api/integrations/v1/sites" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "Example House",
"address": "10 Example Rd, Perth WA 6000",
"type": "Supported Independent Living",
"client_capacity": 4,
"manager_id": 40,
"participants": [
12
],
"support_staff": [
31
]
}'
import requests
import json
url = "https://app.imploy.com.au/api/integrations/v1/sites"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "Example House",
"address": "10 Example Rd, Perth WA 6000",
"type": "Supported Independent Living",
"client_capacity": 4,
"manager_id": 40,
"participants": [
12
],
"support_staff": [
31
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.imploy.com.au/api/integrations/v1/sites", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "Example House",
"address": "10 Example Rd, Perth WA 6000",
"type": "Supported Independent Living",
"client_capacity": 4,
"manager_id": 40,
"participants": [
12
],
"support_staff": [
31
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Example House",
"address": "10 Example Rd, Perth WA 6000",
"type": "Supported Independent Living",
"client_capacity": 4,
"manager_id": 40,
"participants": [
12
],
"support_staff": [
31
]
}`)
req, err := http.NewRequest("POST", "https://app.imploy.com.au/api/integrations/v1/sites", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.imploy.com.au/api/integrations/v1/sites')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "Example House",
"address": "10 Example Rd, Perth WA 6000",
"type": "Supported Independent Living",
"client_capacity": 4,
"manager_id": 40,
"participants": [
12
],
"support_staff": [
31
]
}'
response = http.request(request)
puts response.body
{
"created": 4,
"site": {
"id": 4,
"name": "Example House",
"type": "Supported Independent Living",
"status": "Active",
"address": "10 Example Rd, Perth WA 6000",
"client_capacity": 4,
"manager": "Example Manager",
"participants": [
{
"id": 12,
"name": "Example Client"
}
],
"support_staff": [
{
"id": 31,
"name": "Example Worker"
}
],
"admin_staff": [
{
"id": 40,
"name": "Example Admin"
}
]
}
}
{
"message": "Invalid or expired access token."
}
{
"message": "Access token does not permit this action."
}
{
"message": "Too many requests."
}
/sites
Target server for requests. Edit to use your own host.
An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
imp_at_. Send it as Authorization: Bearer imp_at_XXXX.The media type of the request body
Up to 255 characters. Required on create.
Up to 500 characters. Required on create.
Active, Inactive or Maintenance. A new site is Active unless you say otherwise.
For example Supported Independent Living.
The business location. Required when the organisation has more than one.
Staff id of the site manager, or null.
A valid email, or null.
Up to 50 characters, or null.
0 to 1000, or null.
0 to 1000, or null.
Up to 20000 characters.
Client ids who live at or attend the site. Replaces the list on edit.
Staff ids. Replaces the list on edit.
Staff ids. Replaces the list on edit.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
Body
Up to 255 characters. Required on create.
Up to 500 characters. Required on create.
Active, Inactive or Maintenance. A new site is Active unless you say otherwise.
For example Supported Independent Living.
The business location. Required when the organisation has more than one.
Staff id of the site manager, or null.
A valid email, or null.
Up to 50 characters, or null.
0 to 1000, or null.
0 to 1000, or null.
Up to 20000 characters.
Client ids who live at or attend the site. Replaces the list on edit.
Staff ids. Replaces the list on edit.
Staff ids. Replaces the list on edit.