{"openapi":"3.1.0","info":{"title":"Parsina Booking API","version":"1.0.0","summary":"Book in-person appointments at Parsina clinics from your own website or platform.","description":"Server-to-server REST API for booking appointments at clinics that use Parsina.\n\n* **Credentials** are issued by the clinic itself, in its clinic panel\n  («کلینیک من ▸ بیماران ▸ اتصال وب‌سایت / API»), by its manager or whoever holds\n  «مدیریت اتصال وب‌سایت»; the `client_secret` is shown once. Rotating, pausing and\n  revoking happen there too. **Gold plan only**: a clinic that is not on «طلایی», or is\n  read-only, answers `422 CLINIC_PLAN_REQUIRED`.\n* **Auth**: OAuth 2.0 client credentials (`POST /oauth/token`), then\n  `Authorization: Bearer pat_…` on every `/v1` call. Tokens live 900 seconds — cache them.\n* **Times** go out as ISO 8601 with the clinic's own UTC offset plus its IANA `timezone`;\n  inputs accept any offset. Dates are Gregorian `YYYY-MM-DD` with a `jalali` companion.\n* **No prices.** The API never returns a price; the patient pays at the clinic.\n* **No notifications.** Parsina sends no SMS or message for a booking made through this\n  API: your website must confirm the booking to its user (time, practitioner, service,\n  the clinic's address and phone, and the cancellation deadline are all in the response).\n* **Bookings are confirmed at once** (`scheduled`). Only `in_person` appointments in v1.\n* **Patients**: identified by mobile + name. The API never says whether a patient already\n  existed at the clinic and never returns patient data.\n* No CORS headers are sent: never call this API from browser JavaScript.\n\nDocumentation: https://doc.parsinabot.ir\n","contact":{"name":"Parsina","url":"https://doc.parsinabot.ir"}},"servers":[{"url":"https://gateway.parsinabot.ir"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Auth"},{"name":"Clinic"},{"name":"Availability"},{"name":"Bookings"},{"name":"Meta"}],"paths":{"/oauth/token":{"post":{"tags":["Auth"],"operationId":"getToken","summary":"Get an access token (OAuth 2.0 client credentials, RFC 6749 §4.4)","description":"Authenticate with HTTP Basic (`client_id:client_secret`) **or** with `client_id` and\n`client_secret` in the body — never both. A request with a browser `Origin` header is\nrefused. Limits: 10 requests per minute per `client_id`, 30 per minute per IP address.\n","security":[{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"The access token.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"`invalid_request`, `unsupported_grant_type` or `invalid_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"`invalid_client` — unknown client, wrong, expired or revoked secret (indistinguishable).","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"`access_denied` — the client is paused or revoked, the IP address is not allowed, or a browser `Origin` header was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"`slow_down` — too many token requests.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"503":{"description":"`temporarily_unavailable`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/v1/me":{"get":{"tags":["Clinic"],"operationId":"getMe","summary":"The calling client, its scopes and the clinics it may act for","description":"Any valid token.","responses":{"200":{"description":"The client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}":{"parameters":[{"$ref":"#/components/parameters/ClinicId"}],"get":{"tags":["Clinic"],"operationId":"getClinic","summary":"The clinic and its online booking rules","description":"Scope `clinic:read`.","responses":{"200":{"description":"The clinic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clinic"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/practitioners":{"parameters":[{"$ref":"#/components/parameters/ClinicId"}],"get":{"tags":["Clinic"],"operationId":"listPractitioners","summary":"Practitioners who can be booked through this client","description":"Scope `clinic:read`. Accepted, active members of the clinic with working hours there,\nwithin the client's grant. A practitioner who paused online booking is listed with\n`bookingPaused: true`.\n","responses":{"200":{"description":"The practitioners.","content":{"application/json":{"schema":{"type":"object","required":["practitioners"],"properties":{"practitioners":{"type":"array","items":{"$ref":"#/components/schemas/Practitioner"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/services":{"parameters":[{"$ref":"#/components/parameters/ClinicId"}],"get":{"tags":["Clinic"],"operationId":"listServices","summary":"Services that can be booked online","description":"Scope `clinic:read`. Services the clinic offers for direct online booking (in person,\ntimed), within the client's grant. **No price field, anywhere.** One `id` per service:\nany id of a service books it with any practitioner who performs it. Without\n`practitionerId`, `durationMinutes` is the service's own length or `null` when it\ndepends on the practitioner; with it, the length a booking with them takes.\n","parameters":[{"name":"practitionerId","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Id"}},{"name":"mode","in":"query","required":false,"description":"Only `in_person` exists in v1; `online` lists nothing.","schema":{"$ref":"#/components/schemas/Mode"}}],"responses":{"200":{"description":"The services.","content":{"application/json":{"schema":{"type":"object","required":["services"],"properties":{"services":{"type":"array","items":{"$ref":"#/components/schemas/Service"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/availability":{"parameters":[{"$ref":"#/components/parameters/ClinicId"}],"get":{"tags":["Availability"],"operationId":"getAvailability","summary":"Free times of one practitioner for one service","description":"Scope `availability:read`. The same free times the clinic's own online booking shows\n(lead time, booking horizon, working hours, days off, existing appointments). Without\n`serviceId` the clinic's default service is used (`SERVICE_REQUIRED` when it has none\nbookable with this practitioner). A `from` in the past starts today.\n","parameters":[{"name":"practitionerId","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Id"}},{"name":"serviceId","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Id"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Mode"}},{"name":"from","in":"query","required":false,"description":"First day, Gregorian, on the clinic's calendar. Default today.","schema":{"type":"string","format":"date"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":14,"default":7}}],"responses":{"200":{"description":"The free times.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/bookings":{"parameters":[{"$ref":"#/components/parameters/ClinicId"}],"post":{"tags":["Bookings"],"operationId":"createBooking","summary":"Book an appointment","description":"Scope `bookings:write`. Confirmed at once (`scheduled`) when it succeeds.\n**Idempotent:** send a unique `Idempotency-Key` per booking attempt and retry a failed\nor timed-out request with the SAME key and the SAME body — a replay answers `200` with\n`replayed: true` and never books twice; the same key with a different body is\n`409 IDEMPOTENCY_CONFLICT`. There is no offline queue: if the API is unreachable, tell\nyour user the booking did not go through.\n\nA `503 UNAVAILABLE` on this call can mean the outcome is not yet known (the booking\nmay have been made): retry with the SAME key after `Retry-After` — the retry answers\nthe booking if it exists and never books twice. `409 IN_PROGRESS` means the same:\nwait `Retry-After` and retry with the same key. A `start` that is not one of the\ntimes availability returned is `400 VALIDATION_FAILED` (`field: start`).\n\nA booking answered `201` whose record was not yet saved on Parsina's side (rare)\nbecomes readable within minutes on its own; retrying the same POST with the same key\nremains your fallback.\n\n`serviceId` omitted → the clinic's default service when it is bookable with this\npractitioner, else `400 SERVICE_REQUIRED`. `relation` says who owns the mobile relative\nto the patient (default `self`).\n\nParsina sends **no SMS** for this booking: confirm it to your user yourself.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRequest"}}}},"responses":{"200":{"description":"A replay of an earlier request with the same Idempotency-Key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreated"}}}},"201":{"description":"Booked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreated"}}}},"default":{"$ref":"#/components/responses/Error"}}},"get":{"tags":["Bookings"],"operationId":"findBookings","summary":"This client's bookings with your own reference","description":"Scope `bookings:read`. Newest first; only bookings this client made.","parameters":[{"name":"externalRef","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The bookings.","content":{"application/json":{"schema":{"type":"object","required":["bookings"],"properties":{"bookings":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/bookings/{bookingId}":{"parameters":[{"$ref":"#/components/parameters/ClinicId"},{"$ref":"#/components/parameters/BookingId"}],"get":{"tags":["Bookings"],"operationId":"getBooking","summary":"One booking this client made","description":"Scope `bookings:read`. Another client's booking is `404 NOT_FOUND`.","responses":{"200":{"description":"The booking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/clinics/{clinicId}/bookings/{bookingId}/cancel":{"parameters":[{"$ref":"#/components/parameters/ClinicId"},{"$ref":"#/components/parameters/BookingId"}],"post":{"tags":["Bookings"],"operationId":"cancelBooking","summary":"Cancel a booking this client made","description":"Scope `bookings:cancel`. Allowed until `cancellableUntil` (the clinic's cancellation\ncutoff before the start); later → `422 CANCEL_CUTOFF_PASSED`, and the patient must call\nthe clinic. Cancelling an already cancelled booking answers it again. After a\ncancellation the booking's time, practitioner and service can no longer be read\n(they come back `null`).\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Accepted for your records; not stored by Parsina in v1."}}}}}},"responses":{"200":{"description":"The cancelled booking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/openapi.json":{"get":{"tags":["Meta"],"operationId":"getOpenApi","summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/healthz":{"get":{"tags":["Meta"],"operationId":"health","summary":"Liveness","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An opaque `pat_…` token from `POST /oauth/token`, valid 900 seconds."},"basicAuth":{"type":"http","scheme":"basic","description":"`client_id:client_secret`, for `POST /oauth/token` only."}},"headers":{"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":1}},"RequestId":{"description":"This request's id; quote it to Parsina support.","schema":{"type":"string"}}},"parameters":{"ClinicId":{"name":"clinicId","in":"path","required":true,"description":"A clinic this client holds an active grant for (see `GET /v1/me`).","schema":{"type":"string"}},"BookingId":{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique per booking attempt; reuse it to retry the same request.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"}}},"responses":{"Error":{"description":"An error. `code` is stable; `message` (Persian) and `messageEn` are for people.\n`429` and `503` (and `409 IN_PROGRESS`) carry `Retry-After`.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"Mode":{"type":"string","enum":["in_person","online"],"description":"Only `in_person` is accepted in v1."},"Instant":{"type":"string","format":"date-time","description":"ISO 8601 with the clinic's UTC offset, e.g. `2026-12-01T09:00:00+03:30`.","examples":["2026-12-01T09:00:00+03:30"]},"JalaliDate":{"type":"string","pattern":"^\\d{4}/\\d{2}/\\d{2}$","examples":["1405/09/10"]},"Scope":{"type":"string","enum":["clinic:read","availability:read","bookings:read","bookings:write","bookings:cancel"]},"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","const":"client_credentials"},"scope":{"type":"string","description":"Space-separated scopes; omitted = every scope the client holds.","examples":["availability:read bookings:write"]},"client_id":{"type":"string","description":"Only when not using HTTP Basic."},"client_secret":{"type":"string","description":"Only when not using HTTP Basic."}}},"TokenResponse":{"type":"object","required":["access_token","token_type","expires_in","scope","clinics"],"properties":{"access_token":{"type":"string","examples":["pat_…"]},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","examples":[900]},"scope":{"type":"string"},"clinics":{"type":"array","items":{"$ref":"#/components/schemas/ClinicRef"}}}},"OAuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["invalid_request","invalid_client","unsupported_grant_type","invalid_scope","access_denied","slow_down","temporarily_unavailable"]},"error_description":{"type":"string"}}},"ClinicRef":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"Me":{"type":"object","required":["client","scopes","clinics"],"properties":{"client":{"type":"object","required":["clientId","name","type"],"properties":{"clientId":{"type":"string","examples":["pcl_…"]},"name":{"type":"string"},"type":{"type":"string","enum":["clinic","partner"]}}},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"clinics":{"type":"array","items":{"$ref":"#/components/schemas/ClinicRef"}}}},"Clinic":{"type":"object","required":["id","name","address","phone","city","timezone","country","booking"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"phone":{"type":["string","null"]},"city":{"type":["string","null"]},"timezone":{"type":"string","examples":["Asia/Tehran"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2","examples":["IR"]},"booking":{"type":"object","required":["enabled","horizonDays","leadTimeMinutes","cancelCutoffMinutes","modes"],"properties":{"enabled":{"type":"boolean"},"horizonDays":{"type":"integer"},"leadTimeMinutes":{"type":"integer"},"cancelCutoffMinutes":{"type":"integer"},"modes":{"type":"array","items":{"type":"string","const":"in_person"}}}}}},"Practitioner":{"type":"object","required":["id","displayName","title","specialty","modes","serviceIds","bookingPaused"],"properties":{"id":{"type":"string"},"displayName":{"type":"string","description":"The name as patients read it","title included.":null},"title":{"type":["string","null"],"examples":["دکتر"]},"specialty":{"type":["string","null"]},"modes":{"type":"array","items":{"type":"string","const":"in_person"}},"serviceIds":{"type":"array","items":{"type":"string"}},"bookingPaused":{"type":"boolean"}}},"Service":{"type":"object","description":"No price field, anywhere.","required":["id","name","category","durationMinutes","modes","isDefault","practitionerIds","prepInstructions"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":["string","null"]},"durationMinutes":{"type":["integer","null"]},"modes":{"type":"array","items":{"type":"string","const":"in_person"}},"isDefault":{"type":"boolean","description":"The clinic's default service for online booking."},"practitionerIds":{"type":"array","items":{"type":"string"}},"prepInstructions":{"type":["string","null"]}}},"Availability":{"type":"object","required":["timezone","durationMinutes","horizonEnd","paused","days"],"properties":{"timezone":{"type":"string"},"durationMinutes":{"type":"integer"},"horizonEnd":{"type":["string","null"],"format":"date","description":"The last day that can be booked."},"paused":{"type":"boolean","description":"Online booking is paused or switched off — no slots."},"days":{"type":"array","items":{"type":"object","required":["date","jalali","slots"],"properties":{"date":{"type":"string","format":"date"},"jalali":{"$ref":"#/components/schemas/JalaliDate"},"slots":{"type":"array","items":{"type":"object","required":["start","end"],"properties":{"start":{"$ref":"#/components/schemas/Instant"},"end":{"$ref":"#/components/schemas/Instant"}}}}}}}}},"BookingRequest":{"type":"object","required":["practitionerId","start","patient"],"properties":{"practitionerId":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"mode":{"$ref":"#/components/schemas/Mode"},"start":{"type":"string","format":"date-time","description":"One of the `start` values availability returned; any UTC offset."},"patient":{"type":"object","required":["firstName","lastName","mobile"],"properties":{"firstName":{"type":"string","maxLength":60},"lastName":{"type":"string","maxLength":60},"mobile":{"type":"string","maxLength":32,"description":"In the clinic country's national format or with its country code.","examples":["09121234567","+989121234567"]},"gender":{"type":"string","enum":["male","female"]},"birthDate":{"type":"string","format":"date"},"nationalId":{"type":"string","maxLength":20},"relation":{"type":"string","enum":["self","child","spouse","parent","sibling","other"],"default":"self","description":"Who owns the mobile, relative to the patient."}}},"note":{"type":"string","maxLength":500},"externalRef":{"type":"string","maxLength":128,"description":"Your own reference (order id)."}},"examples":[{"practitionerId":"6f1c…","serviceId":"2b9e…","mode":"in_person","start":"2026-12-01T09:00:00+03:30","patient":{"firstName":"علی","lastName":"رضایی","mobile":"09121234567","gender":"male","birthDate":"1990-05-01","relation":"self"},"note":"درد قفسه سینه از دیروز","externalRef":"WP-88412"}]},"Booking":{"type":"object","description":"No price, no patient data. After a cancellation `start`, `end`, `practitioner` and\n`service` are `null`.\n","required":["bookingId","status","start","end","timezone","jalali","practitioner","service","mode","payment","cancellableUntil","clinic","externalRef","createdAt"],"properties":{"bookingId":{"type":"string"},"status":{"type":"string","enum":["scheduled","arrived","in_visit","completed","cancelled","no_show"]},"start":{"oneOf":[{"$ref":"#/components/schemas/Instant"},{"type":"null"}]},"end":{"oneOf":[{"$ref":"#/components/schemas/Instant"},{"type":"null"}]},"timezone":{"type":"string"},"jalali":{"type":"object","required":["date","time"],"properties":{"date":{"type":["string","null"],"examples":["1405/09/10"]},"time":{"type":["string","null"],"examples":["09:00"]}}},"practitioner":{"oneOf":[{"type":"null"},{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]}}}]},"service":{"oneOf":[{"type":"null"},{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]}}}]},"mode":{"type":"string","enum":["in_person","online"],"description":"Booked `in_person`; the clinic may later convert the visit to `online`."},"payment":{"type":"object","required":["method"],"properties":{"method":{"type":"string","const":"at_clinic"}}},"cancellableUntil":{"oneOf":[{"$ref":"#/components/schemas/Instant"},{"type":"null"}],"description":"The last moment this booking can be cancelled through the API."},"clinic":{"type":"object","required":["id","name","address","phone"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"phone":{"type":["string","null"]}}},"externalRef":{"type":["string","null"]},"createdAt":{"oneOf":[{"$ref":"#/components/schemas/Instant"},{"type":"null"}]}}},"BookingCreated":{"allOf":[{"$ref":"#/components/schemas/Booking"},{"type":"object","required":["replayed"],"properties":{"replayed":{"type":"boolean"}}}]},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","messageEn","requestId"],"properties":{"code":{"type":"string","description":"400 VALIDATION_FAILED, SERVICE_REQUIRED, INVALID_MOBILE, IDEMPOTENCY_KEY_REQUIRED ·\n401 INVALID_TOKEN, TOKEN_EXPIRED ·\n403 SCOPE_MISSING, CLINIC_NOT_GRANTED, CLIENT_PAUSED, PRACTITIONER_NOT_ALLOWED,\nSERVICE_NOT_ALLOWED, IP_NOT_ALLOWED ·\n404 NOT_FOUND (another client's booking too) ·\n409 SLOT_TAKEN, DUPLICATE_BOOKING, IDEMPOTENCY_CONFLICT, IN_PROGRESS ·\n422 BOOKING_DISABLED, BOOKING_PAUSED, OUT_OF_WINDOW, PRACTITIONER_NOT_PRESENT,\nSERVICE_NOT_IN_SHIFT, MODE_NOT_AVAILABLE, TOO_MANY_OPEN_BOOKINGS,\nCANCEL_CUTOFF_PASSED, CLINIC_UNAVAILABLE, CLINIC_PLAN_REQUIRED, BOOKING_NOT_ALLOWED ·\n429 RATE_LIMITED · 503 UNAVAILABLE.\nA `partner` client gets BOOKING_NOT_ALLOWED instead of DUPLICATE_BOOKING and\nTOO_MANY_OPEN_BOOKINGS.\n","enum":["VALIDATION_FAILED","SERVICE_REQUIRED","INVALID_MOBILE","IDEMPOTENCY_KEY_REQUIRED","INVALID_TOKEN","TOKEN_EXPIRED","SCOPE_MISSING","CLINIC_NOT_GRANTED","CLIENT_PAUSED","PRACTITIONER_NOT_ALLOWED","SERVICE_NOT_ALLOWED","IP_NOT_ALLOWED","NOT_FOUND","SLOT_TAKEN","DUPLICATE_BOOKING","IDEMPOTENCY_CONFLICT","IN_PROGRESS","BOOKING_DISABLED","BOOKING_PAUSED","OUT_OF_WINDOW","PRACTITIONER_NOT_PRESENT","SERVICE_NOT_IN_SHIFT","MODE_NOT_AVAILABLE","TOO_MANY_OPEN_BOOKINGS","CANCEL_CUTOFF_PASSED","CLINIC_UNAVAILABLE","CLINIC_PLAN_REQUIRED","BOOKING_NOT_ALLOWED","RATE_LIMITED","UNAVAILABLE"]},"message":{"type":"string","description":"Persian."},"messageEn":{"type":"string"},"field":{"type":"string","description":"The request field at fault","when there is one.":null},"requestId":{"type":"string"}}}}}}},"x-limits":{"description":"In-process limits per client; 429 RATE_LIMITED with Retry-After when exceeded.","reads":"600 per minute per client","writes":"60 per hour per client — each booking attempt that reaches scheduling's RequestAppointment, refused there or not (a rate of attempts: never refunded for a scheduling refusal), and each cancellation actually sent; a 429 from the daily cap or the mobile limit, a refusal before scheduling, a replay, IN_PROGRESS and IDEMPOTENCY_CONFLICT spend none","dailyBookings":"the grant's daily cap (default 100) per client, clinic and clinic-local day — replays never count","perMobile":"5 bookings per rolling 24 hours per mobile, across all clients — replays never count","tokens":"10 issued tokens per minute per client_id (reserved before the issue, released if it fails); failed token requests 10 per minute per client_id and IP, 30 per minute per IP, counted before the secret is checked"}}