> Documentation index: https://docs.dev.repp.co.il/llms.txt - fetch it to find every page of these docs.

# What waits for me

What waits for the account's own action, as the site's calendar page ("יומן") lists it: offers to choose from, space requests to answer, classes to rate.

- `GET https://api.dev.repp.co.il/v1/waiting`
- Needs a key: `Authorization: Bearer repp_…`.

Either side may be `null`: an account can be a business, a trainer, or both. Some of what waits is done only on the site, because it pays (choosing an offer) or needs a person (answering a no-show report); what an action of this API can do says so in its field.

Polling it is not a visit: it never keeps a trainer's "looking for work" switch on.

## Request

**cURL**

```bash
curl "https://api.dev.repp.co.il/v1/waiting" \
  -H "Authorization: Bearer $REPP_API_KEY"
```

**JavaScript**

```js
const response = await fetch("https://api.dev.repp.co.il/v1/waiting", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();
```

**TypeScript**

```ts
/** What waits for the account's own action, as the site's "יומן" lists it. */
interface Waiting {
  business: {
    choose_offers: {
      class_id: string;
      style: Style;
      date: string;
      time: string;
      offers_waiting: number;
    }[];
    send_again: {
      class_id: string;
      style: Style;
      date: string;
      time: string;
    }[];
    bookings_to_answer: {
      booking_id: string;
      space: {
        id: string;
        name: string;
      };
      trainer_name: string | null;
      date: string;
      start_time: string;
      end_time: string;
      weekly: boolean;
    }[];
    classes_to_rate: {
      class_id: string;
      style: Style;
      date: string;
    }[];
  } | null;
  trainer: {
    classes_to_rate: {
      class_id: string;
      style: Style;
      date: string;
    }[];
    reports_to_answer: {
      class_id: string;
      reported_at: string;
    }[];
    offers_waiting: number;
    upcoming_classes: number;
  } | null;
}

/** A training style: one of the keys in Catalog. */
type Style =
  | "pilates"
  | "barre"
  | "strength"
  | "crossfit"
  | "trx"
  | "calisthenics"
  | "cardio"
  | "hiit"
  | "spinning"
  | "running"
  | "aqua"
  | "yoga"
  | "mobility"
  | "meditation"
  | "personal"
  | "martial_arts"
  | "boxing"
  | "krav_maga"
  | "dance"
  | "zumba"
  | "kids"
  | "seniors"
  | "other";

interface ApiError {
  error: { code: string; message: string; reason?: string };
}

const response = await fetch("https://api.dev.repp.co.il/v1/waiting", {
  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 Waiting;
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://api.dev.repp.co.il/v1/waiting",
    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**

```php
<?php
$ch = curl_init("https://api.dev.repp.co.il/v1/waiting");
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)

```json
{
  "business": {
    "choose_offers": [
      {
        "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b",
        "style": "yoga",
        "date": "2026-12-01",
        "time": "18:00",
        "offers_waiting": 2
      }
    ],
    "send_again": [],
    "bookings_to_answer": [
      {
        "booking_id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
        "space": {
          "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
          "name": "מתחם הקומה השנייה"
        },
        "trainer_name": "יוסי לוי",
        "date": "2026-12-02",
        "start_time": "11:00",
        "end_time": "13:00",
        "weekly": true
      }
    ],
    "classes_to_rate": [
      {
        "class_id": "a7b8c9d0-e1f2-4a3b-8c4d-5e6f7a8b9c0d",
        "style": "pilates",
        "date": "2026-11-27"
      }
    ]
  },
  "trainer": null
}
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `business` | object, nullable | What waits for the business, or null when the account has none. |
| `business.choose_offers` | array of object | Requests ahead with offers to choose from (choosing pays, so it is done on the site). |
| `business.choose_offers[].class_id` | string | Identifier. |
| `business.choose_offers[].style` | one of: pilates, barre, strength, crossfit, trx, calisthenics, cardio, hiit, spinning, running, aqua, yoga, mobility, meditation, personal, martial_arts, boxing, krav_maga, dance, zumba, kids, seniors, other | A training style: one of the keys in Catalog. |
| `business.choose_offers[].date` | string | A date in Israel, YYYY-MM-DD. |
| `business.choose_offers[].time` | string | A time of day in Israel, HH:MM, 24 hours. |
| `business.choose_offers[].offers_waiting` | integer | How many offers wait for your choice. |
| `business.send_again` | array of object | Requests whose invitation to one trainer was declined or ran out: open them to everyone or invite another, on the site. |
| `business.send_again[].class_id` | string | Identifier. |
| `business.send_again[].style` | one of: pilates, barre, strength, crossfit, trx, calisthenics, cardio, hiit, spinning, running, aqua, yoga, mobility, meditation, personal, martial_arts, boxing, krav_maga, dance, zumba, kids, seniors, other | A training style: one of the keys in Catalog. |
| `business.send_again[].date` | string | A date in Israel, YYYY-MM-DD. |
| `business.send_again[].time` | string | A time of day in Israel, HH:MM, 24 hours. |
| `business.bookings_to_answer` | array of object | Space requests waiting for your yes: answer with POST /v1/bookings/{id}/decision. |
| `business.bookings_to_answer[].booking_id` | string | Identifier. |
| `business.bookings_to_answer[].space` | object | The space. |
| `business.bookings_to_answer[].trainer_name` | string, nullable | The trainer who asked. |
| `business.bookings_to_answer[].date` | string | A date in Israel, YYYY-MM-DD. |
| `business.bookings_to_answer[].start_time` | string | A time of day in Israel, HH:MM, 24 hours. |
| `business.bookings_to_answer[].end_time` | string | A time of day in Israel, HH:MM, 24 hours. |
| `business.bookings_to_answer[].weekly` | boolean | A weekly booking. |
| `business.classes_to_rate` | array of object | Classes of the last 7 days waiting for your stars: POST /v1/ratings. |
| `business.classes_to_rate[].class_id` | string | Identifier. |
| `business.classes_to_rate[].style` | one of: pilates, barre, strength, crossfit, trx, calisthenics, cardio, hiit, spinning, running, aqua, yoga, mobility, meditation, personal, martial_arts, boxing, krav_maga, dance, zumba, kids, seniors, other | A training style: one of the keys in Catalog. |
| `business.classes_to_rate[].date` | string | A date in Israel, YYYY-MM-DD. |
| `trainer` | object, nullable | What waits for the trainer, or null when the account has no trainer profile. |
| `trainer.classes_to_rate` | array of object | Classes of the last 7 days waiting for your stars: POST /v1/ratings. |
| `trainer.classes_to_rate[].class_id` | string | Identifier. |
| `trainer.classes_to_rate[].style` | one of: pilates, barre, strength, crossfit, trx, calisthenics, cardio, hiit, spinning, running, aqua, yoga, mobility, meditation, personal, martial_arts, boxing, krav_maga, dance, zumba, kids, seniors, other | A training style: one of the keys in Catalog. |
| `trainer.classes_to_rate[].date` | string | A date in Israel, YYYY-MM-DD. |
| `trainer.reports_to_answer` | array of object | A business reported you did not come: answer on the site. |
| `trainer.reports_to_answer[].class_id` | string | Identifier. |
| `trainer.reports_to_answer[].reported_at` | string | An exact moment, ISO 8601 with its offset. |
| `trainer.offers_waiting` | integer | Your offers still waiting for a business's choice (nothing to do). |
| `trainer.upcoming_classes` | integer | Classes ahead you were chosen for (nothing to do). |

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 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. |
| 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. |
