Update school capacity
curl --request PATCH \
--url https://{host}/primula/api/v3/schools/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capacity": 120
}
'import requests
url = "https://{host}/primula/api/v3/schools/{id}"
payload = { "capacity": 120 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({capacity: 120})
};
fetch('https://{host}/primula/api/v3/schools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/primula/api/v3/schools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'capacity' => 120
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/primula/api/v3/schools/{id}"
payload := strings.NewReader("{\n \"capacity\": 120\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{host}/primula/api/v3/schools/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"capacity\": 120\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/schools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"capacity\": 120\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"capacity": 123,
"full_name": "<string>",
"gusto_company_uuid": "<string>",
"gusto_company_id": "<string>",
"company_id": "<string>",
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"phone": "<string>",
"time_zone": "<string>",
"inquiry_call_pre_screen": true,
"is_active": true,
"is_procare_online": true,
"is_procare_online_leads": true,
"procare_desktop_id": "<string>",
"procare_desktop_name": "<string>",
"hide_billing_plan_alerts": true,
"intellikid_location_id": "<string>",
"IsIntellikidSchoolWithNoLeadsInProcare": true,
"lineleader_center_id": 123,
"lineleader_center_name": "<string>",
"lineleader_center_code": "<string>"
}Schools
Update school capacity
Requires company_id, an authenticated session with schools assigned, and the target school in those assignments. Updates capacity, then reads the school in the requested company. A failed subsequent read can return 404 or 500 after the write has executed.
PATCH
/
schools
/
{id}
Update school capacity
curl --request PATCH \
--url https://{host}/primula/api/v3/schools/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capacity": 120
}
'import requests
url = "https://{host}/primula/api/v3/schools/{id}"
payload = { "capacity": 120 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({capacity: 120})
};
fetch('https://{host}/primula/api/v3/schools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/primula/api/v3/schools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'capacity' => 120
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/primula/api/v3/schools/{id}"
payload := strings.NewReader("{\n \"capacity\": 120\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{host}/primula/api/v3/schools/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"capacity\": 120\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/schools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"capacity\": 120\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"capacity": 123,
"full_name": "<string>",
"gusto_company_uuid": "<string>",
"gusto_company_id": "<string>",
"company_id": "<string>",
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"phone": "<string>",
"time_zone": "<string>",
"inquiry_call_pre_screen": true,
"is_active": true,
"is_procare_online": true,
"is_procare_online_leads": true,
"procare_desktop_id": "<string>",
"procare_desktop_name": "<string>",
"hide_billing_plan_alerts": true,
"intellikid_location_id": "<string>",
"IsIntellikidSchoolWithNoLeadsInProcare": true,
"lineleader_center_id": 123,
"lineleader_center_name": "<string>",
"lineleader_center_code": "<string>"
}Authorizations
Access token issued by POST /sessions and associated with a valid server-side session.
Path Parameters
UUID identifying this resource.
Query Parameters
Company UUID. Must equal the authenticated session company when that session has a company assigned; the equality check is skipped for sessions without one.
Body
application/json
Update School Request.
New school capacity; must be greater than zero.
Required range:
x >= 1Response
Successful response.
School.
Company id.
The API currently serializes this property with the exact capitalization shown.