Bookings
The account's space bookings from 30 days ago on, soonest first: a business's spaces' bookings, or the trainer's own.
A business sees who booked; a trainer sees whose space it is. The API never sends a phone number.
Request
curl "https://api.dev.repp.co.il/v1/bookings?side=business" \
-H "Authorization: Bearer $REPP_API_KEY"const response = await fetch("https://api.dev.repp.co.il/v1/bookings?side=business", {
headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();/** The account's space bookings. */
interface Bookings {
items: Booking[];
}
/** A space booking. */
interface Booking {
id: string;
space: {
id: string;
name: string;
};
business_name: string;
trainer_name: string | null;
date: string;
start_time: string;
end_time: string;
weekly: boolean;
status: "pending" | "confirmed" | "declined" | "cancelled";
amount: number;
created_at: string;
}
interface ApiError {
error: { code: string; message: string; reason?: string };
}
const response = await fetch("https://api.dev.repp.co.il/v1/bookings?side=business", {
headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message);
const data = (await response.json()) as Bookings;import os
import requests
response = requests.get(
"https://api.dev.repp.co.il/v1/bookings?side=business",
headers={"Authorization": f"Bearer {os.environ['REPP_API_KEY']}"},
timeout=30,
)
if not response.ok:
raise RuntimeError(response.json()["error"]["message"])
data = response.json()<?php
$ch = curl_init("https://api.dev.repp.co.il/v1/bookings?side=business");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("REPP_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["error"]["message"]);
}Response
200 · application/json
{
"items": [
{
"id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"space": {
"id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"name": "מתחם הקומה השנייה"
},
"business_name": "סטודיו נועה",
"trainer_name": "יוסי לוי",
"date": "2026-12-02",
"start_time": "11:00",
"end_time": "13:00",
"weekly": true,
"status": "pending",
"amount": 180,
"created_at": "2026-11-28T19:20:00+00:00"
}
]
}| Name | Type | Default | Description |
|---|---|---|---|
sideRequired | one of: business, trainer | — | Which side of the account: business or trainer. |
Response fields (14)
| Field | Type | Description |
|---|---|---|
items | array of Booking | From 30 days ago on, soonest first. |
items[].id | string | Identifier. |
items[].space | object | The space. |
items[].space.id | string | Identifier. |
items[].space.name | string | The space's name. |
items[].business_name | string | The business whose space it is. |
items[].trainer_name | string, nullable | The trainer who booked (for a business), or null. |
items[].date | string | A date in Israel, YYYY-MM-DD. |
items[].start_time | string | A time of day in Israel, HH:MM, 24 hours. |
items[].end_time | string | A time of day in Israel, HH:MM, 24 hours. |
items[].weekly | boolean | Part of a weekly booking: the same hour every week. |
items[].status | one of: pending, confirmed, declined, cancelled | pending: waits for the business's yes. confirmed. declined: the business said no or it ran out. cancelled. |
items[].amount | integer | The rent for these hours, in whole shekels. |
items[].created_at | string | An exact moment, ISO 8601 with its offset. |
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_parameter | A parameter is not one the endpoint accepts. The message names it. |
| 401 | missing_key | The endpoint needs a key and no Authorization header came. |
| 401 | bad_key | The key is not one of ours, was revoked, or its account was closed or blocked. |
| 403 | not_a_business | The endpoint is for businesses and the key's account has none. |
| 403 | not_a_trainer | The endpoint is for trainers and the key's account has no trainer profile. |
| 429 | too_many_requests | Over the rate limit. Wait the seconds in Retry-After (60) and go on. |
| 500 | server_error | Something failed on our side. Try again shortly. |