Create a customer
curl --request POST \
--url https://b.anny.co/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"locale": "<string>",
"title": "<string>",
"sex": 123,
"birth_date": "2023-12-25",
"given_name": "<string>",
"family_name": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"company": "<string>",
"custom_entry_map": {
"{custom_field_id}": {
"value": "<string>",
"formatted_value": "<string>",
"label": "<string>"
}
}
},
"relationships": {},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/customers"
payload = { "data": {
"type": "<string>",
"attributes": {
"locale": "<string>",
"title": "<string>",
"sex": 123,
"birth_date": "2023-12-25",
"given_name": "<string>",
"family_name": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"company": "<string>",
"custom_entry_map": { "{custom_field_id}": {
"value": "<string>",
"formatted_value": "<string>",
"label": "<string>"
} }
},
"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: '<string>',
attributes: {
locale: '<string>',
title: '<string>',
sex: 123,
birth_date: '2023-12-25',
given_name: '<string>',
family_name: '<string>',
email: 'jsmith@example.com',
mobile: '<string>',
company: '<string>',
custom_entry_map: {
'{custom_field_id}': {value: '<string>', formatted_value: '<string>', label: '<string>'}
}
},
relationships: {},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/customers', 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/customers",
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' => '<string>',
'attributes' => [
'locale' => '<string>',
'title' => '<string>',
'sex' => 123,
'birth_date' => '2023-12-25',
'given_name' => '<string>',
'family_name' => '<string>',
'email' => 'jsmith@example.com',
'mobile' => '<string>',
'company' => '<string>',
'custom_entry_map' => [
'{custom_field_id}' => [
'value' => '<string>',
'formatted_value' => '<string>',
'label' => '<string>'
]
]
],
'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/customers"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\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/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/customers")
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\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "customers",
"attributes": {
"uuid": "<string>",
"number": "<string>",
"locale": "<string>",
"title": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"full_name": "<string>",
"sex": "<string>",
"birth_date": "<string>",
"email": "<string>",
"email_status": "<string>",
"mobile": "<string>",
"phone": "<string>",
"company": "<string>",
"custom_entry_map": {},
"settings": {},
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"address": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"delivery_address": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"business": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"custom_entries": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"orders": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"model_identifiers": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"subscriptions": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"communities": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"community_invites": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"document_acceptances": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"files": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
}
},
"meta": {
"has_account": true,
"external_id": "<string>",
"idp_user_id": "<string>"
}
}
}Customer Management
Create a customer
POST
/
api
/
v1
/
customers
Create a customer
curl --request POST \
--url https://b.anny.co/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"locale": "<string>",
"title": "<string>",
"sex": 123,
"birth_date": "2023-12-25",
"given_name": "<string>",
"family_name": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"company": "<string>",
"custom_entry_map": {
"{custom_field_id}": {
"value": "<string>",
"formatted_value": "<string>",
"label": "<string>"
}
}
},
"relationships": {},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/customers"
payload = { "data": {
"type": "<string>",
"attributes": {
"locale": "<string>",
"title": "<string>",
"sex": 123,
"birth_date": "2023-12-25",
"given_name": "<string>",
"family_name": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"company": "<string>",
"custom_entry_map": { "{custom_field_id}": {
"value": "<string>",
"formatted_value": "<string>",
"label": "<string>"
} }
},
"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: '<string>',
attributes: {
locale: '<string>',
title: '<string>',
sex: 123,
birth_date: '2023-12-25',
given_name: '<string>',
family_name: '<string>',
email: 'jsmith@example.com',
mobile: '<string>',
company: '<string>',
custom_entry_map: {
'{custom_field_id}': {value: '<string>', formatted_value: '<string>', label: '<string>'}
}
},
relationships: {},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/customers', 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/customers",
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' => '<string>',
'attributes' => [
'locale' => '<string>',
'title' => '<string>',
'sex' => 123,
'birth_date' => '2023-12-25',
'given_name' => '<string>',
'family_name' => '<string>',
'email' => 'jsmith@example.com',
'mobile' => '<string>',
'company' => '<string>',
'custom_entry_map' => [
'{custom_field_id}' => [
'value' => '<string>',
'formatted_value' => '<string>',
'label' => '<string>'
]
]
],
'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/customers"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\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/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/customers")
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\": \"<string>\",\n \"attributes\": {\n \"locale\": \"<string>\",\n \"title\": \"<string>\",\n \"sex\": 123,\n \"birth_date\": \"2023-12-25\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"mobile\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_entry_map\": {\n \"{custom_field_id}\": {\n \"value\": \"<string>\",\n \"formatted_value\": \"<string>\",\n \"label\": \"<string>\"\n }\n }\n },\n \"relationships\": {},\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "customers",
"attributes": {
"uuid": "<string>",
"number": "<string>",
"locale": "<string>",
"title": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"full_name": "<string>",
"sex": "<string>",
"birth_date": "<string>",
"email": "<string>",
"email_status": "<string>",
"mobile": "<string>",
"phone": "<string>",
"company": "<string>",
"custom_entry_map": {},
"settings": {},
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"address": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"delivery_address": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"business": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"custom_entries": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"orders": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"model_identifiers": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"subscriptions": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"communities": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"community_invites": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"document_acceptances": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"files": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
}
},
"meta": {
"has_account": true,
"external_id": "<string>",
"idp_user_id": "<string>"
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Abfrageparameter
Organization ID
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
Created
A customer who makes bookings. Can be created by admins or through the booking flow.
Show child attributes
Show child attributes
⌘I