Create a new service
curl --request POST \
--url https://b.anny.co/api/v1/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "services",
"attributes": {
"description": null,
"access_code": "",
"is_rental_option": false,
"has_flexible_duration": false,
"requires_booking_description": false,
"requires_address": false,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"booking_interval": 60,
"calculation_interval": 5,
"min_duration": 60,
"max_duration": 60,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"starting_fee": 0,
"uncharged_duration": 0,
"price": "49.00",
"tax_rate": 19,
"currency": "EUR",
"default_weight": "10",
"settings": {
"payment": {
"flow": "pay-offline",
"isEnabled": false
}
},
"is_net_price": false,
"price_hidden": false,
"name": "PCR Test"
},
"relationships": {},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/services"
payload = { "data": {
"type": "services",
"attributes": {
"description": None,
"access_code": "",
"is_rental_option": False,
"has_flexible_duration": False,
"requires_booking_description": False,
"requires_address": False,
"requires_mobile": False,
"allow_customer_notes": True,
"allow_more_bookings": True,
"booking_interval": 60,
"calculation_interval": 5,
"min_duration": 60,
"max_duration": 60,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"starting_fee": 0,
"uncharged_duration": 0,
"price": "49.00",
"tax_rate": 19,
"currency": "EUR",
"default_weight": "10",
"settings": { "payment": {
"flow": "pay-offline",
"isEnabled": False
} },
"is_net_price": False,
"price_hidden": False,
"name": "PCR Test"
},
"relationships": {},
"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: 'services',
attributes: {
description: null,
access_code: '',
is_rental_option: false,
has_flexible_duration: false,
requires_booking_description: false,
requires_address: false,
requires_mobile: false,
allow_customer_notes: true,
allow_more_bookings: true,
booking_interval: 60,
calculation_interval: 5,
min_duration: 60,
max_duration: 60,
lead_time: 0,
padding_before: 0,
padding_after: 0,
advance_booking_period: 365,
starting_fee: 0,
uncharged_duration: 0,
price: '49.00',
tax_rate: 19,
currency: 'EUR',
default_weight: '10',
settings: {payment: {flow: 'pay-offline', isEnabled: false}},
is_net_price: false,
price_hidden: false,
name: 'PCR Test'
},
relationships: {},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/services', 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/services",
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' => 'services',
'attributes' => [
'description' => null,
'access_code' => '',
'is_rental_option' => false,
'has_flexible_duration' => false,
'requires_booking_description' => false,
'requires_address' => false,
'requires_mobile' => false,
'allow_customer_notes' => true,
'allow_more_bookings' => true,
'booking_interval' => 60,
'calculation_interval' => 5,
'min_duration' => 60,
'max_duration' => 60,
'lead_time' => 0,
'padding_before' => 0,
'padding_after' => 0,
'advance_booking_period' => 365,
'starting_fee' => 0,
'uncharged_duration' => 0,
'price' => '49.00',
'tax_rate' => 19,
'currency' => 'EUR',
'default_weight' => '10',
'settings' => [
'payment' => [
'flow' => 'pay-offline',
'isEnabled' => false
]
],
'is_net_price' => false,
'price_hidden' => false,
'name' => 'PCR Test'
],
'relationships' => [
],
'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/services"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\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/services")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/services")
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\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "services",
"id": "3102",
"attributes": {
"name": "PCR Test",
"slug": "oojvup1ojctt91710fh1o4vltyghej",
"description": null,
"hidden": null,
"is_rental_option": false,
"has_flexible_duration": false,
"auto_duration": null,
"allow_cross_schedule": null,
"requires_booking_description": false,
"requires_address": true,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"charge_off_schedule": null,
"booking_interval": 5,
"calculation_interval": 5,
"min_duration": 5,
"max_duration": 5,
"uncharged_duration": 0,
"is_full_day": false,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"price": 49,
"starting_fee": 0,
"currency": "EUR",
"tax_rate": 19,
"is_net_price": false,
"price_hidden": false,
"default_weight": 10,
"created_at": "2021-10-25T15:50:32+00:00",
"updated_at": "2021-10-25T15:50:32+00:00",
"access_code": null,
"settings": {
"payment": {
"isEnabled": false,
"allowOffline": false,
"flow": "pay-offline"
}
},
"email_info": null
},
"links": {
"self": "https://b.anny.co/api/v1/services/3102"
},
"meta": {
"resource_list": "",
"min_duration_total": 49
}
}
}Service Configuration
Create a new service
POST
/
api
/
v1
/
services
Create a new service
curl --request POST \
--url https://b.anny.co/api/v1/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "services",
"attributes": {
"description": null,
"access_code": "",
"is_rental_option": false,
"has_flexible_duration": false,
"requires_booking_description": false,
"requires_address": false,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"booking_interval": 60,
"calculation_interval": 5,
"min_duration": 60,
"max_duration": 60,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"starting_fee": 0,
"uncharged_duration": 0,
"price": "49.00",
"tax_rate": 19,
"currency": "EUR",
"default_weight": "10",
"settings": {
"payment": {
"flow": "pay-offline",
"isEnabled": false
}
},
"is_net_price": false,
"price_hidden": false,
"name": "PCR Test"
},
"relationships": {},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/services"
payload = { "data": {
"type": "services",
"attributes": {
"description": None,
"access_code": "",
"is_rental_option": False,
"has_flexible_duration": False,
"requires_booking_description": False,
"requires_address": False,
"requires_mobile": False,
"allow_customer_notes": True,
"allow_more_bookings": True,
"booking_interval": 60,
"calculation_interval": 5,
"min_duration": 60,
"max_duration": 60,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"starting_fee": 0,
"uncharged_duration": 0,
"price": "49.00",
"tax_rate": 19,
"currency": "EUR",
"default_weight": "10",
"settings": { "payment": {
"flow": "pay-offline",
"isEnabled": False
} },
"is_net_price": False,
"price_hidden": False,
"name": "PCR Test"
},
"relationships": {},
"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: 'services',
attributes: {
description: null,
access_code: '',
is_rental_option: false,
has_flexible_duration: false,
requires_booking_description: false,
requires_address: false,
requires_mobile: false,
allow_customer_notes: true,
allow_more_bookings: true,
booking_interval: 60,
calculation_interval: 5,
min_duration: 60,
max_duration: 60,
lead_time: 0,
padding_before: 0,
padding_after: 0,
advance_booking_period: 365,
starting_fee: 0,
uncharged_duration: 0,
price: '49.00',
tax_rate: 19,
currency: 'EUR',
default_weight: '10',
settings: {payment: {flow: 'pay-offline', isEnabled: false}},
is_net_price: false,
price_hidden: false,
name: 'PCR Test'
},
relationships: {},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/services', 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/services",
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' => 'services',
'attributes' => [
'description' => null,
'access_code' => '',
'is_rental_option' => false,
'has_flexible_duration' => false,
'requires_booking_description' => false,
'requires_address' => false,
'requires_mobile' => false,
'allow_customer_notes' => true,
'allow_more_bookings' => true,
'booking_interval' => 60,
'calculation_interval' => 5,
'min_duration' => 60,
'max_duration' => 60,
'lead_time' => 0,
'padding_before' => 0,
'padding_after' => 0,
'advance_booking_period' => 365,
'starting_fee' => 0,
'uncharged_duration' => 0,
'price' => '49.00',
'tax_rate' => 19,
'currency' => 'EUR',
'default_weight' => '10',
'settings' => [
'payment' => [
'flow' => 'pay-offline',
'isEnabled' => false
]
],
'is_net_price' => false,
'price_hidden' => false,
'name' => 'PCR Test'
],
'relationships' => [
],
'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/services"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\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/services")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/services")
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\": \"services\",\n \"attributes\": {\n \"description\": null,\n \"access_code\": \"\",\n \"is_rental_option\": false,\n \"has_flexible_duration\": false,\n \"requires_booking_description\": false,\n \"requires_address\": false,\n \"requires_mobile\": false,\n \"allow_customer_notes\": true,\n \"allow_more_bookings\": true,\n \"booking_interval\": 60,\n \"calculation_interval\": 5,\n \"min_duration\": 60,\n \"max_duration\": 60,\n \"lead_time\": 0,\n \"padding_before\": 0,\n \"padding_after\": 0,\n \"advance_booking_period\": 365,\n \"starting_fee\": 0,\n \"uncharged_duration\": 0,\n \"price\": \"49.00\",\n \"tax_rate\": 19,\n \"currency\": \"EUR\",\n \"default_weight\": \"10\",\n \"settings\": {\n \"payment\": {\n \"flow\": \"pay-offline\",\n \"isEnabled\": false\n }\n },\n \"is_net_price\": false,\n \"price_hidden\": false,\n \"name\": \"PCR Test\"\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "services",
"id": "3102",
"attributes": {
"name": "PCR Test",
"slug": "oojvup1ojctt91710fh1o4vltyghej",
"description": null,
"hidden": null,
"is_rental_option": false,
"has_flexible_duration": false,
"auto_duration": null,
"allow_cross_schedule": null,
"requires_booking_description": false,
"requires_address": true,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"charge_off_schedule": null,
"booking_interval": 5,
"calculation_interval": 5,
"min_duration": 5,
"max_duration": 5,
"uncharged_duration": 0,
"is_full_day": false,
"lead_time": 0,
"padding_before": 0,
"padding_after": 0,
"advance_booking_period": 365,
"price": 49,
"starting_fee": 0,
"currency": "EUR",
"tax_rate": 19,
"is_net_price": false,
"price_hidden": false,
"default_weight": 10,
"created_at": "2021-10-25T15:50:32+00:00",
"updated_at": "2021-10-25T15:50:32+00:00",
"access_code": null,
"settings": {
"payment": {
"isEnabled": false,
"allowOffline": false,
"flow": "pay-offline"
}
},
"email_info": null
},
"links": {
"self": "https://b.anny.co/api/v1/services/3102"
},
"meta": {
"resource_list": "",
"min_duration_total": 49
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Abfrageparameter
Organization ID
Antwort
Created
A bookable service offered on one or more resources. Defines pricing, duration, and booking rules.
Show child attributes
Show child attributes
⌘I