Duplicate a service
curl --request GET \
--url https://b.anny.co/api/v1/services/{service_slug}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/services/{service_slug}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/services/{service_slug}/duplicate', 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/{service_slug}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/services/{service_slug}/duplicate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/services/{service_slug}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/services/{service_slug}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "services",
"id": "3164",
"attributes": {
"name": "Schnelltest Kopie",
"slug": "hsjgxaffndvpdu5qrnbkaao5kz2qr7",
"description": null,
"hidden": false,
"is_rental_option": false,
"has_flexible_duration": false,
"auto_duration": false,
"allow_cross_schedule": false,
"requires_booking_description": false,
"requires_address": true,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"charge_off_schedule": true,
"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": 15,
"starting_fee": 0,
"currency": "EUR",
"tax_rate": 19,
"is_net_price": false,
"price_hidden": false,
"allow_personalization": true,
"require_personalization": true,
"require_address_personalization": true,
"default_weight": 1,
"created_at": "2021-11-05T13:03:29+00:00",
"updated_at": "2021-11-05T13:03:29+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/3164"
},
"meta": {
"resource_list": "",
"min_duration_total": 15
}
}
}Service Configuration
Duplicate a service
GET
/
api
/
v1
/
services
/
{service_slug}
/
duplicate
Duplicate a service
curl --request GET \
--url https://b.anny.co/api/v1/services/{service_slug}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/services/{service_slug}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/services/{service_slug}/duplicate', 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/{service_slug}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/services/{service_slug}/duplicate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/services/{service_slug}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/services/{service_slug}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "services",
"id": "3164",
"attributes": {
"name": "Schnelltest Kopie",
"slug": "hsjgxaffndvpdu5qrnbkaao5kz2qr7",
"description": null,
"hidden": false,
"is_rental_option": false,
"has_flexible_duration": false,
"auto_duration": false,
"allow_cross_schedule": false,
"requires_booking_description": false,
"requires_address": true,
"requires_mobile": false,
"allow_customer_notes": true,
"allow_more_bookings": true,
"charge_off_schedule": true,
"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": 15,
"starting_fee": 0,
"currency": "EUR",
"tax_rate": 19,
"is_net_price": false,
"price_hidden": false,
"allow_personalization": true,
"require_personalization": true,
"require_address_personalization": true,
"default_weight": 1,
"created_at": "2021-11-05T13:03:29+00:00",
"updated_at": "2021-11-05T13:03:29+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/3164"
},
"meta": {
"resource_list": "",
"min_duration_total": 15
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Abfrageparameter
Organization ID
Antwort
OK
A bookable service offered on one or more resources. Defines pricing, duration, and booking rules.
Show child attributes
Show child attributes
⌘I