curl -X POST "https://api.playground.try.be/shop/commission-packages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Senior Therapist Package",
"requested_surcharge_percentage": 5,
"rates": [
{
"name": "Standard rate",
"percentage": 10,
"calculation_basis": "before_discount",
"offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"offering_set_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"threshold_amount": 100000,
"valid_from": "2026-01-15",
"valid_to": "2026-01-15"
}
]
}'
const response = await fetch('https://api.playground.try.be/shop/commission-packages', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"name": "Senior Therapist Package",
"requested_surcharge_percentage": 5,
"rates": [
{
"name": "Standard rate",
"percentage": 10,
"calculation_basis": "before_discount",
"offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"offering_set_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"threshold_amount": 100000,
"valid_from": "2026-01-15",
"valid_to": "2026-01-15"
}
]
}),
})
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/commission-packages",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"name": "Senior Therapist Package",
"requested_surcharge_percentage": 5,
"rates": [
{
"name": "Standard rate",
"percentage": 10,
"calculation_basis": "before_discount",
"offerings": [
{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"offering_set_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"threshold_amount": 100000,
"valid_from": "2026-01-15",
"valid_to": "2026-01-15"
}
]
},
)
response.raise_for_status()
data = response.json()
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.playground.try.be/shop/commission-packages', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'Senior Therapist Package',
'requested_surcharge_percentage' => 5,
'rates' => [
[
'name' => 'Standard rate',
'percentage' => 10,
'calculation_basis' => 'before_discount',
'offerings' => [
[
'offering_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'offering_name' => 'Twilight massage',
'offering_type' => 'appointment'
]
],
'offering_set_ids' => [
'64a9f3b2c3d8e1f4a5b6c7d8'
],
'threshold_amount' => 100000,
'valid_from' => '2026-01-15',
'valid_to' => '2026-01-15'
]
]
],
]);
$data = json_decode($response->getBody(), true);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"name": "Senior Therapist Package",
"requested_surcharge_percentage": 5,
"rates": []interface{}{
map[string]interface{}{
"name": "Standard rate",
"percentage": 10,
"calculation_basis": "before_discount",
"offerings": []interface{}{
map[string]interface{}{
"offering_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"offering_name": "Twilight massage",
"offering_type": "appointment",
},
},
"offering_set_ids": []interface{}{
"64a9f3b2c3d8e1f4a5b6c7d8",
},
"threshold_amount": 100000,
"valid_from": "2026-01-15",
"valid_to": "2026-01-15",
},
},
})
req, _ := http.NewRequest("POST", "https://api.playground.try.be/shop/commission-packages", 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)
}