Skip to content
ReppREST reference · v2

Actions

A few endpoints change something, as the same step on the site would; none moves money, but declining a space request refunds the trainer by the site's rules. They need a read-and-actions key, take an Idempotency-Key, and are limited to 30 a minute and 200 a day per key.

An action does exactly what the same step does on the site, under the site's own rules: the account sees it there, and the other side is notified as if it was done on the site. Each one is marked Changes something in its section.

Actions
EndpointWhat it doesMCP tool
PUT /v1/me/looking-for-workLooking for workset_looking_for_work
POST /v1/open-classes/{id}/offerOffer on a classoffer_on_class
DELETE /v1/open-classes/{id}/offerTake an offer backwithdraw_offer
POST /v1/requestsPost a requestpost_request
POST /v1/bookings/{id}/decisionAnswer a space requestdecide_booking
POST /v1/ratingsRaterate

No action moves money, with one exception. No key can pay, book a space, choose an offer, cancel or charge a card: those stay on the site. The exception: declining a space request refunds the trainer by the site's rules, as declining it on the site does.

Who may act

Only a read-and-actions key (see Authentication), or an app signed in with repp.write. Any other key gets 403 read_only_key (over MCP, the spec's 403 insufficient_scope). An action for a business with a key whose account has no business gets 403 not_a_business, and one for a trainer 403 not_a_trainer.

Sending it once: Idempotency-Key

  • Send an Idempotency-Key header with every action: any text up to 200 characters, a new one per action (a UUID is good).
  • A repeat gets the first answer: if the network drops and you send the same action with the same key again, it is done once and you get what the first one answered.
  • The same key with a different action (another endpoint) answers 409 idempotency_conflict, and nothing is done.
  • On the same endpoint the first answer comes back whatever the body: never reuse a key for a new action.
  • A key is remembered per API key. Without the header every request is a new action.
Example: Looking for work
IDEMPOTENCY_KEY=$(uuidgen)  # send the same one again to retry this action
curl -X PUT "https://api.dev.repp.co.il/v1/me/looking-for-work" \
  -H "Authorization: Bearer $REPP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "on": true
}'

Limits

30 actions a minute per key (429 too_many_requests, Retry-After: 60) and 200 a day (429 too_many_actions; reads go on). Actions count toward the key's 120 requests a minute too. See Rate limits.

When the site says no

An action the site's rules refuse answers 409 action_refused, with the site's own refusal in reason - a fixed snake_case word such as class_not_available, already_offered or booking_not_available. Branch on reason; the message is for people.

Refused action
{
  "error": {
    "code": "action_refused",
    "message": "האתר לא אישר את הפעולה. הסיבה כתובה ב-reason.",
    "reason": "class_not_available"
  }
}
Errors of actions
StatusCodeMeaning
403read_only_keyThe key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write).
400bad_bodyThe request body is not a JSON object (or a field in it is missing or malformed). The message names it.
409action_refusedThe site's own rules refused the action; reason says which (for example class_not_available, already_offered, booking_not_available).
409idempotency_conflictThe Idempotency-Key was already used by this key for a different action.
429too_many_actionsThe key ran 200 actions in the last 24 hours. Reads still work.