Skip to content
ReppREST reference · v2

Answer a space request

Approves or declines a trainer's request to book one of the business's spaces. It charges nothing; a decline returns the trainer's payment by the site's own rules.

This is the one action that moves money: a decline refunds the trainer exactly as declining it on the site does. action_refused with booking_not_available when the request is no longer waiting (answered, ran out after 24 hours, or its hour came).

Needs a key made as read and actions on the site; a read-only key gets 403 read_only_key. An AI app's sign-in acts through the MCP server only, never here. Send an Idempotency-Key header: the same key sent again does nothing and answers the first result.

Changes something · needs a read-and-actions key

POSThttps://api.dev.repp.co.il/v1/bookings/{id}/decisionKey

Request

IDEMPOTENCY_KEY=$(uuidgen)  # send the same one again to retry this action
curl -X POST "https://api.dev.repp.co.il/v1/bookings/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f/decision" \
  -H "Authorization: Bearer $REPP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "approve": true
}'

Response

200 · application/json
{
  "booking_id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
  "status": "confirmed"
}
Path parameters
NameTypeDefaultDescription
idRequireduuid—The booking's id.
Request body
NameTypeDefaultDescription
approveRequiredboolean—true to approve, false to decline.
Response fields (2)
Response fields
FieldTypeDescription
booking_idstringIdentifier.
statusone of: confirmed, declinedconfirmed: you approved it. declined: you declined it, and the trainer's money went back by the site's rules.
Errors
StatusCodeMeaning
400bad_bodyThe request body is not a JSON object (or a field in it is missing or malformed). The message names it.
401missing_keyThe endpoint needs a key and no Authorization header came.
401bad_keyThe key is not one of ours, was revoked, or its account was closed or blocked.
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).
403not_a_businessThe endpoint is for businesses and the key's account has none.
404not_foundNo such endpoint, or no such item for this caller.
409idempotency_conflictThe Idempotency-Key was already used by this key for a different action.
409action_refusedThe site's own rules refused the action; reason says which (for example class_not_available, already_offered, booking_not_available).
429too_many_actionsThe key ran 200 actions in the last 24 hours. Reads still work.
429too_many_requestsOver the rate limit. Wait the seconds in Retry-After (60) and go on.
500server_errorSomething failed on our side. Try again shortly.