Create a new resource
curl --request POST \
--url https://b.anny.co/api/v1/resources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "resources",
"attributes": {
"auto_accept_bookings": true,
"quantity": 1,
"staggered_quantity": null,
"max_booking_quantity": 1,
"has_children": false,
"available_from": null,
"available_to": null,
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>"
},
"relationships": {
"category": {
"data": {
"id": "9",
"type": "resource-categories"
}
},
"group": {
"data": null
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/resources"
payload = { "data": {
"type": "resources",
"attributes": {
"auto_accept_bookings": True,
"quantity": 1,
"staggered_quantity": None,
"max_booking_quantity": 1,
"has_children": False,
"available_from": None,
"available_to": None,
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>"
},
"relationships": {
"category": { "data": {
"id": "9",
"type": "resource-categories"
} },
"group": { "data": None }
},
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'resources',
attributes: {
auto_accept_bookings: true,
quantity: 1,
staggered_quantity: null,
max_booking_quantity: 1,
has_children: false,
available_from: null,
available_to: null,
name: 'Flip-Chart',
description: '<p>Rental flip charts to use in combination with booked meeting rooms.</p>'
},
relationships: {category: {data: {id: '9', type: 'resource-categories'}}, group: {data: null}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/resources', 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://b.anny.co/api/v1/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'resources',
'attributes' => [
'auto_accept_bookings' => true,
'quantity' => 1,
'staggered_quantity' => null,
'max_booking_quantity' => 1,
'has_children' => false,
'available_from' => null,
'available_to' => null,
'name' => 'Flip-Chart',
'description' => '<p>Rental flip charts to use in combination with booked meeting rooms.</p>'
],
'relationships' => [
'category' => [
'data' => [
'id' => '9',
'type' => 'resource-categories'
]
],
'group' => [
'data' => null
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/resources"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/resources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "resources",
"id": "24378",
"attributes": {
"slug": "flip-chart-phah76kvg1",
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>",
"plain_description": "Rental flip charts to use in combination with booked meeting rooms.",
"availabilityMode": null,
"continuous": true,
"color": null,
"auto_accept_bookings": true,
"timezone": "Europe/Berlin",
"quantity": 1,
"staggered_quantity": null,
"max_booking_quantity": 1,
"has_children": false,
"available_from": null,
"available_to": null,
"created_at": "2021-10-07T12:07:52+00:00",
"seo": false,
"live": false,
"public_listing": true,
"display_public_description": false,
"hidden": false,
"settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkIn": {
"isEnabled": false,
"autoExpiry": false,
"autoExpiresAfter": 15,
"allowedAdvancePeriod": 15,
"allowedDelayPeriod": 30,
"allowMultiple": false,
"releaseOnCheckout": false
},
"printLabels": false,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"resources": {
"maxBookings": {
"perDay": null,
"perWeek": null,
"perMonth": null
}
},
"maxBookings": {
"perSlot": null,
"perDay": null,
"perWeek": null,
"perMonth": null
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"preview_token": "ktlLeS7TseEXf8ZIE6WhWhFbITep9K",
"email_info": null
},
"links": {
"self": "https://b.anny.co/api/v1/resources/24378"
},
"meta": {
"is_available": null,
"booking_count": null,
"number_available": null,
"minimal_service": [],
"service_list": "",
"services_count": null,
"settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"checkIn": {
"isEnabled": false
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"meta_settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"checkIn": {
"isEnabled": false
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"zoom": false,
"client_url": "https://anny.co/b/book/flip-chart-phah76kvg1",
"preview_url": "https://anny.co/b/book/flip-chart-phah76kvg1?preview_token=ktlLeS7TseEXf8ZIE6WhWhFbITep9K"
}
}
}Resource Management
Create a new resource
POST
/
api
/
v1
/
resources
Create a new resource
curl --request POST \
--url https://b.anny.co/api/v1/resources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "resources",
"attributes": {
"auto_accept_bookings": true,
"quantity": 1,
"staggered_quantity": null,
"max_booking_quantity": 1,
"has_children": false,
"available_from": null,
"available_to": null,
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>"
},
"relationships": {
"category": {
"data": {
"id": "9",
"type": "resource-categories"
}
},
"group": {
"data": null
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/resources"
payload = { "data": {
"type": "resources",
"attributes": {
"auto_accept_bookings": True,
"quantity": 1,
"staggered_quantity": None,
"max_booking_quantity": 1,
"has_children": False,
"available_from": None,
"available_to": None,
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>"
},
"relationships": {
"category": { "data": {
"id": "9",
"type": "resource-categories"
} },
"group": { "data": None }
},
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'resources',
attributes: {
auto_accept_bookings: true,
quantity: 1,
staggered_quantity: null,
max_booking_quantity: 1,
has_children: false,
available_from: null,
available_to: null,
name: 'Flip-Chart',
description: '<p>Rental flip charts to use in combination with booked meeting rooms.</p>'
},
relationships: {category: {data: {id: '9', type: 'resource-categories'}}, group: {data: null}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/resources', 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://b.anny.co/api/v1/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'resources',
'attributes' => [
'auto_accept_bookings' => true,
'quantity' => 1,
'staggered_quantity' => null,
'max_booking_quantity' => 1,
'has_children' => false,
'available_from' => null,
'available_to' => null,
'name' => 'Flip-Chart',
'description' => '<p>Rental flip charts to use in combination with booked meeting rooms.</p>'
],
'relationships' => [
'category' => [
'data' => [
'id' => '9',
'type' => 'resource-categories'
]
],
'group' => [
'data' => null
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/resources"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/resources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"resources\",\n \"attributes\": {\n \"auto_accept_bookings\": true,\n \"quantity\": 1,\n \"staggered_quantity\": null,\n \"max_booking_quantity\": 1,\n \"has_children\": false,\n \"available_from\": null,\n \"available_to\": null,\n \"name\": \"Flip-Chart\",\n \"description\": \"<p>Rental flip charts to use in combination with booked meeting rooms.</p>\"\n },\n \"relationships\": {\n \"category\": {\n \"data\": {\n \"id\": \"9\",\n \"type\": \"resource-categories\"\n }\n },\n \"group\": {\n \"data\": null\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "resources",
"id": "24378",
"attributes": {
"slug": "flip-chart-phah76kvg1",
"name": "Flip-Chart",
"description": "<p>Rental flip charts to use in combination with booked meeting rooms.</p>",
"plain_description": "Rental flip charts to use in combination with booked meeting rooms.",
"availabilityMode": null,
"continuous": true,
"color": null,
"auto_accept_bookings": true,
"timezone": "Europe/Berlin",
"quantity": 1,
"staggered_quantity": null,
"max_booking_quantity": 1,
"has_children": false,
"available_from": null,
"available_to": null,
"created_at": "2021-10-07T12:07:52+00:00",
"seo": false,
"live": false,
"public_listing": true,
"display_public_description": false,
"hidden": false,
"settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkIn": {
"isEnabled": false,
"autoExpiry": false,
"autoExpiresAfter": 15,
"allowedAdvancePeriod": 15,
"allowedDelayPeriod": 30,
"allowMultiple": false,
"releaseOnCheckout": false
},
"printLabels": false,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"resources": {
"maxBookings": {
"perDay": null,
"perWeek": null,
"perMonth": null
}
},
"maxBookings": {
"perSlot": null,
"perDay": null,
"perWeek": null,
"perMonth": null
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"preview_token": "ktlLeS7TseEXf8ZIE6WhWhFbITep9K",
"email_info": null
},
"links": {
"self": "https://b.anny.co/api/v1/resources/24378"
},
"meta": {
"is_available": null,
"booking_count": null,
"number_available": null,
"minimal_service": [],
"service_list": "",
"services_count": null,
"settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"checkIn": {
"isEnabled": false
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"meta_settings": {
"showAvailabilityCalendar": true,
"showAvailabilityCount": true,
"checkout": {
"customerCanPickChildren": false,
"requiresLogin": false,
"requiresLoginReason": "",
"verifyGuestEmail": false
},
"checkIn": {
"isEnabled": false
},
"selfCheckIn": {
"isEnabled": false,
"disabledUntil": 15,
"geoCheckEnabled": true,
"geoCheckMaxDelta": 997,
"allowedOverrunTime": 60
}
},
"zoom": false,
"client_url": "https://anny.co/b/book/flip-chart-phah76kvg1",
"preview_url": "https://anny.co/b/book/flip-chart-phah76kvg1?preview_token=ktlLeS7TseEXf8ZIE6WhWhFbITep9K"
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Abfrageparameter
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
OK
A bookable resource (room, person, equipment, etc.) organized in a nested tree structure.
Show child attributes
Show child attributes
⌘I