curl -X POST "https://api.playground.try.be/shop/session-types/abc123/copy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Vinyasa yoga",
"description": "A dynamic form of yoga",
"product_code": "MAS123",
"currency": "gbp",
"external_id": "ext-yoga-vinyasa",
"hidden_on_schedule": false,
"image_id": "00000000-0000-0000-0000-000000000000",
"image": {
"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"
},
"offered_online": false,
"private": false,
"site_id": "00000000-0000-0000-0000-000000000000",
"duration": 60,
"max_baskets_per_session": 1,
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D",
"customers_only": false,
"members_only": true,
"max_bookings_per_member": 1,
"permitted_membership_type_ids": [
"string"
],
"membership_booking_windows_enabled": true,
"membership_booking_windows": [
{
"membership_type_id": "00000000-0000-0000-0000-000000000000",
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D"
}
],
"customer_cancellation_permitted": "allowed",
"customer_cancellation_min_duration": "P7D",
"waitlist_enabled": true,
"min_guests": 1,
"max_guests": 2,
"max_per_basket": 4,
"max_per_guest": 2,
"price_rules": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"date_from": "2020-02-01",
"date_to": "2020-04-01",
"weekdays": [
"monday"
],
"time_from": "16:00",
"time_to": "17:00",
"price": 1500
}
],
"category_ids": [
"string"
],
"categories": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Massages"
}
],
"recurrence_groups": [
{
"capacity": 12,
"deleted_at": "2026-01-15T09:30:00+00:00",
"id": "609bd745e4358066f7061d82",
"name": "Mondays with Adrienne",
"practitioner": {
"id": "5dcb47800000000000000000",
"name": "Jane Doe"
},
"recurrence_end": "2021-05-10",
"recurrence_start": "2021-04-10",
"room": {
"id": "5dcb47800000000000000000",
"capacity": 1,
"name": "Alex Morgan"
},
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"start_time": "16:00",
"start_times": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"value": "16:00"
}
],
"weekdays": [
"monday"
]
}
],
"meta": {
"title": "string",
"description": "Free-form text from the resource."
},
"upsell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"cross_sell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"related_retail_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"revenue_centre": "spa",
"include_pricing_on_calendar": false,
"visibility": "public",
"updated_at": "2020-02-24T12:00:00+01:00",
"deleted_at": "2020-02-24T12:00:00+01:00"
}'
const response = await fetch('https://api.playground.try.be/shop/session-types/abc123/copy', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Vinyasa yoga",
"description": "A dynamic form of yoga",
"product_code": "MAS123",
"currency": "gbp",
"external_id": "ext-yoga-vinyasa",
"hidden_on_schedule": false,
"image_id": "00000000-0000-0000-0000-000000000000",
"image": {
"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"
},
"offered_online": false,
"private": false,
"site_id": "00000000-0000-0000-0000-000000000000",
"duration": 60,
"max_baskets_per_session": 1,
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D",
"customers_only": false,
"members_only": true,
"max_bookings_per_member": 1,
"permitted_membership_type_ids": [
"string"
],
"membership_booking_windows_enabled": true,
"membership_booking_windows": [
{
"membership_type_id": "00000000-0000-0000-0000-000000000000",
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D"
}
],
"customer_cancellation_permitted": "allowed",
"customer_cancellation_min_duration": "P7D",
"waitlist_enabled": true,
"min_guests": 1,
"max_guests": 2,
"max_per_basket": 4,
"max_per_guest": 2,
"price_rules": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"date_from": "2020-02-01",
"date_to": "2020-04-01",
"weekdays": [
"monday"
],
"time_from": "16:00",
"time_to": "17:00",
"price": 1500
}
],
"category_ids": [
"string"
],
"categories": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Massages"
}
],
"recurrence_groups": [
{
"capacity": 12,
"deleted_at": "2026-01-15T09:30:00+00:00",
"id": "609bd745e4358066f7061d82",
"name": "Mondays with Adrienne",
"practitioner": {
"id": "5dcb47800000000000000000",
"name": "Jane Doe"
},
"recurrence_end": "2021-05-10",
"recurrence_start": "2021-04-10",
"room": {
"id": "5dcb47800000000000000000",
"capacity": 1,
"name": "Alex Morgan"
},
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"start_time": "16:00",
"start_times": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"value": "16:00"
}
],
"weekdays": [
"monday"
]
}
],
"meta": {
"title": "string",
"description": "Free-form text from the resource."
},
"upsell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"cross_sell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"related_retail_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"revenue_centre": "spa",
"include_pricing_on_calendar": false,
"visibility": "public",
"updated_at": "2020-02-24T12:00:00+01:00",
"deleted_at": "2020-02-24T12: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/session-types/abc123/copy",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Vinyasa yoga",
"description": "A dynamic form of yoga",
"product_code": "MAS123",
"currency": "gbp",
"external_id": "ext-yoga-vinyasa",
"hidden_on_schedule": False,
"image_id": "00000000-0000-0000-0000-000000000000",
"image": {
"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"
},
"offered_online": False,
"private": False,
"site_id": "00000000-0000-0000-0000-000000000000",
"duration": 60,
"max_baskets_per_session": 1,
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D",
"customers_only": False,
"members_only": True,
"max_bookings_per_member": 1,
"permitted_membership_type_ids": [
"string"
],
"membership_booking_windows_enabled": True,
"membership_booking_windows": [
{
"membership_type_id": "00000000-0000-0000-0000-000000000000",
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D"
}
],
"customer_cancellation_permitted": "allowed",
"customer_cancellation_min_duration": "P7D",
"waitlist_enabled": True,
"min_guests": 1,
"max_guests": 2,
"max_per_basket": 4,
"max_per_guest": 2,
"price_rules": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"date_from": "2020-02-01",
"date_to": "2020-04-01",
"weekdays": [
"monday"
],
"time_from": "16:00",
"time_to": "17:00",
"price": 1500
}
],
"category_ids": [
"string"
],
"categories": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Massages"
}
],
"recurrence_groups": [
{
"capacity": 12,
"deleted_at": "2026-01-15T09:30:00+00:00",
"id": "609bd745e4358066f7061d82",
"name": "Mondays with Adrienne",
"practitioner": {
"id": "5dcb47800000000000000000",
"name": "Jane Doe"
},
"recurrence_end": "2021-05-10",
"recurrence_start": "2021-04-10",
"room": {
"id": "5dcb47800000000000000000",
"capacity": 1,
"name": "Alex Morgan"
},
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"start_time": "16:00",
"start_times": [
{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"value": "16:00"
}
],
"weekdays": [
"monday"
]
}
],
"meta": {
"title": "string",
"description": "Free-form text from the resource."
},
"upsell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"cross_sell_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"related_retail_offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"revenue_centre": "spa",
"include_pricing_on_calendar": False,
"visibility": "public",
"updated_at": "2020-02-24T12:00:00+01:00",
"deleted_at": "2020-02-24T12: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/session-types/abc123/copy', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'name' => 'Vinyasa yoga',
'description' => 'A dynamic form of yoga',
'product_code' => 'MAS123',
'currency' => 'gbp',
'external_id' => 'ext-yoga-vinyasa',
'hidden_on_schedule' => false,
'image_id' => '00000000-0000-0000-0000-000000000000',
'image' => [
'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'
],
'offered_online' => false,
'private' => false,
'site_id' => '00000000-0000-0000-0000-000000000000',
'duration' => 60,
'max_baskets_per_session' => 1,
'max_advance_bookings_interval' => 'P2W',
'min_advance_bookings_interval' => 'P2D',
'customers_only' => false,
'members_only' => true,
'max_bookings_per_member' => 1,
'permitted_membership_type_ids' => [
'string'
],
'membership_booking_windows_enabled' => true,
'membership_booking_windows' => [
[
'membership_type_id' => '00000000-0000-0000-0000-000000000000',
'max_advance_bookings_interval' => 'P2W',
'min_advance_bookings_interval' => 'P2D'
]
],
'customer_cancellation_permitted' => 'allowed',
'customer_cancellation_min_duration' => 'P7D',
'waitlist_enabled' => true,
'min_guests' => 1,
'max_guests' => 2,
'max_per_basket' => 4,
'max_per_guest' => 2,
'price_rules' => [
[
'id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'session_type_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'date_from' => '2020-02-01',
'date_to' => '2020-04-01',
'weekdays' => [
'monday'
],
'time_from' => '16:00',
'time_to' => '17:00',
'price' => 1500
]
],
'category_ids' => [
'string'
],
'categories' => [
[
'id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'name' => 'Massages'
]
],
'recurrence_groups' => [
[
'capacity' => 12,
'deleted_at' => '2026-01-15T09:30:00+00:00',
'id' => '609bd745e4358066f7061d82',
'name' => 'Mondays with Adrienne',
'practitioner' => [
'id' => '5dcb47800000000000000000',
'name' => 'Jane Doe'
],
'recurrence_end' => '2021-05-10',
'recurrence_start' => '2021-04-10',
'room' => [
'id' => '5dcb47800000000000000000',
'capacity' => 1,
'name' => 'Alex Morgan'
],
'session_type_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'start_time' => '16:00',
'start_times' => [
[
'id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'value' => '16:00'
]
],
'weekdays' => [
'monday'
]
]
],
'meta' => [
'title' => 'string',
'description' => 'Free-form text from the resource.'
],
'upsell_offerings' => [
[
'offering_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'offering_name' => 'Twilight massage',
'offering_type' => 'appointment'
]
],
'cross_sell_offerings' => [
[
'offering_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'offering_name' => 'Twilight massage',
'offering_type' => 'appointment'
]
],
'related_retail_offerings' => [
[
'offering_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'offering_name' => 'Twilight massage',
'offering_type' => 'appointment'
]
],
'revenue_centre' => 'spa',
'include_pricing_on_calendar' => false,
'visibility' => 'public',
'updated_at' => '2020-02-24T12:00:00+01:00',
'deleted_at' => '2020-02-24T12: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": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Vinyasa yoga",
"description": "A dynamic form of yoga",
"product_code": "MAS123",
"currency": "gbp",
"external_id": "ext-yoga-vinyasa",
"hidden_on_schedule": false,
"image_id": "00000000-0000-0000-0000-000000000000",
"image": 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",
},
"offered_online": false,
"private": false,
"site_id": "00000000-0000-0000-0000-000000000000",
"duration": 60,
"max_baskets_per_session": 1,
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D",
"customers_only": false,
"members_only": true,
"max_bookings_per_member": 1,
"permitted_membership_type_ids": []interface{}{
"string",
},
"membership_booking_windows_enabled": true,
"membership_booking_windows": []interface{}{
map[string]interface{}{
"membership_type_id": "00000000-0000-0000-0000-000000000000",
"max_advance_bookings_interval": "P2W",
"min_advance_bookings_interval": "P2D",
},
},
"customer_cancellation_permitted": "allowed",
"customer_cancellation_min_duration": "P7D",
"waitlist_enabled": true,
"min_guests": 1,
"max_guests": 2,
"max_per_basket": 4,
"max_per_guest": 2,
"price_rules": []interface{}{
map[string]interface{}{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"date_from": "2020-02-01",
"date_to": "2020-04-01",
"weekdays": []interface{}{
"monday",
},
"time_from": "16:00",
"time_to": "17:00",
"price": 1500,
},
},
"category_ids": []interface{}{
"string",
},
"categories": []interface{}{
map[string]interface{}{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"name": "Massages",
},
},
"recurrence_groups": []interface{}{
map[string]interface{}{
"capacity": 12,
"deleted_at": "2026-01-15T09:30:00+00:00",
"id": "609bd745e4358066f7061d82",
"name": "Mondays with Adrienne",
"practitioner": map[string]interface{}{
"id": "5dcb47800000000000000000",
"name": "Jane Doe",
},
"recurrence_end": "2021-05-10",
"recurrence_start": "2021-04-10",
"room": map[string]interface{}{
"id": "5dcb47800000000000000000",
"capacity": 1,
"name": "Alex Morgan",
},
"session_type_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"start_time": "16:00",
"start_times": []interface{}{
map[string]interface{}{
"id": "64a9f3b2c3d8e1f4a5b6c7d8",
"value": "16:00",
},
},
"weekdays": []interface{}{
"monday",
},
},
},
"meta": map[string]interface{}{
"title": "string",
"description": "Free-form text from the resource.",
},
"upsell_offerings": []interface{}{
map[string]interface{}{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment",
},
},
"cross_sell_offerings": []interface{}{
map[string]interface{}{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment",
},
},
"related_retail_offerings": []interface{}{
map[string]interface{}{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment",
},
},
"revenue_centre": "spa",
"include_pricing_on_calendar": false,
"visibility": "public",
"updated_at": "2020-02-24T12:00:00+01:00",
"deleted_at": "2020-02-24T12:00:00+01:00",
})
req, _ := http.NewRequest("POST", "https://api.playground.try.be/shop/session-types/abc123/copy", 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)
}