Set Room Quantities
curl --request PUT \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"structureVersion": 123,
"slotId": "<string>",
"areaId": "<string>",
"rooms": [
{
"roomIndex": 249,
"quantity": "<string>",
"version": 4503599627370495
}
]
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms"
payload = {
"structureVersion": 123,
"slotId": "<string>",
"areaId": "<string>",
"rooms": [
{
"roomIndex": 249,
"quantity": "<string>",
"version": 4503599627370495
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
structureVersion: 123,
slotId: '<string>',
areaId: '<string>',
rooms: [{roomIndex: 249, quantity: '<string>', version: 4503599627370495}]
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'structureVersion' => 123,
'slotId' => '<string>',
'areaId' => '<string>',
'rooms' => [
[
'roomIndex' => 249,
'quantity' => '<string>',
'version' => 4503599627370495
]
]
]),
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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms"
payload := strings.NewReader("{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"structureVersion": 123,
"areas": [
{
"areaId": "<string>",
"parentId": "<string>",
"level": 123,
"levelKey": "<string>",
"levelLabel": "<string>",
"code": "<string>",
"name": "<string>",
"multiplier": 123,
"instanceTags": [
"<string>"
],
"effectiveInstanceCount": "<string>",
"ancestorPath": [
{
"id": "<string>",
"code": "<string>",
"name": "<string>"
}
]
}
],
"allocations": [
{
"id": "<string>",
"slotId": "<string>",
"areaId": "<string>",
"quantity": "<string>",
"effectiveQuantity": "<string>",
"version": 123
}
],
"areaQuantities": [
{
"slotId": "<string>",
"areaId": "<string>",
"defaultQuantity": "<string>",
"defaultVersion": 123,
"effectiveQuantity": "<string>",
"roomQuantities": [
{
"roomIndex": 123,
"roomNumber": "<string>",
"quantity": "<string>",
"version": 123
}
]
}
],
"systemAllocations": [
{
"id": "<string>",
"slotId": "<string>",
"systemArea": "extra",
"quantity": "<string>",
"version": 123
}
],
"slotTotals": [
{
"slotId": "<string>",
"effectiveQuantity": "<string>",
"slotQuantity": "<string>",
"unassignedQuantity": "<string>",
"totalQuantity": "<string>"
}
]
}Project Area Allocations
Set Room Quantities
PUT
/
v1
/
workspaces
/
{workspaceId}
/
projects
/
{projectId}
/
area-allocations
/
rooms
Set Room Quantities
curl --request PUT \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"structureVersion": 123,
"slotId": "<string>",
"areaId": "<string>",
"rooms": [
{
"roomIndex": 249,
"quantity": "<string>",
"version": 4503599627370495
}
]
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms"
payload = {
"structureVersion": 123,
"slotId": "<string>",
"areaId": "<string>",
"rooms": [
{
"roomIndex": 249,
"quantity": "<string>",
"version": 4503599627370495
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
structureVersion: 123,
slotId: '<string>',
areaId: '<string>',
rooms: [{roomIndex: 249, quantity: '<string>', version: 4503599627370495}]
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'structureVersion' => 123,
'slotId' => '<string>',
'areaId' => '<string>',
'rooms' => [
[
'roomIndex' => 249,
'quantity' => '<string>',
'version' => 4503599627370495
]
]
]),
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://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms"
payload := strings.NewReader("{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/projects/{projectId}/area-allocations/rooms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"structureVersion\": 123,\n \"slotId\": \"<string>\",\n \"areaId\": \"<string>\",\n \"rooms\": [\n {\n \"roomIndex\": 249,\n \"quantity\": \"<string>\",\n \"version\": 4503599627370495\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"structureVersion": 123,
"areas": [
{
"areaId": "<string>",
"parentId": "<string>",
"level": 123,
"levelKey": "<string>",
"levelLabel": "<string>",
"code": "<string>",
"name": "<string>",
"multiplier": 123,
"instanceTags": [
"<string>"
],
"effectiveInstanceCount": "<string>",
"ancestorPath": [
{
"id": "<string>",
"code": "<string>",
"name": "<string>"
}
]
}
],
"allocations": [
{
"id": "<string>",
"slotId": "<string>",
"areaId": "<string>",
"quantity": "<string>",
"effectiveQuantity": "<string>",
"version": 123
}
],
"areaQuantities": [
{
"slotId": "<string>",
"areaId": "<string>",
"defaultQuantity": "<string>",
"defaultVersion": 123,
"effectiveQuantity": "<string>",
"roomQuantities": [
{
"roomIndex": 123,
"roomNumber": "<string>",
"quantity": "<string>",
"version": 123
}
]
}
],
"systemAllocations": [
{
"id": "<string>",
"slotId": "<string>",
"systemArea": "extra",
"quantity": "<string>",
"version": 123
}
],
"slotTotals": [
{
"slotId": "<string>",
"effectiveQuantity": "<string>",
"slotQuantity": "<string>",
"unassignedQuantity": "<string>",
"totalQuantity": "<string>"
}
]
}Authorizations
Body
application/json
Response
200 - application/json
⌘I