curl -X POST "https://api.playground.try.be/shop/shop/practitioners" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"id": "5dcb47800000000000000000",
"appointment_restrictions": [
{
"id": "5dcb47800000000000000011",
"applies_to_type": "specific",
"appointment_type_ids": [
"5dcb47800000000000000010"
],
"appointment_types": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"categories": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"category_ids": [
"5dcb47800000000000000010"
],
"date_from": "2020-06-20",
"date_to": "2020-06-20",
"max_duration": 180,
"occupied_mins": 60,
"type": "cannot_offer"
}
],
"avatar": {
"id": "00000000-0000-0000-0000-000000000000",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"original_url": "https://example.com/media/super-cool-photo.jpg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
},
"can_offer_tags": [
"string"
],
"gender": "female",
"name": "Jane Doe",
"organisation_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"site_ids": [
"00000000-0000-0000-0000-000000000000"
],
"tag_ids": [
"string"
],
"tags": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
"organisation_id": "00000000-0000-0000-0000-000000000000"
}
],
"zones": [
{
"id": "5f1234567890abcdef123456",
"name": "Pool Deck",
"organisation_id": "22222222-2222-2222-2222-222222222222",
"site_id": "11111111-1111-1111-1111-111111111111"
}
],
"user_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"created_at": "2025-02-04T12:00:00+01:00",
"updated_at": "2025-02-04T12:00:00+01:00"
}'
const response = await fetch('https://api.playground.try.be/shop/shop/practitioners', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"id": "5dcb47800000000000000000",
"appointment_restrictions": [
{
"id": "5dcb47800000000000000011",
"applies_to_type": "specific",
"appointment_type_ids": [
"5dcb47800000000000000010"
],
"appointment_types": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"categories": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"category_ids": [
"5dcb47800000000000000010"
],
"date_from": "2020-06-20",
"date_to": "2020-06-20",
"max_duration": 180,
"occupied_mins": 60,
"type": "cannot_offer"
}
],
"avatar": {
"id": "00000000-0000-0000-0000-000000000000",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"original_url": "https://example.com/media/super-cool-photo.jpg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
},
"can_offer_tags": [
"string"
],
"gender": "female",
"name": "Jane Doe",
"organisation_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"site_ids": [
"00000000-0000-0000-0000-000000000000"
],
"tag_ids": [
"string"
],
"tags": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
"organisation_id": "00000000-0000-0000-0000-000000000000"
}
],
"zones": [
{
"id": "5f1234567890abcdef123456",
"name": "Pool Deck",
"organisation_id": "22222222-2222-2222-2222-222222222222",
"site_id": "11111111-1111-1111-1111-111111111111"
}
],
"user_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"created_at": "2025-02-04T12:00:00+01:00",
"updated_at": "2025-02-04T12:00:00+01:00"
}),
})
if (!response.ok) {
throw new Error(`Trybe API ${response.status}: ${await response.text()}`)
}
const data = await response.json()
import httpx
response = httpx.post(
"https://api.playground.try.be/shop/shop/practitioners",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"id": "5dcb47800000000000000000",
"appointment_restrictions": [
{
"id": "5dcb47800000000000000011",
"applies_to_type": "specific",
"appointment_type_ids": [
"5dcb47800000000000000010"
],
"appointment_types": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"categories": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan"
}
],
"category_ids": [
"5dcb47800000000000000010"
],
"date_from": "2020-06-20",
"date_to": "2020-06-20",
"max_duration": 180,
"occupied_mins": 60,
"type": "cannot_offer"
}
],
"avatar": {
"id": "00000000-0000-0000-0000-000000000000",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"original_url": "https://example.com/media/super-cool-photo.jpg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
},
"can_offer_tags": [
"string"
],
"gender": "female",
"name": "Jane Doe",
"organisation_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"site_ids": [
"00000000-0000-0000-0000-000000000000"
],
"tag_ids": [
"string"
],
"tags": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
"organisation_id": "00000000-0000-0000-0000-000000000000"
}
],
"zones": [
{
"id": "5f1234567890abcdef123456",
"name": "Pool Deck",
"organisation_id": "22222222-2222-2222-2222-222222222222",
"site_id": "11111111-1111-1111-1111-111111111111"
}
],
"user_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"created_at": "2025-02-04T12:00:00+01:00",
"updated_at": "2025-02-04T12:00:00+01:00"
},
)
response.raise_for_status()
data = response.json()
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.playground.try.be/shop/shop/practitioners', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'id' => '5dcb47800000000000000000',
'appointment_restrictions' => [
[
'id' => '5dcb47800000000000000011',
'applies_to_type' => 'specific',
'appointment_type_ids' => [
'5dcb47800000000000000010'
],
'appointment_types' => [
[
'id' => '00000000-0000-0000-0000-000000000000',
'name' => 'Alex Morgan'
]
],
'categories' => [
[
'id' => '00000000-0000-0000-0000-000000000000',
'name' => 'Alex Morgan'
]
],
'category_ids' => [
'5dcb47800000000000000010'
],
'date_from' => '2020-06-20',
'date_to' => '2020-06-20',
'max_duration' => 180,
'occupied_mins' => 60,
'type' => 'cannot_offer'
]
],
'avatar' => [
'id' => '00000000-0000-0000-0000-000000000000',
'file_name' => 'super-cool-photo.jpg',
'mime_type' => 'image/jpeg',
'original_url' => 'https://example.com/media/super-cool-photo.jpg',
'size' => 84256,
'url' => 'https://example.com/media/super-cool-photo-thumbnail@2x.jpg'
],
'can_offer_tags' => [
'string'
],
'gender' => 'female',
'name' => 'Jane Doe',
'organisation_id' => '5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d',
'site_ids' => [
'00000000-0000-0000-0000-000000000000'
],
'tag_ids' => [
'string'
],
'tags' => [
[
'id' => '00000000-0000-0000-0000-000000000000',
'name' => 'Alex Morgan',
'organisation_id' => '00000000-0000-0000-0000-000000000000'
]
],
'zones' => [
[
'id' => '5f1234567890abcdef123456',
'name' => 'Pool Deck',
'organisation_id' => '22222222-2222-2222-2222-222222222222',
'site_id' => '11111111-1111-1111-1111-111111111111'
]
],
'user_id' => '5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d',
'created_at' => '2025-02-04T12:00:00+01:00',
'updated_at' => '2025-02-04T12:00:00+01:00'
],
]);
$data = json_decode($response->getBody(), true);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"id": "5dcb47800000000000000000",
"appointment_restrictions": []interface{}{
map[string]interface{}{
"id": "5dcb47800000000000000011",
"applies_to_type": "specific",
"appointment_type_ids": []interface{}{
"5dcb47800000000000000010",
},
"appointment_types": []interface{}{
map[string]interface{}{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
},
},
"categories": []interface{}{
map[string]interface{}{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
},
},
"category_ids": []interface{}{
"5dcb47800000000000000010",
},
"date_from": "2020-06-20",
"date_to": "2020-06-20",
"max_duration": 180,
"occupied_mins": 60,
"type": "cannot_offer",
},
},
"avatar": map[string]interface{}{
"id": "00000000-0000-0000-0000-000000000000",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"original_url": "https://example.com/media/super-cool-photo.jpg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg",
},
"can_offer_tags": []interface{}{
"string",
},
"gender": "female",
"name": "Jane Doe",
"organisation_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"site_ids": []interface{}{
"00000000-0000-0000-0000-000000000000",
},
"tag_ids": []interface{}{
"string",
},
"tags": []interface{}{
map[string]interface{}{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Alex Morgan",
"organisation_id": "00000000-0000-0000-0000-000000000000",
},
},
"zones": []interface{}{
map[string]interface{}{
"id": "5f1234567890abcdef123456",
"name": "Pool Deck",
"organisation_id": "22222222-2222-2222-2222-222222222222",
"site_id": "11111111-1111-1111-1111-111111111111",
},
},
"user_id": "5f8a1b2c-9d3e-4a5b-8c6d-7e8f9a0b1c2d",
"created_at": "2025-02-04T12:00:00+01:00",
"updated_at": "2025-02-04T12:00:00+01:00",
})
req, _ := http.NewRequest("POST", "https://api.playground.try.be/shop/shop/practitioners", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
}