Edit a site
Needs: Roster, Read-write
Edits a site's details, status, capacity, description, manager and members. Send only what changes. Use participants, support_staff and admin_staff to replace a list, or the add_ and remove_ versions to change it.
curl -X PATCH "https://app.imploy.com.au/api/integrations/v1/sites/123" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"status": "Maintenance",
"add_participants": [
15
],
"remove_support_staff": [
31
]
}'
import requests
import json
url = "https://app.imploy.com.au/api/integrations/v1/sites/123"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"status": "Maintenance",
"add_participants": [
15
],
"remove_support_staff": [
31
]
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.imploy.com.au/api/integrations/v1/sites/123", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"status": "Maintenance",
"add_participants": [
15
],
"remove_support_staff": [
31
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"status": "Maintenance",
"add_participants": [
15
],
"remove_support_staff": [
31
]
}`)
req, err := http.NewRequest("PATCH", "https://app.imploy.com.au/api/integrations/v1/sites/123", 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/123')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"status": "Maintenance",
"add_participants": [
15
],
"remove_support_staff": [
31
]
}'
response = http.request(request)
puts response.body
{
"updated": 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/{id}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 site id.
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.
Client ids to add.
Client ids to remove.
Staff ids to add.
Staff ids to remove.
Staff ids to add.
Staff ids to remove.
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.
Path Parameters
The site id.
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.
Client ids to add.
Client ids to remove.
Staff ids to add.
Staff ids to remove.
Staff ids to add.
Staff ids to remove.
Responses
OK