{"openapi":"3.1.0","info":{"title":"Rezonta Integration API","version":"v1","description":"Machine access for your own app: catalog and availability, clients, appointments, payments, reviews, analytics reports for BI tools, an event feed and signed webhooks. Authenticate with an API key: `Authorization: Bearer rz_live_…`. Errors look like `{ \"error\": { \"code\", \"message\", \"details\"? } }`. Guide: https://rezonta.com/developers"},"servers":[{"url":"https://api.rezonta.com"}],"tags":[],"paths":{"/api/v1/integration/me":{"get":{"operationId":"IntegrationMeController_me","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"example":{"company":{"id":"WuCzbG06Z4R4","name":"Example Studio"},"key":{"id":"pRXHzQcNpbyz","name":"Mobile app backend (prod)","mode":"live","scopes":["catalog:read","clients:read","appointments:write"],"createdAt":"2026-01-15T09:00:00.000Z","expiresAt":null},"locations":[{"id":"y6Uneid43eiR","name":"Example Studio"}],"allLocations":true}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Current key, its company, scopes and locations","tags":["Key"]}},"/api/v1/integration/locations":{"get":{"description":"Locations the key may act in that take online bookings. `appointmentPayment` says how a booking there is paid online.","operationId":"IntegrationCatalogController_list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"y6Uneid43eiR","name":"Example Studio","address":"1 Example St.","city":"Kyiv","country":"UA","timeZone":"Europe/Kyiv","currency":"UAH","bookingLeadTimeMin":60,"bookingHorizonDays":30,"clientCancelEnabled":true,"clientCancelLeadTimeMin":1440,"clientRescheduleEnabled":true,"clientRescheduleLeadTimeMin":1440,"clientRescheduleMaxCount":2,"phones":[{"phone":"+380441234567","label":null,"isPrimary":true}],"appointmentPayment":{"mode":"optional","prepaymentPercent":null,"provider":"wayforpay","autoRefundOnClientCancel":{"enabled":true,"hoursBefore":24}}}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Locations that take online bookings","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}":{"get":{"operationId":"IntegrationCatalogController_details","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"id":"y6Uneid43eiR","name":"Example Studio","bookingFlowType":"service-first","address":"1 Example St.","city":"Kyiv","zip":"01001","country":"UA","latitude":50.4501,"longitude":30.5234,"googleMapsUrl":null,"timeZone":"Europe/Kyiv","currency":"UAH","bookingDescription":null,"bookingLeadTimeMin":60,"bookingSlotStep":15,"bookingHorizonDays":30,"website":"https://example.com","instagram":"example.studio","facebook":null,"telegram":null,"whatsapp":null,"viber":null,"tiktok":null,"phones":[{"phone":"+380441234567","label":null,"isPrimary":true}],"workSchedule":[{"dayOfWeek":1,"isWorkDay":true,"openTime":"09:00","closeTime":"20:00"},{"dayOfWeek":0,"isWorkDay":false,"openTime":null,"closeTime":null}],"appointmentPayment":{"mode":"optional","prepaymentPercent":null,"provider":"wayforpay","autoRefundOnClientCancel":{"enabled":true,"hoursBefore":24}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Location details","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/services":{"get":{"operationId":"IntegrationCatalogController_services","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"rO3V8CUy88bx","name":"Haircut","description":"Consultation, wash, cut and styling.","translations":{"en":{"name":"Haircut (EN)","description":"Consultation, wash, cut and styling."}},"durationMin":60,"price":600,"materials":null,"sortOrder":0,"popularityRank":1,"images":["https://cdn.example.com/services/haircut.jpg"],"photoCount":1,"staffCategories":[{"id":"Vd2KpN7xRs4G","name":"Senior barber","sortOrder":0,"price":700,"durationMin":null,"translations":[{"locale":"en","name":"Senior barber","description":null}]}]}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Services bookable online, by category","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/service-groups":{"get":{"operationId":"IntegrationCatalogController_serviceGroups","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"Yc5MbH1wQz8L","name":"Hair","translations":{},"sortOrder":0,"serviceIds":["rO3V8CUy88bx"]}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Service groups","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/bundles":{"get":{"operationId":"IntegrationCatalogController_bundles","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"Fh6RcY2mXv9B","name":"Haircut + beard","description":null,"translations":{},"price":800,"durationMin":90,"executionMode":"sequential","staffCount":1,"images":[],"photoCount":0,"items":[{"order":0,"serviceId":"rO3V8CUy88bx","name":"Haircut","durationMin":60,"startOffsetMin":null},{"order":1,"serviceId":"Lq8TzW3nKp5D","name":"Beard trim","durationMin":30,"startOffsetMin":null}]}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Bundles (multi-service and «4/6 hands») bookable online","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff":{"get":{"operationId":"IntegrationCatalogController_staff","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg","specialization":"Senior barber","bio":"8 years behind the chair. Classic and modern cuts.","avgRating":4.9,"reviewCount":124,"portfolioPreview":"https://cdn.example.com/portfolio/1.jpg","portfolioCount":12}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Masters bookable online","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff/{staffId}":{"get":{"operationId":"IntegrationCatalogController_staffProfile","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"staffId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg","specialization":"Senior barber","bio":"8 years behind the chair. Classic and modern cuts.","avgRating":4.9,"reviewCount":124,"portfolio":[{"id":"Kr4VnB8cXs1J","url":"https://cdn.example.com/portfolio/1-thumb.jpg","fullUrl":"https://cdn.example.com/portfolio/1.jpg","caption":"Textured crop","serviceId":"rO3V8CUy88bx","serviceName":"Haircut"}]}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`STAFF_NOT_FOUND` — No such staff member in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"STAFF_NOT_FOUND":{"summary":"STAFF_NOT_FOUND","value":{"error":{"code":"STAFF_NOT_FOUND","message":"Staff member not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Master profile","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff/{staffId}/reviews":{"get":{"operationId":"IntegrationCatalogController_staffReviews","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"staffId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"items":[{"id":"Wn5HcR8kTq2M","rating":5,"comment":"Great haircut, thank you!","authorName":"Ivan P.","serviceName":"Haircut","createdAt":"2026-01-20T12:15:00.000Z"}],"meta":{"total":124,"page":1,"limit":10,"totalPages":13,"hasNext":true,"hasPrev":false}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`STAFF_NOT_FOUND` — No such staff member in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"STAFF_NOT_FOUND":{"summary":"STAFF_NOT_FOUND","value":{"error":{"code":"STAFF_NOT_FOUND","message":"Staff member not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Reviews of a master","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/availability":{"get":{"description":"`serviceId` for one service, or `services=a,b` for several booked together with one master (their length is resolved per master; only masters who do all of them are offered). `staffId` is a master's id, or `any` for whoever is free. Every slot has `maxDurationMin` — the longest booking that fits from it.","operationId":"IntegrationCatalogController_availability","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"date","required":true,"in":"query","description":"`YYYY-MM-DD` in the location's time zone.","schema":{"type":"string"}},{"name":"durationMin","required":false,"in":"query","description":"Override the length (min) — only with `serviceId`.","schema":{"minimum":1,"type":"number"}},{"name":"serviceId","required":false,"in":"query","description":"One service. For several booked together, use `services` instead.","schema":{"type":"string"}},{"name":"services","required":false,"in":"query","description":"Several services booked together with one master, in order:\n`services=a,b`. The length is resolved per master (it differs by tier),\nand only masters who perform all of them are offered.","schema":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}}},{"name":"staffId","required":false,"in":"query","description":"Master id, or `any` / omitted for whoever is free.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSlotDto"}},"example":[{"time":"10:00","staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","maxDurationMin":120},{"time":"10:15","staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","maxDurationMin":105},{"time":"11:30","staffId":"Tg4NsE8bQw1H","staffName":"Andrii Melnyk","maxDurationMin":90}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`SERVICE_NOT_BOOKABLE` — No such service in the location, or it is not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"SERVICE_NOT_BOOKABLE":{"summary":"SERVICE_NOT_BOOKABLE","value":{"error":{"code":"SERVICE_NOT_BOOKABLE","message":"Service not found or not available for online booking"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Free time slots for services on a day","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/availability-days":{"get":{"description":"Days with at least one free slot between `from` and `to` (inclusive, at most 92 days), clamped to what can be booked: from today to the end of the booking horizon. Filter by `serviceId`, `services=a,b` and/or `staffId`. `year` + `month` instead of `from`/`to` is the older form: the whole month, not clamped.","operationId":"IntegrationCatalogController_availabilityDays","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"First day of the range, `YYYY-MM-DD`. Use `from` + `to` (at most 92\ndays); `year` + `month` is the older form.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"Last day of the range (inclusive), `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"year","required":false,"in":"query","schema":{"minimum":2020,"maximum":2100,"type":"number"}},{"name":"month","required":false,"in":"query","description":"1–12.","schema":{"minimum":1,"maximum":12,"type":"number"}},{"name":"serviceId","required":false,"in":"query","description":"One service. For several booked together, use `services` instead.","schema":{"type":"string"}},{"name":"services","required":false,"in":"query","description":"Several services booked together with one master, in order:\n`services=a,b`. The length is resolved per master (it differs by tier),\nand only masters who perform all of them are offered.","schema":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}}},{"name":"staffId","required":false,"in":"query","description":"Master id, or `any` / omitted for whoever is free.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"example":["2026-01-20","2026-01-21","2026-01-23"]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`SERVICE_NOT_BOOKABLE` — No such service in the location, or it is not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"SERVICE_NOT_BOOKABLE":{"summary":"SERVICE_NOT_BOOKABLE","value":{"error":{"code":"SERVICE_NOT_BOOKABLE","message":"Service not found or not available for online booking"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Days that have free slots","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff-availability":{"get":{"description":"For the staff-first flow: every master's free slots on the chosen day.","operationId":"IntegrationCatalogController_staffAvailability","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"date","required":false,"in":"query","schema":{"type":"string"}},{"name":"durationMin","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg","specialization":"Senior barber","bio":"8 years behind the chair. Classic and modern cuts.","avgRating":4.9,"reviewCount":124,"portfolioCount":12},"slots":["10:00","10:15","14:30"],"slotDetails":[{"time":"10:00","maxDurationMin":30},{"time":"10:15","maxDurationMin":15},{"time":"14:30","maxDurationMin":210}]}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Free slots of every master on a day","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/next-slot":{"get":{"description":"Returns `{ slot: ... }`; `slot` is `null` when nothing is free. It is wrapped in an object because a bare `null` would go out as an empty body, which is not valid JSON.","operationId":"IntegrationCatalogController_nextSlot","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"serviceId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"slot":{"date":"2026-01-20","time":"10:00","staffId":"ZXzBkOjhlbcZ"}}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`SERVICE_NOT_BOOKABLE` — No such service in the location, or it is not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"SERVICE_NOT_BOOKABLE":{"summary":"SERVICE_NOT_BOOKABLE","value":{"error":{"code":"SERVICE_NOT_BOOKABLE","message":"Service not found or not available for online booking"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Nearest free slot for a service","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/bundle-availability":{"get":{"description":"To pin specific masters on a parallel («4/6 hands») bundle, pass `fixed=<position>:<staffId>`, where `staffId` is the master's publicId.","operationId":"IntegrationCatalogController_bundleAvailability","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"bundleId","required":false,"in":"query","schema":{"type":"string"}},{"name":"date","required":false,"in":"query","schema":{"type":"string"}},{"name":"fixed","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"time":"10:00","assignments":[{"order":0,"staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","startOffsetMin":0,"durationMin":60},{"order":1,"staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","startOffsetMin":60,"durationMin":30}]}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`BUNDLE_NOT_FOUND` — No such bundle in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"BUNDLE_NOT_FOUND":{"summary":"BUNDLE_NOT_FOUND","value":{"error":{"code":"BUNDLE_NOT_FOUND","message":"Bundle not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Free slots for a bundle on a day","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff-for-service":{"get":{"operationId":"IntegrationCatalogController_staffForService","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"serviceId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg","specialization":"Senior barber","bio":"8 years behind the chair. Classic and modern cuts.","avgRating":4.9,"reviewCount":124,"price":700,"durationMin":60,"portfolioCount":12}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`SERVICE_NOT_BOOKABLE` — No such service in the location, or it is not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"SERVICE_NOT_BOOKABLE":{"summary":"SERVICE_NOT_BOOKABLE","value":{"error":{"code":"SERVICE_NOT_BOOKABLE","message":"Service not found or not available for online booking"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Masters who perform a service","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/services-for-staff":{"get":{"operationId":"IntegrationCatalogController_servicesForStaff","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"staffId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"rO3V8CUy88bx","name":"Haircut","description":"Consultation, wash, cut and styling.","translations":{},"price":700,"durationMin":60,"basePrice":600,"materials":null,"images":["https://cdn.example.com/services/haircut.jpg"],"photoCount":1}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`STAFF_NOT_FOUND` — No such staff member in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"STAFF_NOT_FOUND":{"summary":"STAFF_NOT_FOUND","value":{"error":{"code":"STAFF_NOT_FOUND","message":"Staff member not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Services a master performs (staff-first flow)","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/bundles-for-staff":{"get":{"operationId":"IntegrationCatalogController_bundlesForStaff","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"staffId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"Fh6RcY2mXv9B","name":"Haircut + beard","description":null,"translations":{},"price":800,"durationMin":90,"executionMode":"sequential","staffCount":1,"images":[],"photoCount":0,"items":[{"order":0,"serviceId":"rO3V8CUy88bx","name":"Haircut","durationMin":60,"startOffsetMin":null},{"order":1,"serviceId":"Lq8TzW3nKp5D","name":"Beard trim","durationMin":30,"startOffsetMin":null}],"basePrice":800}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`STAFF_NOT_FOUND` — No such staff member in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"STAFF_NOT_FOUND":{"summary":"STAFF_NOT_FOUND","value":{"error":{"code":"STAFF_NOT_FOUND","message":"Staff member not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Bundles a master performs","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/staff-for-bundle":{"get":{"operationId":"IntegrationCatalogController_staffForBundle","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"bundleId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"staffIds":["ZXzBkOjhlbcZ","Tg4NsE8bQw1H"]}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`BUNDLE_NOT_FOUND` — No such bundle in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"BUNDLE_NOT_FOUND":{"summary":"BUNDLE_NOT_FOUND","value":{"error":{"code":"BUNDLE_NOT_FOUND","message":"Bundle not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Masters who perform a bundle","tags":["Catalog & availability"]}},"/api/v1/integration/locations/{locationId}/max-duration":{"get":{"description":"The longest booking that fits starting at `time` for a master. Used for multi-service carts.","operationId":"IntegrationCatalogController_maxDuration","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"staffId","required":false,"in":"query","schema":{"type":"string"}},{"name":"date","required":false,"in":"query","schema":{"type":"string"}},{"name":"time","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"maxDurationMin":120}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Longest booking that fits for a master","tags":["Catalog & availability"]}},"/api/v1/integration/clients":{"get":{"description":"Pass `?phone=+380…`. Returns 404 when the person has never been a client here.","operationId":"IntegrationClientsController_findByPhone","parameters":[{"name":"phone","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPersonDto"},"example":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Find a client by phone","tags":["Clients"]},"post":{"description":"Finds the person's card in a location or creates it; idempotent by phone. `created: false` means the card already existed and was returned untouched.","operationId":"IntegrationClientsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationClientDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationClientCreateResultDto"},"example":{"created":false,"client":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`INVALID_PHONE` — The phone number is not a valid number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"INVALID_PHONE":{"summary":"INVALID_PHONE","value":{"error":{"code":"INVALID_PHONE","message":"Phone must be a valid number in international format, e.g. +380991234567."}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Find or create a client","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}":{"patch":{"description":"The change applies to every card of the person. The phone number can't be changed here.","operationId":"IntegrationClientsController_update","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationClientDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPersonDto"},"example":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Update a client profile","tags":["Clients"]},"get":{"operationId":"IntegrationClientsController_get","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPersonDto"},"example":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Client (person) profile across all their cards","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}/notifications":{"put":{"description":"Send `{ handledBy: 'app' }` after the client signs in or registers for push, and `{ handledBy: 'rezonta' }` when they have no device left, so Rezonta takes over.","operationId":"IntegrationClientsController_notifications","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsHandlerDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPersonDto"},"example":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Choose who sends the client's notifications","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}/marketing-consent":{"put":{"operationId":"IntegrationClientsController_marketingConsent","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConsentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPersonDto"},"example":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"displayName":null,"email":"ivan@example.com","birthDate":"1992-05-14","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"marketingOptOutAt":null,"telegramLinked":true,"notifications":{"handledBy":"app","since":"2026-01-10T11:20:00.000Z","appActive":true},"stats":{"visitsCount":7,"totalSpent":[{"currency":"UAH","amount":5320}],"firstVisitAt":"2025-06-03T07:00:00.000Z","lastVisitAt":"2026-01-06T13:00:00.000Z","upcomingCount":1},"cards":[{"id":"QFCsIZLzkuRI","location":{"id":"y6Uneid43eiR","name":"Example Studio"},"createdAt":"2025-06-01T15:24:00.000Z"}],"createdAt":"2025-06-01T15:24:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Set marketing consent","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}/anonymize":{"post":{"description":"Erases the person's personal data on every card the key can see: name, email, birth date, photo and phone (replaced by a marker). Appointments, payments and reviews stay as history of an anonymous client; the business keeps its records. Marketing is switched off and notifications go back to Rezonta (there is nobody left to notify). Refused with `ACTIVE_APPOINTMENTS_EXIST` while the person has upcoming or ongoing visits — cancel them first. Afterwards the person is not found by phone (404), and a new booking with that phone creates a new card. Emits `client.anonymized` per card.","operationId":"IntegrationClientsController_anonymize","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationClientAnonymizeResultDto"},"example":{"anonymizedCards":1}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`ACTIVE_APPOINTMENTS_EXIST` — Anonymizing a client who still has upcoming or ongoing visits. `details.count` and `details.next` say which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"ACTIVE_APPOINTMENTS_EXIST":{"summary":"ACTIVE_APPOINTMENTS_EXIST","value":{"error":{"code":"ACTIVE_APPOINTMENTS_EXIST","message":"The client has upcoming appointments — cancel them first"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Anonymize a client (\"delete account\" in your app)","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}/loyalty":{"get":{"operationId":"IntegrationClientsController_loyalty","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"discountsEnabled":true,"perLocation":[{"location":{"id":"y6Uneid43eiR","name":"Example Studio"},"personalDiscount":{"percent":10,"amount":null,"validFrom":null,"validUntil":"2026-06-30T21:00:00.000Z","active":true},"category":{"id":"Hs7QkM3vNb5P","name":"Regulars","discountPercent":5,"discountAmount":null}}],"promoDiscounts":[{"percent":15,"amount":null,"validUntil":"2026-02-01T21:59:59.000Z"}],"subscriptions":[{"id":"Rt2BwX6mKq9V","plan":{"id":"Ns4LcP8zDf3W","name":"5 haircuts"},"location":{"id":"y6Uneid43eiR","name":"Example Studio"},"totalVisits":5,"visitsLeft":3,"purchasedAt":"2025-11-02T10:00:00.000Z","expiresAt":"2026-05-02T10:00:00.000Z"}],"certificates":[{"id":"Gz9FmT4hYc2R","code":"GIFT-7Q4K-2M9X","initialAmount":1000,"remainingAmount":400,"expiresAt":"2026-12-31T21:59:59.000Z","received":true}]}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Discounts, subscriptions and certificates of the client","tags":["Clients"]}},"/api/v1/integration/clients/{clientId}/appointments":{"get":{"description":"Upcoming (ascending) or past (descending), across all the person's cards.","operationId":"IntegrationClientsController_appointments","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentPageDto"},"example":{"items":[{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}],"nextCursor":null}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`INVALID_CURSOR` — The `cursor` is not one this API returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"INVALID_CURSOR":{"summary":"INVALID_CURSOR","value":{"error":{"code":"INVALID_CURSOR","message":"Malformed cursor — pass back the `nextCursor` value unchanged"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Appointments of a client","tags":["Clients"]}},"/api/v1/integration/appointments/{appointmentId}":{"get":{"operationId":"IntegrationAppointmentsController_get","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Appointment details","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/receipt":{"get":{"operationId":"IntegrationAppointmentsController_receipt","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"receipt":{"id":"Bx8DvK2nWq5T","status":"done","fiscalCode":"EXAMPLE-0000-0000","taxUrl":"https://cabinet.tax.gov.ua/cashregs/check?id=EXAMPLE","amount":810,"createdAt":"2026-01-20T09:35:12.000Z"}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Fiscal receipt of the appointment","tags":["Appointments"]}},"/api/v1/integration/locations/{locationId}/appointments":{"get":{"description":"Filtered by visit time with `from` and `to` (ISO dates, at most 93 days apart). Keyset-paginated.","operationId":"IntegrationAppointmentsController_listByLocation","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentPageDto"},"example":{"items":[{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}],"nextCursor":"eyJ0IjoiMjAyNi0wMS0yMFQwODowMDowMC4wMDBaIiwiaWQiOiIwYjdlNmYxYy0zYTUyLTRjOGUtOWQ0MS02ZjJhOGIzYzVlNzAifQ"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`INVALID_CURSOR` — The `cursor` is not one this API returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"INVALID_CURSOR":{"summary":"INVALID_CURSOR","value":{"error":{"code":"INVALID_CURSOR","message":"Malformed cursor — pass back the `nextCursor` value unchanged"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Appointments of a location","tags":["Appointments"]},"post":{"description":"Requires the `Idempotency-Key` header: a retried request returns the first booking. Online payment follows the location's `appointmentPayment` policy and the optional `payment` choice of the body: `later` (default where payment is optional), `deposit` (default where it is required) or `full`. A choice the policy does not allow is 400 `PAYMENT_OPTION_UNAVAILABLE`. When a checkout was started the response carries `payment` to open; if it could not be started, `paymentStartFailed` is true and the booking stays unpaid. A phone number the business asks to prepay, personally or as part of a client group, gets 409 `PREPAYMENT_REQUIRED` (nothing booked, amounts in `details`): show them, then repeat with `payment: \"deposit\"` and `acceptedPrepaymentAmount: details.amount` (or `payment: \"full\"`). `acceptedPrepaymentPercent: details.percent` keeps working for existing integrations. For such a number a failed checkout start is 502 `PAYMENT_START_FAILED` and the booking is cancelled. A number the business exempted from prepayment books without a checkout, even where the location requires one: `payment` is then `null`.","operationId":"IntegrationBookingController_book","parameters":[{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per logical request (8–128 chars). A retry with the same key and body returns the first result for 24 h.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicAppointmentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBookingResultDto"},"example":{"appointment":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"pending","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":null,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"pending","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":null,"createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"},"payment":{"orderReference":"Pm7XkD2sVr4C","provider":"wayforpay","form":{"url":"https://secure.wayforpay.com/pay","fields":{"merchantAccount":"example_studio","merchantDomainName":"rezonta.com","merchantTransactionSecureType":"AUTO","merchantSignature":"5f2b9c0e8d7a41b3a6c4e1f09d8b7a63","orderReference":"Pm7XkD2sVr4C","orderDate":"1768467672","amount":"300","currency":"UAH","productName[]":["Haircut, Beard trim"],"productCount[]":["1"],"productPrice[]":["300"],"serviceUrl":"https://api.rezonta.com/api/v1/wayforpay/callback","returnUrl":"https://rezonta.com/uk/pay/Pm7XkD2sVr4C","language":"UA"}},"redirectUrl":null},"paymentStartFailed":false}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`INVALID_PHONE` — The phone number is not a valid number.\n\n`FEATURE_NOT_AVAILABLE` — The business's plan doesn't include booking several staff members at once.\n\n`OUTSIDE_BOOKING_HORIZON` — The date is beyond the location’s booking horizon (`bookingHorizonDays`).\n\n`ONLINE_PAYMENT_UNAVAILABLE` — The business has no online payments connected, or its plan does not include online payments (the message says which).\n\n`PAYMENT_OPTION_UNAVAILABLE` — The `payment` choice of the booking does not fit the location's `appointmentPayment.mode`: `optional` takes `later` or `full`, `required` takes `deposit` or `full`. Read the mode from the location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"INVALID_PHONE":{"summary":"INVALID_PHONE","value":{"error":{"code":"INVALID_PHONE","message":"Phone must be a valid number in international format, e.g. +380991234567."}}},"FEATURE_NOT_AVAILABLE":{"summary":"FEATURE_NOT_AVAILABLE","value":{"error":{"code":"FEATURE_NOT_AVAILABLE","message":"Multi-staff booking is not available for this business"}}},"OUTSIDE_BOOKING_HORIZON":{"summary":"OUTSIDE_BOOKING_HORIZON","value":{"error":{"code":"OUTSIDE_BOOKING_HORIZON","message":"That date is too far in the future"}}},"ONLINE_PAYMENT_UNAVAILABLE":{"summary":"ONLINE_PAYMENT_UNAVAILABLE","value":{"error":{"code":"ONLINE_PAYMENT_UNAVAILABLE","message":"WayForPay is not configured for this business"}}},"PAYMENT_OPTION_UNAVAILABLE":{"summary":"PAYMENT_OPTION_UNAVAILABLE","value":{"error":{"code":"PAYMENT_OPTION_UNAVAILABLE","message":"This payment option is not available for this booking"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PUBLIC_BOOKING_DISABLED` — The location has online booking switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PUBLIC_BOOKING_DISABLED":{"summary":"PUBLIC_BOOKING_DISABLED","value":{"error":{"code":"PUBLIC_BOOKING_DISABLED","message":"Online booking is turned off for this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).\n\n`SERVICE_NOT_BOOKABLE` — No such service in the location, or it is not bookable online.\n\n`STAFF_NOT_FOUND` — No such staff member in the location, or not bookable online.\n\n`BUNDLE_NOT_FOUND` — No such bundle in the location, or not bookable online.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}},"SERVICE_NOT_BOOKABLE":{"summary":"SERVICE_NOT_BOOKABLE","value":{"error":{"code":"SERVICE_NOT_BOOKABLE","message":"Service not found or not available for online booking"}}},"STAFF_NOT_FOUND":{"summary":"STAFF_NOT_FOUND","value":{"error":{"code":"STAFF_NOT_FOUND","message":"Staff member not found"}}},"BUNDLE_NOT_FOUND":{"summary":"BUNDLE_NOT_FOUND","value":{"error":{"code":"BUNDLE_NOT_FOUND","message":"Bundle not found"}}}}}}},"409":{"description":"`IDEMPOTENCY_IN_PROGRESS` — The first request with this key is still running. Retry in a moment.\n\n`SLOT_TAKEN` — Someone took the slot meanwhile. Fetch availability and offer another time.\n\n`PREPAYMENT_REQUIRED` — The business takes bookings from this phone number only with an online prepayment. Nothing was booked. `details` carries `percent` (the share of the price, rounded to a whole percent when the business set a fixed amount), `amount`, `fullAmount`, `currency`, `chargeAmount`, `fullChargeAmount`, `chargeCurrency`, `fxRate`, `canChooseFull` and `refundPolicy { autoRefund, hoursBefore }`. Show the amount to the client, then repeat the same request with `payment: \"deposit\"` and `acceptedPrepaymentAmount: <amount>` (or `payment: \"full\"`); open the returned checkout. `acceptedPrepaymentPercent: <percent>` is still accepted when `acceptedPrepaymentAmount` is not sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"A request with this Idempotency-Key is still being processed — retry shortly"}}},"SLOT_TAKEN":{"summary":"SLOT_TAKEN","value":{"error":{"code":"SLOT_TAKEN","message":"This time slot is no longer available"}}},"PREPAYMENT_REQUIRED":{"summary":"PREPAYMENT_REQUIRED","value":{"error":{"code":"PREPAYMENT_REQUIRED","message":"This booking requires an online prepayment"}}}}}}},"422":{"description":"`IDEMPOTENCY_KEY_REUSED` — The same `Idempotency-Key` came with a different body — use a new key per action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"summary":"IDEMPOTENCY_KEY_REUSED","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"This Idempotency-Key was already used with a different request body"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}},"502":{"description":"`PAYMENT_START_FAILED` — The acquirer did not open a checkout. For a prepayment-required phone number the booking is cancelled (nothing is held); elsewhere retry `POST /appointments/{appointmentId}/payment` later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"PAYMENT_START_FAILED":{"summary":"PAYMENT_START_FAILED","value":{"error":{"code":"PAYMENT_START_FAILED","message":"Could not start the payment"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Create a booking","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/cancel":{"post":{"description":"Cancels like the client does, so the business's automatic refund rule applies: a paid booking cancelled at least `appointmentPayment.autoRefundOnClientCancel.hoursBefore` hours before the start is refunded through the acquirer (100 % of its online payments), unless the business turned it off. The response is the appointment plus `autoRefund` with the outcome; the money arrives as `payment.refunded`. Later cancels are refunded by the business by hand.","operationId":"IntegrationBookingController_cancel","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCancelResultDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"cancelled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z","autoRefund":{"decision":"refunded","hoursBefore":null,"refunds":[{"id":"Hs6QeT3mZk9P","status":"succeeded","amount":300,"currency":"UAH"}]}}}}},"400":{"description":"`CANCELLATION_DISABLED` — The business does not allow online cancellation.\n\n`OUTSIDE_CANCELLATION_WINDOW` — Past `selfService.cancelDeadline` — the client has to call the business.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"CANCELLATION_DISABLED":{"summary":"CANCELLATION_DISABLED","value":{"error":{"code":"CANCELLATION_DISABLED","message":"Online cancellation is disabled for this location"}}},"OUTSIDE_CANCELLATION_WINDOW":{"summary":"OUTSIDE_CANCELLATION_WINDOW","value":{"error":{"code":"OUTSIDE_CANCELLATION_WINDOW","message":"Too late to cancel this appointment online"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`INVALID_APPOINTMENT_STATUS` — The appointment is no longer scheduled (cancelled, completed…).\n\n`PAYMENT_IN_PROGRESS` — An online payment is pending — wait for `payment.succeeded` or its expiry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_APPOINTMENT_STATUS":{"summary":"INVALID_APPOINTMENT_STATUS","value":{"error":{"code":"INVALID_APPOINTMENT_STATUS","message":"This action isn't allowed for the appointment's current status. Fetch the appointment and check `status`."}}},"PAYMENT_IN_PROGRESS":{"summary":"PAYMENT_IN_PROGRESS","value":{"error":{"code":"PAYMENT_IN_PROGRESS","message":"A payment is being processed for this appointment"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Cancel (storefront deadline rules apply)","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/reschedule-slots":{"get":{"operationId":"IntegrationBookingController_rescheduleSlots","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"date","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSlotDto"}},"example":[{"time":"10:00","staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","maxDurationMin":120},{"time":"10:15","staffId":"ZXzBkOjhlbcZ","staffName":"Olena Koval","maxDurationMin":105},{"time":"11:30","staffId":"Tg4NsE8bQw1H","staffName":"Andrii Melnyk","maxDurationMin":90}]}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Free slots to move the appointment to","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/reschedule":{"post":{"operationId":"IntegrationBookingController_reschedule","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduleAppointmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-21T12:00:00.000Z","endTime":"2026-01-21T13:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":1},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`RESCHEDULE_DISABLED` — The business does not allow online rescheduling.\n\n`OUTSIDE_RESCHEDULE_WINDOW` — Past `selfService.rescheduleDeadline`.\n\n`RESCHEDULE_LIMIT_REACHED` — `selfService.reschedulesLeft` is 0.\n\n`OUTSIDE_BOOKING_HORIZON` — The date is beyond the location’s booking horizon (`bookingHorizonDays`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"RESCHEDULE_DISABLED":{"summary":"RESCHEDULE_DISABLED","value":{"error":{"code":"RESCHEDULE_DISABLED","message":"Online rescheduling is disabled for this location"}}},"OUTSIDE_RESCHEDULE_WINDOW":{"summary":"OUTSIDE_RESCHEDULE_WINDOW","value":{"error":{"code":"OUTSIDE_RESCHEDULE_WINDOW","message":"Too late to reschedule this appointment online"}}},"RESCHEDULE_LIMIT_REACHED":{"summary":"RESCHEDULE_LIMIT_REACHED","value":{"error":{"code":"RESCHEDULE_LIMIT_REACHED","message":"This appointment has been rescheduled the maximum number of times"}}},"OUTSIDE_BOOKING_HORIZON":{"summary":"OUTSIDE_BOOKING_HORIZON","value":{"error":{"code":"OUTSIDE_BOOKING_HORIZON","message":"That date is too far in the future"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`INVALID_APPOINTMENT_STATUS` — The appointment is no longer scheduled (cancelled, completed…).\n\n`PAYMENT_IN_PROGRESS` — An online payment is pending — wait for `payment.succeeded` or its expiry.\n\n`SLOT_TAKEN` — Someone took the slot meanwhile. Fetch availability and offer another time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_APPOINTMENT_STATUS":{"summary":"INVALID_APPOINTMENT_STATUS","value":{"error":{"code":"INVALID_APPOINTMENT_STATUS","message":"This action isn't allowed for the appointment's current status. Fetch the appointment and check `status`."}}},"PAYMENT_IN_PROGRESS":{"summary":"PAYMENT_IN_PROGRESS","value":{"error":{"code":"PAYMENT_IN_PROGRESS","message":"A payment is being processed for this appointment"}}},"SLOT_TAKEN":{"summary":"SLOT_TAKEN","value":{"error":{"code":"SLOT_TAKEN","message":"This time slot is no longer available"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Reschedule (storefront rules and limits apply)","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/confirm":{"post":{"operationId":"IntegrationBookingController_confirm","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`INVALID_APPOINTMENT_STATUS` — The appointment is no longer scheduled (cancelled, completed…).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_APPOINTMENT_STATUS":{"summary":"INVALID_APPOINTMENT_STATUS","value":{"error":{"code":"INVALID_APPOINTMENT_STATUS","message":"This action isn't allowed for the appointment's current status. Fetch the appointment and check `status`."}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Client confirms the visit (\"I'm coming\")","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/payment":{"post":{"description":"Requires the `Idempotency-Key` header: a retry returns the same payment order.","operationId":"IntegrationBookingController_startPayment","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per logical request (8–128 chars). A retry with the same key and body returns the first result for 24 h.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPaymentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"example":{"orderReference":"Pm7XkD2sVr4C","amount":300,"currency":"UAH","chargeAmount":300,"chargeCurrency":"UAH","fxRate":null,"mode":"prepayment","provider":"wayforpay","form":{"url":"https://secure.wayforpay.com/pay","fields":{"merchantAccount":"example_studio","merchantDomainName":"rezonta.com","merchantTransactionSecureType":"AUTO","merchantSignature":"5f2b9c0e8d7a41b3a6c4e1f09d8b7a63","orderReference":"Pm7XkD2sVr4C","orderDate":"1768467672","amount":"300","currency":"UAH","productName[]":["Haircut, Beard trim"],"productCount[]":["1"],"productPrice[]":["300"],"serviceUrl":"https://api.rezonta.com/api/v1/wayforpay/callback","returnUrl":"https://rezonta.com/uk/pay/Pm7XkD2sVr4C","language":"UA"}},"redirectUrl":null}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`ONLINE_PAYMENT_UNAVAILABLE` — The business has no online payments connected, or its plan does not include online payments (the message says which).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"ONLINE_PAYMENT_UNAVAILABLE":{"summary":"ONLINE_PAYMENT_UNAVAILABLE","value":{"error":{"code":"ONLINE_PAYMENT_UNAVAILABLE","message":"WayForPay is not configured for this business"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`IDEMPOTENCY_IN_PROGRESS` — The first request with this key is still running. Retry in a moment.\n\n`INVALID_APPOINTMENT_STATUS` — The appointment is no longer scheduled (cancelled, completed…).\n\n`ALREADY_PAID` — `paymentStatus` is `paid` — nothing left to pay online. A `partially_paid` booking can still pay the rest.\n\n`NOTHING_TO_PAY` — The amount due is zero, or (`mode: \"prepayment\"`) the prepayment share is already paid — take the rest with `mode: \"full\"`.\n\n`PREPAYMENT_NOT_ENABLED` — `mode: \"prepayment\"` while this booking has no prepayment to take: the business takes none, or exempted this client from it.\n\n`PAYMENT_IN_PROGRESS` — An online payment is pending — wait for `payment.succeeded` or its expiry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"A request with this Idempotency-Key is still being processed — retry shortly"}}},"INVALID_APPOINTMENT_STATUS":{"summary":"INVALID_APPOINTMENT_STATUS","value":{"error":{"code":"INVALID_APPOINTMENT_STATUS","message":"This action isn't allowed for the appointment's current status. Fetch the appointment and check `status`."}}},"ALREADY_PAID":{"summary":"ALREADY_PAID","value":{"error":{"code":"ALREADY_PAID","message":"This appointment is already paid"}}},"NOTHING_TO_PAY":{"summary":"NOTHING_TO_PAY","value":{"error":{"code":"NOTHING_TO_PAY","message":"There is nothing to pay for this appointment"}}},"PREPAYMENT_NOT_ENABLED":{"summary":"PREPAYMENT_NOT_ENABLED","value":{"error":{"code":"PREPAYMENT_NOT_ENABLED","message":"The business does not take prepayments — use mode \"full\""}}},"PAYMENT_IN_PROGRESS":{"summary":"PAYMENT_IN_PROGRESS","value":{"error":{"code":"PAYMENT_IN_PROGRESS","message":"A payment is being processed for this appointment"}}}}}}},"422":{"description":"`IDEMPOTENCY_KEY_REUSED` — The same `Idempotency-Key` came with a different body — use a new key per action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"summary":"IDEMPOTENCY_KEY_REUSED","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"This Idempotency-Key was already used with a different request body"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Start online payment for an appointment","tags":["Appointments"]}},"/api/v1/integration/payments/{orderReference}":{"get":{"operationId":"IntegrationBookingController_paymentStatus","parameters":[{"name":"orderReference","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z","appointmentId":"CpsvnRZB4TuH"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Online payment status","tags":["Appointments"]}},"/api/v1/integration/appointments/{appointmentId}/review":{"post":{"operationId":"IntegrationBookingController_createReview","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicReviewDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"completed","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[{"id":"Wn5HcR8kTq2M","staffId":"ZXzBkOjhlbcZ","rating":5,"comment":"Great haircut, thank you!","companyRating":5,"companyComment":null,"createdAt":"2026-01-20T12:15:00.000Z"}],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-20T12:15:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`APPOINTMENT_NOT_COMPLETED` — The visit is not completed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"APPOINTMENT_NOT_COMPLETED":{"summary":"APPOINTMENT_NOT_COMPLETED","value":{"error":{"code":"APPOINTMENT_NOT_COMPLETED","message":"Review can only be submitted for completed appointments"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"409":{"description":"`REVIEW_EXISTS` — Edit it with `PATCH` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"REVIEW_EXISTS":{"summary":"REVIEW_EXISTS","value":{"error":{"code":"REVIEW_EXISTS","message":"A review for this appointment already exists"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Leave a review of a completed visit","tags":["Appointments"]},"patch":{"operationId":"IntegrationBookingController_updateReview","parameters":[{"name":"appointmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublicReviewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"example":{"id":"CpsvnRZB4TuH","externalId":null,"status":"completed","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[{"id":"Wn5HcR8kTq2M","staffId":"ZXzBkOjhlbcZ","rating":5,"comment":"Great haircut, thank you!","companyRating":5,"companyComment":null,"createdAt":"2026-01-20T12:15:00.000Z"}],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-20T12:15:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.\n\n`REVIEW_EDIT_UNSUPPORTED` — Reviews rating several staff members can't be edited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}},"REVIEW_EDIT_UNSUPPORTED":{"summary":"REVIEW_EDIT_UNSUPPORTED","value":{"error":{"code":"REVIEW_EDIT_UNSUPPORTED","message":"Editing a review that rates several staff members is not supported"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Edit the review","tags":["Appointments"]}},"/api/v1/integration/events":{"get":{"operationId":"IntegrationEventsFeedController_list","parameters":[{"name":"after","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationEventFeedPageDto"},"example":{"items":[{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.cancelled","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"changes":{"previousStatus":"scheduled"},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"cancelled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}],"nextAfter":"1042","hasMore":false}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"410":{"description":"`EVENTS_CURSOR_EXPIRED` — The `after` seq is older than 30 days. Re-sync, then continue from the new seq.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"EVENTS_CURSOR_EXPIRED":{"summary":"EVENTS_CURSOR_EXPIRED","value":{"error":{"code":"EVENTS_CURSOR_EXPIRED","message":"Events after this cursor are no longer retained (30 days) — re-sync via GET /integration/locations/:id/appointments"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Event feed (catch up on missed webhooks)","tags":["Events"]}},"/api/v1/integration/webhooks":{"get":{"operationId":"IntegrationWebhooksApiController_list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"id":"Jb3WqL9tZc6N","url":"https://app.example.com/hooks/rezonta","description":"Mobile app backend","events":["appointment.created","appointment.cancelled"],"isActive":true,"disabledReason":null,"failingSince":null,"secretRotating":false,"locations":[{"id":"y6Uneid43eiR","name":"Example Studio"}],"createdAt":"2026-01-12T10:00:00.000Z","updatedAt":"2026-01-12T10:00:00.000Z"}]}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Webhook endpoints","tags":["Webhook endpoints"]},"post":{"operationId":"IntegrationWebhooksApiController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"example":{"endpoint":{"id":"Jb3WqL9tZc6N","url":"https://app.example.com/hooks/rezonta","description":"Mobile app backend","events":["appointment.created","appointment.cancelled"],"isActive":true,"disabledReason":null,"failingSince":null,"secretRotating":false,"locations":[{"id":"y6Uneid43eiR","name":"Example Studio"}],"createdAt":"2026-01-12T10:00:00.000Z","updatedAt":"2026-01-12T10:00:00.000Z"},"secret":"whsec_EXAMPLEdoNotUse0000000000000000"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"409":{"description":"`WEBHOOK_LIMIT_REACHED` — The business already has 5 webhook endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"WEBHOOK_LIMIT_REACHED":{"summary":"WEBHOOK_LIMIT_REACHED","value":{"error":{"code":"WEBHOOK_LIMIT_REACHED","message":"At most 5 webhook endpoints per business"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Create a webhook endpoint (returns the signing secret once)","tags":["Webhook endpoints"]}},"/api/v1/integration/webhooks/{webhookId}":{"get":{"operationId":"IntegrationWebhooksApiController_get","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"id":"Jb3WqL9tZc6N","url":"https://app.example.com/hooks/rezonta","description":"Mobile app backend","events":["appointment.created","appointment.cancelled"],"isActive":true,"disabledReason":null,"failingSince":null,"secretRotating":false,"locations":[{"id":"y6Uneid43eiR","name":"Example Studio"}],"createdAt":"2026-01-12T10:00:00.000Z","updatedAt":"2026-01-12T10:00:00.000Z"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Webhook endpoint","tags":["Webhook endpoints"]},"patch":{"operationId":"IntegrationWebhooksApiController_update","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"example":{"id":"Jb3WqL9tZc6N","url":"https://app.example.com/hooks/rezonta","description":"Mobile app backend","events":["appointment.created","appointment.cancelled"],"isActive":false,"disabledReason":null,"failingSince":null,"secretRotating":false,"locations":[{"id":"y6Uneid43eiR","name":"Example Studio"}],"createdAt":"2026-01-12T10:00:00.000Z","updatedAt":"2026-01-14T08:30:00.000Z"}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Update a webhook endpoint","tags":["Webhook endpoints"]},"delete":{"operationId":"IntegrationWebhooksApiController_remove","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"deleted":true}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Delete a webhook endpoint","tags":["Webhook endpoints"]}},"/api/v1/integration/webhooks/{webhookId}/rotate-secret":{"post":{"operationId":"IntegrationWebhooksApiController_rotate","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"secret":"whsec_EXAMPLEnewSecret00000000000000","previousSecretValidUntil":"2026-01-16T10:00:00.000Z"}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Rotate the signing secret (old one valid 24 h)","tags":["Webhook endpoints"]}},"/api/v1/integration/webhooks/{webhookId}/test":{"post":{"description":"Sends a `ping` now and returns what the endpoint answered.","operationId":"IntegrationWebhooksApiController_test","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"ok":true,"responseCode":200,"error":null,"durationMs":182}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Send a test ping","tags":["Webhook endpoints"]}},"/api/v1/integration/webhooks/{webhookId}/deliveries":{"get":{"operationId":"IntegrationWebhooksApiController_deliveries","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":{"items":[{"id":"Qp6WzC1rMx8K","event":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.cancelled","resourceId":"CpsvnRZB4TuH"},"status":"succeeded","attempts":1,"responseCode":200,"lastError":null,"durationMs":143,"deliveredAt":"2026-01-18T14:03:12.000Z","nextAttemptAt":"2026-01-18T14:03:11.000Z","createdAt":"2026-01-18T14:03:11.000Z"}],"nextCursor":null}}}},"400":{"description":"`INVALID_CURSOR` — The `cursor` is not one this API returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_CURSOR":{"summary":"INVALID_CURSOR","value":{"error":{"code":"INVALID_CURSOR","message":"Malformed cursor — pass back the `nextCursor` value unchanged"}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Delivery log (30 days)","tags":["Webhook endpoints"]}},"/api/v1/integration/analytics/overview":{"get":{"description":"Revenue, visits, average ticket, new and returning clients, no-show and cancellation rates for a period.","operationId":"IntegrationAnalyticsController_overview","parameters":[{"name":"period","required":false,"in":"query","description":"Preset range in the location's time zone; wins over `from`/`to` unless `custom`. Default: the current month.","schema":{"type":"string","enum":["today","week","month","quarter","year","custom"]}},{"name":"from","required":false,"in":"query","description":"`YYYY-MM-DD`, inclusive. Used with `to` when `period` is omitted or `custom`.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"`YYYY-MM-DD`, inclusive.","schema":{"type":"string"}},{"name":"locationId","required":false,"in":"query","description":"Location publicId. Omit for every location the key may act in, summed.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAnalyticsOverviewDto"},"example":{"period":{"from":"2026-01-01T00:00:00.000Z","to":"2026-01-31T23:59:59.999Z"},"revenue":184500,"appointments":312,"avgTicket":591.35,"newClients":41,"returningClients":198,"noShows":9,"cancellations":17,"noShowRate":2.6,"cancellationRate":4.9,"onlineBookingShare":38.5}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Key figures","tags":["Analytics"]}},"/api/v1/integration/analytics/pnl":{"get":{"description":"Revenue − cost of goods − payroll − manual expenses for a period. Needs advanced analytics in the business’s plan.","operationId":"IntegrationAnalyticsController_pnl","parameters":[{"name":"period","required":false,"in":"query","description":"Preset range in the location's time zone; wins over `from`/`to` unless `custom`. Default: the current month.","schema":{"type":"string","enum":["today","week","month","quarter","year","custom"]}},{"name":"from","required":false,"in":"query","description":"`YYYY-MM-DD`, inclusive. Used with `to` when `period` is omitted or `custom`.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"`YYYY-MM-DD`, inclusive.","schema":{"type":"string"}},{"name":"locationId","required":false,"in":"query","description":"Location publicId. Omit for every location the key may act in, summed.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAnalyticsPnlDto"},"example":{"period":{"from":"2026-01-01T00:00:00.000Z","to":"2026-01-31T23:59:59.999Z"},"revenue":196300,"trainingRevenue":0,"cogs":21400,"grossProfit":174900,"grossMarginPct":89.1,"payroll":78500,"productSales":{"revenue":11800,"cogs":6900},"manualExpenses":{"total":32000,"byCategory":[{"category":"rent","total":25000},{"category":"utilities","total":7000}]},"operatingProfit":64400,"operatingMarginPct":32.8}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PLAN_FEATURE_REQUIRED` — The report needs a higher plan of the business (P&L — advanced analytics; RFM and LTV — full analytics).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PLAN_FEATURE_REQUIRED":{"summary":"PLAN_FEATURE_REQUIRED","value":{"error":{"code":"PLAN_FEATURE_REQUIRED","message":"The business's plan doesn't include this report"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Profit and loss","tags":["Analytics"]}},"/api/v1/integration/analytics/rfm":{"get":{"description":"Clients by recency, frequency and spend, from the nightly snapshot: segment counts for every client, the clients themselves in pages (`page`, `limit`, default 100). Needs full analytics in the business’s plan.","operationId":"IntegrationAnalyticsController_rfm","parameters":[{"name":"page","required":false,"in":"query","description":"1-based. Default 1.","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Clients per page. Default 100, at most 500.","schema":{"minimum":1,"maximum":500,"type":"number"}},{"name":"locationId","required":false,"in":"query","description":"Location publicId. Omit for every location the key may act in, summed.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAnalyticsRfmDto"},"example":{"summary":{"total":2,"bySegment":{"CHAMPIONS":1,"AT_RISK":1}},"clients":[{"clientId":"QFCsIZLzkuRI","name":"Ivan Petrenko","segment":"CHAMPIONS","recency":6,"frequency":14,"monetary":9800,"ltv":21400},{"clientId":"Hn5VbR8kTx2M","name":"Maria Shevchenko","segment":"AT_RISK","recency":96,"frequency":4,"monetary":2600,"ltv":7300}],"pagination":{"page":1,"limit":100,"total":2,"totalPages":1}}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PLAN_FEATURE_REQUIRED` — The report needs a higher plan of the business (P&L — advanced analytics; RFM and LTV — full analytics).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PLAN_FEATURE_REQUIRED":{"summary":"PLAN_FEATURE_REQUIRED","value":{"error":{"code":"PLAN_FEATURE_REQUIRED","message":"The business's plan doesn't include this report"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"RFM segments","tags":["Analytics"]}},"/api/v1/integration/analytics/ltv":{"get":{"description":"All-time spend per client: summary statistics and a histogram over every client, the clients by LTV in pages (`page`, `limit`, default 100). Needs full analytics in the business’s plan.","operationId":"IntegrationAnalyticsController_ltv","parameters":[{"name":"page","required":false,"in":"query","description":"1-based. Default 1.","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Clients per page. Default 100, at most 500.","schema":{"minimum":1,"maximum":500,"type":"number"}},{"name":"locationId","required":false,"in":"query","description":"Location publicId. Omit for every location the key may act in, summed.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAnalyticsLtvDto"},"example":{"stats":{"avg":3150.4,"median":1850,"p75":4200,"p90":8100,"max":21400,"total":1323168,"clientCount":420},"distribution":[{"bucket":"0–500","count":61},{"bucket":"500–1k","count":74},{"bucket":"1k–2.5k","count":118},{"bucket":"2.5k–5k","count":96},{"bucket":"5k–10k","count":52},{"bucket":"10k+","count":19}],"topClients":[{"clientId":"QFCsIZLzkuRI","name":"Ivan Petrenko","ltv":21400,"visits":31,"avgTicket":690.32}],"pagination":{"page":1,"limit":1,"total":420,"totalPages":420}}}}},"400":{"description":"`VALIDATION_FAILED` — A parameter or body field is missing or invalid — see `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"VALIDATION_FAILED":{"summary":"VALIDATION_FAILED","value":{"error":{"code":"VALIDATION_FAILED","message":"Request validation failed","details":["phone must be a valid phone number"]}}}}}}},"401":{"description":"`INVALID_API_KEY` — The `Authorization: Bearer` key is missing, malformed or unknown.\n\n`API_KEY_REVOKED` — The owner revoked the key. Ask them for a new one.\n\n`API_KEY_EXPIRED` — The key passed its expiry date. Ask the owner for a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"INVALID_API_KEY":{"summary":"INVALID_API_KEY","value":{"error":{"code":"INVALID_API_KEY","message":"Invalid API key"}}},"API_KEY_REVOKED":{"summary":"API_KEY_REVOKED","value":{"error":{"code":"API_KEY_REVOKED","message":"This API key was revoked"}}},"API_KEY_EXPIRED":{"summary":"API_KEY_EXPIRED","value":{"error":{"code":"API_KEY_EXPIRED","message":"This API key has expired"}}}}}}},"403":{"description":"`COMPANY_SUSPENDED` — The business account is suspended or closed.\n\n`INTEGRATION_ACCESS_REVOKED` — Access was never approved or Rezonta revoked it.\n\n`INTEGRATION_PLAN_REQUIRED` — The business moved to the free plan.\n\n`SCOPE_MISSING` — The key lacks a scope this endpoint needs — listed in `details.missing`.\n\n`LOCATION_NOT_ALLOWED` — The key is limited to other locations.\n\n`PLAN_FEATURE_REQUIRED` — The report needs a higher plan of the business (P&L — advanced analytics; RFM and LTV — full analytics).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"COMPANY_SUSPENDED":{"summary":"COMPANY_SUSPENDED","value":{"error":{"code":"COMPANY_SUSPENDED","message":"The business account is suspended or closed"}}},"INTEGRATION_ACCESS_REVOKED":{"summary":"INTEGRATION_ACCESS_REVOKED","value":{"error":{"code":"INTEGRATION_ACCESS_REVOKED","message":"API access is not active for this business. Ask the business owner to check Settings → Integrations → Rezonta API."}}},"INTEGRATION_PLAN_REQUIRED":{"summary":"INTEGRATION_PLAN_REQUIRED","value":{"error":{"code":"INTEGRATION_PLAN_REQUIRED","message":"The Integration API requires an active paid plan"}}},"SCOPE_MISSING":{"summary":"SCOPE_MISSING","value":{"error":{"code":"SCOPE_MISSING","message":"API key lacks required scope(s): appointments:write","details":{"missing":["appointments:write"]}}}},"LOCATION_NOT_ALLOWED":{"summary":"LOCATION_NOT_ALLOWED","value":{"error":{"code":"LOCATION_NOT_ALLOWED","message":"This API key is not allowed to act in this location"}}},"PLAN_FEATURE_REQUIRED":{"summary":"PLAN_FEATURE_REQUIRED","value":{"error":{"code":"PLAN_FEATURE_REQUIRED","message":"The business's plan doesn't include this report"}}}}}}},"404":{"description":"`NOT_FOUND` — No such resource in this business (or outside the key’s locations).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}}}},"429":{"description":"`RATE_LIMITED` — Too many requests for this key. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Rate limit exceeded: 600 requests per 60s for this key"}}}}}}}},"security":[{"integration-key":[]}],"summary":"Client lifetime value","tags":["Analytics"]}}},"webhooks":{"appointment.created":{"post":{"operationId":"webhook_appointment.created","summary":"Appointment created","description":"A new booking — in the CRM, on the booking page or through this API (`source.actor: integration` with your `keyId`, so you can skip your own).","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.created"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.created","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.updated":{"post":{"operationId":"webhook_appointment.updated","summary":"Appointment updated","description":"Time, master, services, price or notes changed. Replace your copy with `data`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.updated"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.updated","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"staff","keyId":null},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.status_changed":{"post":{"operationId":"webhook_appointment.status_changed","summary":"Appointment status changed","description":"Any status change except to `cancelled` (that one is `appointment.cancelled`), e.g. `scheduled` → `arrived` → `completed`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.status_changed"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"changes":{"type":"object","required":["previousStatus"],"properties":{"previousStatus":{"type":["string","null"],"description":"Status before the change."}}}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.status_changed","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"staff","keyId":null},"changes":{"previousStatus":"arrived"},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"completed","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[{"id":"Wn5HcR8kTq2M","staffId":"ZXzBkOjhlbcZ","rating":5,"comment":"Great haircut, thank you!","companyRating":5,"companyComment":null,"createdAt":"2026-01-20T12:15:00.000Z"}],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-20T12:15:00.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.cancelled":{"post":{"operationId":"webhook_appointment.cancelled","summary":"Appointment cancelled","description":"`source.actor` says who cancelled: `client`, `staff`, `system` (e.g. an unpaid prepayment expired) or `integration`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.cancelled"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"changes":{"type":"object","required":["previousStatus"],"properties":{"previousStatus":{"type":["string","null"],"description":"Status before the change."}}}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.cancelled","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"changes":{"previousStatus":"scheduled"},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"cancelled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.deleted":{"post":{"operationId":"webhook_appointment.deleted","summary":"Appointment deleted","description":"Hard-deleted in the CRM. `data` is the last snapshot; remove the appointment on your side.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.deleted"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.deleted","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"staff","keyId":null},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.client_confirmed":{"post":{"operationId":"webhook_appointment.client_confirmed","summary":"Client confirmed the visit","description":"The client tapped \"I'm coming\" (Telegram) or you called `POST /appointments/:id/confirm`. `data.clientConfirmedAt` is set.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.client_confirmed"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.client_confirmed","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.reminder_due":{"post":{"operationId":"webhook_appointment.reminder_due","summary":"Time to remind the client","description":"Sent **only** for clients whose notifications your app handles (`PUT /clients/:id/notifications { handledBy: \"app\" }`), at the moment Rezonta would have sent its own reminder. Push it to the client. `changes.offsetMinutes` is how long before the visit the rule fires.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.reminder_due"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"changes":{"type":"object","required":["offsetMinutes"],"properties":{"offsetMinutes":{"type":["integer","null"],"description":"Minutes before the start, e.g. `1440` (24 h) or `120`."}}}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.reminder_due","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"system","keyId":null},"changes":{"offsetMinutes":120},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"appointment.review_requested":{"post":{"operationId":"webhook_appointment.review_requested","summary":"Time to ask for a review","description":"Same rule as `appointment.reminder_due`: only for clients whose notifications your app handles. Ask the client to rate the visit and send it with `POST /appointments/:id/review`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"appointment.review_requested"},"data":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"appointment.review_requested","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"system","keyId":null},"data":{"id":"CpsvnRZB4TuH","externalId":null,"status":"completed","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":"2026-01-19T17:40:05.000Z","source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":false,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":false,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-20T12:15:00.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"payment.succeeded":{"post":{"operationId":"webhook_payment.succeeded","summary":"Online payment succeeded","description":"An online payment of a booking landed through the business's acquirer (WayForPay or monobank): a required prepayment, a payment the client chose when booking (`payment: \"full\"` or `\"deposit\"`), or one started later with `POST /appointments/:id/payment`. `data.appointment` is the booking after the payment was applied.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"payment.succeeded"},"data":{"$ref":"#/components/schemas/IntegrationPaymentEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"payment.succeeded","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"data":{"orderReference":"Pm7XkD2sVr4C","amount":300,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","appointment":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"partially_paid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":300,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"approved","amount":300,"refundedAmount":0,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"}}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"payment.refunded":{"post":{"operationId":"webhook_payment.refunded","summary":"Payment refunded","description":"Money of an online payment went back to the client — in full or in part. The payload is `payment.succeeded` plus `refund`; `refund.totalRefunded` equal to `amount` means nothing is left. `data.appointment` is the booking after the refund (`prepaidAmount` reduced; for a visit that has not happened yet `paymentStatus` becomes `partially_paid` while part of the price is still covered and `unpaid` once the whole prepayment went back). `source.actor` is `staff` for a refund from the CRM and `system` for one the business made in the acquirer's cabinet and for the automatic refund of a cancelled booking (client cancel or `POST /appointments/:id/cancel` at least `appointmentPayment.autoRefundOnClientCancel.hoursBefore` hours before the start; its outcome is also `autoRefund` in the cancel response). Otherwise only staff start refunds — there is no API endpoint for it. Your app also gets `appointment.updated`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"payment.refunded"},"data":{"$ref":"#/components/schemas/IntegrationRefundEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"payment.refunded","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"staff","keyId":null},"data":{"orderReference":"Pm7XkD2sVr4C","amount":300,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","appointment":{"id":"CpsvnRZB4TuH","externalId":null,"status":"scheduled","paymentStatus":"unpaid","startTime":"2026-01-20T08:00:00.000Z","endTime":"2026-01-20T09:30:00.000Z","durationMin":90,"location":{"id":"y6Uneid43eiR","name":"Example Studio","timeZone":"Europe/Kyiv"},"client":{"id":"QFCsIZLzkuRI","firstName":"Ivan","lastName":"Petrenko","phone":"+380990000000","anonymized":false},"staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"bundle":null,"services":[{"id":"rO3V8CUy88bx","name":"Haircut","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":0,"durationMin":60,"price":540,"priceBeforeDiscount":600,"discountAmount":60},{"id":"Lq8TzW3nKp5D","name":"Beard trim","staff":{"id":"ZXzBkOjhlbcZ","firstName":"Olena","lastName":"Koval","avatarUrl":"https://cdn.example.com/staff/ZXzBkOjhlbcZ.jpg"},"startOffsetMin":60,"durationMin":30,"price":270,"priceBeforeDiscount":300,"discountAmount":30}],"currency":"UAH","price":810,"priceBeforeDiscount":900,"discountAmount":90,"discountSource":"category","prepaidAmount":null,"payments":[{"orderReference":"Pm7XkD2sVr4C","status":"refunded","amount":300,"refundedAmount":300,"currency":"UAH","paidAt":"2026-01-15T09:02:41.000Z","createdAt":"2026-01-15T09:01:12.000Z"}],"notes":null,"clientConfirmedAt":null,"source":"integration","isTraining":false,"reviews":[],"selfService":{"canCancel":true,"cancelDeadline":"2026-01-19T08:00:00.000Z","canReschedule":true,"rescheduleDeadline":"2026-01-19T08:00:00.000Z","reschedulesLeft":2},"createdAt":"2026-01-15T09:01:10.000Z","updatedAt":"2026-01-15T09:02:41.000Z"},"refund":{"id":"Rf3kQ9mX2bLp","amount":300,"reason":"Client cancelled two days ahead","refundedAt":"2026-01-16T11:20:05.000Z","totalRefunded":300}}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"review.created":{"post":{"operationId":"webhook_review.created","summary":"Review left","description":"One event per review: a visit with several masters (\"4/6 hands\") gets one per master.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"review.created"},"data":{"$ref":"#/components/schemas/IntegrationReviewEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"review.created","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"data":{"id":"Wn5HcR8kTq2M","appointmentId":"CpsvnRZB4TuH","clientId":"QFCsIZLzkuRI","staffId":"ZXzBkOjhlbcZ","traineeId":null,"isTraining":false,"rating":5,"comment":"Great haircut, thank you!","companyRating":5,"companyComment":null,"createdAt":"2026-01-20T12:15:00.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"client.created":{"post":{"operationId":"webhook_client.created","summary":"Client card created","description":"A new card in a location — through `POST /clients` or the first booking there. One person (phone) has a card per location.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"client.created"},"data":{"$ref":"#/components/schemas/IntegrationClientEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"client.created","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"client","keyId":null},"data":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"email":"ivan@example.com","birthDate":"1992-05-14T00:00:00.000Z","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":false,"location":{"id":"y6Uneid43eiR"},"updatedAt":"2026-01-15T09:01:10.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"client.updated":{"post":{"operationId":"webhook_client.updated","summary":"Client card updated","description":"Profile or marketing consent changed. `data` is the card; `GET /clients/:clientId` returns the person across all their cards.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"client.updated"},"data":{"$ref":"#/components/schemas/IntegrationClientEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"client.updated","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"staff","keyId":null},"data":{"id":"QFCsIZLzkuRI","phone":"+380990000000","firstName":"Ivan","lastName":"Petrenko","patronymic":null,"email":"ivan@example.com","birthDate":"1992-05-14T00:00:00.000Z","sex":"male","locale":"uk","photoUrl":null,"marketingOptOut":true,"location":{"id":"y6Uneid43eiR"},"updatedAt":"2026-01-15T09:01:10.000Z"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"client.anonymized":{"post":{"operationId":"webhook_client.anonymized","summary":"Client card anonymized","description":"The personal data of the card was erased at the client's request — usually your own `POST /clients/:clientId/anonymize` from \"delete account\". Delete what you stored about this card. Its appointments stay (as history of an anonymous client); the person is no longer found by phone, and a new booking with that phone creates a new card.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"client.anonymized"},"data":{"$ref":"#/components/schemas/IntegrationAnonymizedClientEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":1042,"type":"client.anonymized","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":"y6Uneid43eiR","source":{"actor":"integration","keyId":"pRXHzQcNpbyz"},"data":{"id":"QFCsIZLzkuRI","anonymizedAt":"2026-01-21T09:12:44.000Z","location":{"id":"y6Uneid43eiR"}}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}},"ping":{"post":{"operationId":"webhook_ping","summary":"Test event","description":"Sent by \"Send test event\" in settings or `POST /webhooks/:id/test`. Never in the feed; `seq` is `0`.","parameters":[{"name":"Rezonta-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. During a secret rotation there are two `v1` values — accept either. Reject if `t` is more than 5 minutes off.","schema":{"type":"string"}},{"name":"Rezonta-Event-Id","in":"header","required":true,"description":"Same as `id` in the body. Deduplicate on it.","schema":{"type":"string"}},{"name":"Rezonta-Event-Type","in":"header","required":true,"description":"Same as `type` in the body.","schema":{"type":"string"}},{"name":"Rezonta-Delivery-Id","in":"header","required":true,"description":"This delivery attempt series; differs per endpoint.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"},{"type":"object","required":["data"],"properties":{"type":{"type":"string","const":"ping"},"data":{"$ref":"#/components/schemas/IntegrationPingEventDataDto"}}}]},"example":{"id":"39783e15-6159-454f-8a99-3784e8c591e8","seq":0,"type":"ping","version":1,"occurredAt":"2026-01-18T14:03:11.000Z","locationId":null,"source":{"actor":"staff","keyId":null},"data":{"message":"Test event from Rezonta"}}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the event. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h; an endpoint failing for 3 days is switched off. Missed events stay in `GET /integration/events` for 30 days."}}}}},"components":{"securitySchemes":{"integration-key":{"type":"http","scheme":"bearer","bearerFormat":"rz_live_…","description":"Integration API key, created by the business owner in Rezonta (Settings → Integrations → Rezonta API) after access is approved."}},"schemas":{"CreateIntegrationClientDto":{"type":"object","properties":{"locationId":{"type":"string","description":"Location publicId the card belongs to."},"phone":{"type":"string","description":"Any format; normalized to E.164.","maxLength":32},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":["string","null"],"maxLength":100},"patronymic":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"maxLength":254,"format":"email"},"birthDate":{"type":["string","null"],"description":"YYYY-MM-DD"},"sex":{"type":["string","null"],"enum":["male","female",null]},"locale":{"type":["string","null"],"description":"Notification language, e.g. \"uk\", \"en\".","maxLength":5}},"required":["locationId","phone","firstName"]},"CreatePublicAppointmentDto":{"type":"object","properties":{"serviceId":{"type":"string"},"services":{"minItems":1,"type":"array","items":{"type":"string","maxLength":64}},"staffId":{"type":"string"},"positions":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/PublicPositionDto"}},"bundleId":{"type":"string","description":"Bundle being booked — makes the package price authoritative."},"trainingOfferingId":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"notes":{"type":"string","maxLength":500},"client":{"$ref":"#/components/schemas/PublicClientDto"},"payment":{"description":"What the client chose to pay online now (ONLINE_APPOINTMENT_PAYMENT_PLAN,\nstage 3). The amount is always computed on the server. By the location's\neffective mode: `optional` — `later` (default) or `full`; `required` —\n`deposit` (default) or `full`; `off` — ignored. Anything else for the\nmode is 400 PAYMENT_OPTION_UNAVAILABLE.","enum":["later","deposit","full"],"type":"string"},"acceptedPrepaymentPercent":{"type":"number","description":"The prepayment share the client was shown in the PREPAYMENT_REQUIRED\nanswer and agreed to (CLIENT_PREPAYMENT_REQUIREMENT_PLAN). The server\ncharges its own figure; a mismatch (the rule changed meanwhile) answers\n409 PREPAYMENT_REQUIRED again instead of charging an unseen amount.\nIgnored when `acceptedPrepaymentAmount` is sent.","minimum":1,"maximum":100},"acceptedPrepaymentAmount":{"type":"number","description":"The prepayment amount (`amount` of the PREPAYMENT_REQUIRED answer) the\nclient agreed to, in the location's currency. Takes precedence over\n`acceptedPrepaymentPercent`: a different amount answers 409 again.","minimum":0.01,"maximum":1000000000},"locale":{"description":"Payer locale — WayForPay form language + payment return URL prefix.","enum":["uk","en"],"type":"string"},"channel":{"type":"string","description":"Entry point of the storefront: `widget` = the booking widget embedded on\nthe business's own site (`widget.js`). Stored as `bookingSourceId` so the\nchannel analytics see the widget apart from the plain booking link.","enum":["widget"]},"captchaToken":{"type":"string"}},"required":["serviceId","date","time","client"]},"CreatePublicReviewDto":{"type":"object","properties":{"staff":{"description":"Per-master ratings. Takes precedence over the flat `rating`/`comment`,\nwhich stay supported for single-master bookings (and older clients).","minItems":1,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/StaffReviewItemDto"}},"rating":{"type":"number","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":1000},"companyRating":{"type":"number","description":"One venue rating per booking, regardless of how many masters served it.","minimum":1,"maximum":5},"companyComment":{"type":"string","maxLength":1000}}},"IntegrationAnalyticsLtvDto":{"type":"object","properties":{"stats":{"$ref":"#/components/schemas/IntegrationLtvStatsDto"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationLtvBucketDto"}},"topClients":{"description":"One page of the clients with a completed visit, by LTV, highest first.","type":"array","items":{"$ref":"#/components/schemas/IntegrationLtvClientDto"}},"pagination":{"$ref":"#/components/schemas/IntegrationAnalyticsPaginationDto"}},"required":["stats","distribution","topClients","pagination"]},"IntegrationAnalyticsOverviewDto":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/IntegrationAnalyticsPeriodDto"},"revenue":{"type":"number","description":"Completed visits, in the location's currency."},"appointments":{"type":"number","description":"Completed visits."},"avgTicket":{"type":"number"},"newClients":{"type":"number","description":"Clients whose first visit falls in the range."},"returningClients":{"type":"number"},"noShows":{"type":"number"},"cancellations":{"type":"number"},"noShowRate":{"type":"number","description":"Percent, one decimal: no-shows / (completed + no-shows). Of the visits\nwhose outcome is known; future and cancelled bookings are not in the base.\n(Before 2026-11 the base was all appointments of the range.)"},"cancellationRate":{"type":"number","description":"Percent, one decimal: cancelled / all appointments of the range."},"onlineBookingShare":{"type":"number","description":"Percent of completed visits booked online (storefront or your app)."}},"required":["period","revenue","appointments","avgTicket","newClients","returningClients","noShows","cancellations","noShowRate","cancellationRate","onlineBookingShare"]},"IntegrationAnalyticsPaginationDto":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number","description":"Clients in the whole list (every page)."},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]},"IntegrationAnalyticsPeriodDto":{"type":"object","properties":{"from":{"format":"date-time","type":"string","description":"Start of the range as the location's wall-clock time: `…T00:00:00.000Z` is midnight there — read the `Z` as nominal."},"to":{"format":"date-time","type":"string","description":"End of the range, same convention."}},"required":["from","to"]},"IntegrationAnalyticsPnlDto":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/IntegrationAnalyticsPeriodDto"},"revenue":{"type":"number","description":"Services, products and training-course payments together."},"trainingRevenue":{"type":"number","description":"Training-course payments minus refunds, already included in `revenue`.\nPresent only when the business has the training add-on."},"cogs":{"type":"number","description":"Materials used in services plus the cost of products sold."},"grossProfit":{"type":"number"},"grossMarginPct":{"type":"number"},"payroll":{"type":"number","description":"Staff pay accrued for the range: per-visit commissions plus fixed pay\n(monthly salary or per-shift rate), progressive-scale top-ups and the\nmentor's share of training-course payments (net of refunds). A\nmonthly salary and a top-up are accrued month-to-date as one line per\nmonth, dated the last accrued day — query whole calendar months for\nexact figures; shorter ranges may include them in full."},"productSales":{"$ref":"#/components/schemas/IntegrationProductSalesDto"},"manualExpenses":{"description":"Expenses entered by hand (rent, utilities, …).","allOf":[{"$ref":"#/components/schemas/IntegrationManualExpensesDto"}]},"operatingProfit":{"type":"number"},"operatingMarginPct":{"type":"number"}},"required":["period","revenue","cogs","grossProfit","grossMarginPct","payroll","productSales","manualExpenses","operatingProfit","operatingMarginPct"]},"IntegrationAnalyticsRfmDto":{"type":"object","properties":{"summary":{"description":"Every client of the scope, not just this page.","allOf":[{"$ref":"#/components/schemas/IntegrationRfmSummaryDto"}]},"clients":{"description":"One page, sorted by `monetary`, highest first.","type":"array","items":{"$ref":"#/components/schemas/IntegrationRfmClientDto"}},"pagination":{"$ref":"#/components/schemas/IntegrationAnalyticsPaginationDto"}},"required":["summary","clients","pagination"]},"IntegrationAnonymizedClientEventDataDto":{"type":"object","properties":{"id":{"type":"string","description":"Client card publicId — still valid for its appointments' history."},"anonymizedAt":{"format":"date-time","type":"string"},"location":{"$ref":"#/components/schemas/IntegrationEventLocationRefDto"}},"required":["id","anonymizedAt","location"]},"IntegrationAppointmentClientDto":{"type":"object","properties":{"id":{"type":"string","description":"Client card publicId — usable in every `/clients/:clientId` route."},"firstName":{"type":"string"},"lastName":{"type":["string","null"]},"phone":{"type":["string","null"],"description":"E.164; `null` once the client was anonymized."},"anonymized":{"type":"boolean","description":"The client's personal data was erased (`client.anonymized`)."}},"required":["id","firstName","lastName","phone","anonymized"]},"IntegrationAppointmentDto":{"type":"object","properties":{"id":{"type":"string","description":"Appointment publicId."},"externalId":{"type":["number","null"],"description":"Id in the source system for imported appointments — to match legacy data."},"status":{"type":"string","description":"`scheduled`, `arrived`, `completed`, `cancelled`, `no-show`."},"paymentStatus":{"type":"string","description":"`unpaid`; `pending` (the booking waits for a required online prepayment);\n`partially_paid` (before the visit, part of the price is covered by an\nonline prepayment and/or a certificate — see `prepaidAmount`; added\n2026-10, treat unknown values like `unpaid`); `paid` (completed, or the\nwhole price was covered before the visit)."},"startTime":{"format":"date-time","type":"string","description":"UTC."},"endTime":{"format":"date-time","type":"string"},"durationMin":{"type":["number","null"]},"location":{"$ref":"#/components/schemas/IntegrationAppointmentLocationDto"},"client":{"$ref":"#/components/schemas/IntegrationAppointmentClientDto"},"staff":{"description":"Lead master; per-line masters are in `services[].staff`.","anyOf":[{"$ref":"#/components/schemas/IntegrationStaffRefDto"},{"type":"null"}]},"bundle":{"description":"Set when booked as a bundle (complex).","anyOf":[{"$ref":"#/components/schemas/IntegrationNamedRefDto"},{"type":"null"}]},"services":{"description":"One line per service, in order.","type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentServiceDto"}},"currency":{"type":"string","description":"ISO 4217 of every amount in the appointment."},"price":{"type":["number","null"],"description":"Total after discount."},"priceBeforeDiscount":{"type":["number","null"]},"discountAmount":{"type":["number","null"]},"discountSource":{"type":["string","null"],"description":"`client`, `category`, `segment`, `campaign`, `manual` (price typed by hand — final, no loyalty discount), `subscription`, `certificate`, `none`."},"prepaidAmount":{"type":["number","null"]},"payments":{"description":"Online payments (WayForPay), oldest first.","type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentPaymentDto"}},"notes":{"type":["string","null"]},"clientConfirmedAt":{"format":"date-time","type":["string","null"],"description":"When the client confirmed the visit (\"I'm coming\")."},"source":{"type":"string","description":"`admin` (CRM), `public_booking` (website), `integration` (an API key), `import`."},"isTraining":{"type":"boolean","description":"A training session with a trainee."},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentReviewDto"}},"selfService":{"$ref":"#/components/schemas/IntegrationSelfServiceDto"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","externalId","status","paymentStatus","startTime","endTime","durationMin","location","client","staff","bundle","services","currency","price","priceBeforeDiscount","discountAmount","discountSource","prepaidAmount","payments","notes","clientConfirmedAt","source","isTraining","reviews","selfService","createdAt","updatedAt"]},"IntegrationAppointmentLocationDto":{"type":"object","properties":{"id":{"type":"string","description":"Location publicId."},"name":{"type":"string"},"timeZone":{"type":"string","description":"IANA zone, e.g. `Europe/Kyiv`. Times are UTC; show them in this zone."}},"required":["id","name","timeZone"]},"IntegrationAppointmentPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentDto"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}},"required":["items","nextCursor"]},"IntegrationAppointmentPaymentDto":{"type":"object","properties":{"orderReference":{"type":"string"},"status":{"type":"string","description":"`refunded` only once everything went back; a partial refund stays `approved`.","enum":["pending","refunded","approved","declined","expired"]},"amount":{"type":"number"},"refundedAmount":{"type":"number","description":"Returned to the client so far (0 when nothing was refunded)."},"currency":{"type":"string"},"paidAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["orderReference","status","amount","refundedAmount","currency","paidAt","createdAt"]},"IntegrationAppointmentReviewDto":{"type":"object","properties":{"id":{"type":"string","description":"Review publicId."},"staffId":{"type":["string","null"],"description":"The reviewed master; null for a review of the business only."},"rating":{"type":["number","null"],"description":"1–5."},"comment":{"type":["string","null"]},"companyRating":{"type":["number","null"],"description":"1–5, the business as a whole."},"companyComment":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","staffId","rating","comment","companyRating","companyComment","createdAt"]},"IntegrationAppointmentServiceDto":{"type":"object","properties":{"id":{"type":"string","description":"Service publicId."},"name":{"type":"string"},"staff":{"description":"Who performs this service — differs per line in «4/6 hands» bundles.","anyOf":[{"$ref":"#/components/schemas/IntegrationStaffRefDto"},{"type":"null"}]},"startOffsetMin":{"type":"number","description":"Minutes from the appointment start; equal offsets run in parallel."},"durationMin":{"type":["number","null"]},"price":{"type":["number","null"],"description":"After discount."},"priceBeforeDiscount":{"type":["number","null"]},"discountAmount":{"type":["number","null"]}},"required":["id","name","staff","startOffsetMin","durationMin","price","priceBeforeDiscount","discountAmount"]},"IntegrationAutoRefundDto":{"type":"object","properties":{"decision":{"description":"`nothing_paid` — no online money on the booking; `disabled` — the business\nswitched automatic refunds off (refunded by hand in the CRM); `too_late` —\ncancelled later than `appointmentPayment.autoRefundOnClientCancel.\nhoursBefore` before the start (refunded by hand); `refunded` — a refund\nof every online payment was started through the acquirer (see each\n`refunds[].status`); `refund_failed` — refunds were attempted, but every\none failed or could not start: nothing went back, the business refunds\nby hand.","enum":["nothing_paid","disabled","too_late","refunded","refund_failed"],"type":"string"},"refunds":{"description":"One entry per payment a refund was attempted for; empty unless `decision`\nis `refunded` or `refund_failed`.","type":"array","items":{"$ref":"#/components/schemas/IntegrationAutoRefundItemDto"}},"hoursBefore":{"type":["number","null"],"description":"Whole hours between the cancel and the start; only for `too_late`."}},"required":["decision","refunds","hoursBefore"]},"IntegrationAutoRefundItemDto":{"type":"object","properties":{"status":{"description":"`succeeded` — the money went back (a `payment.refunded` event follows);\n`pending` / `unknown` — in progress, the final state arrives with the\nevent; `failed` / `not_started` — nothing went back, the business decides.","enum":["pending","succeeded","failed","unknown","not_started"],"type":"string"},"id":{"type":["string","null"],"description":"Refund id; `null` when it could not be started."},"amount":{"type":"number"},"currency":{"type":"string"}},"required":["status","id","amount","currency"]},"IntegrationBookingPaymentDto":{"type":"object","properties":{"provider":{"description":"Acquirer the business uses at this location.","enum":["wayforpay","monobank","liqpay"],"type":"string"},"form":{"description":"WayForPay: POST form. null for providers that take a redirect.","anyOf":[{"$ref":"#/components/schemas/IntegrationPaymentFormDto"},{"type":"null"}]},"redirectUrl":{"type":["string","null"],"description":"Plata by mono: open this URL (GET) in a browser/WebView. null for WayForPay."},"orderReference":{"type":"string","description":"Track it with `GET /payments/{orderReference}` or the `payment.succeeded` event."}},"required":["provider","form","redirectUrl","orderReference"]},"IntegrationBookingResultDto":{"type":"object","properties":{"appointment":{"$ref":"#/components/schemas/IntegrationAppointmentDto"},"payment":{"description":"The checkout to open for the client, when the booking started one: a\nrequired prepayment / deposit, or `payment: \"full\"` chosen where payment\nis optional (see `appointmentPayment` of the location). `null` for a\nbooking paid on site, for a client the business exempted from prepayment\n(even where the location requires one), and when `paymentStartFailed` is\ntrue.","anyOf":[{"$ref":"#/components/schemas/IntegrationBookingPaymentDto"},{"type":"null"}]},"paymentStartFailed":{"type":"boolean","description":"`true` when the client chose to pay online but the checkout could not be\nstarted (acquirer unavailable, no exchange rate…). The booking is created\nand stays unpaid; start a payment later with\n`POST /appointments/{appointmentId}/payment`. Always `false` when the\nclient chose not to pay."}},"required":["appointment","payment","paymentStartFailed"]},"IntegrationCancelResultDto":{"type":"object","properties":{"autoRefund":{"description":"Outcome of the automatic refund; `null` when it could not be determined\n(the cancel itself still happened — check the payment in the CRM).","anyOf":[{"$ref":"#/components/schemas/IntegrationAutoRefundDto"},{"type":"null"}]},"id":{"type":"string","description":"Appointment publicId."},"externalId":{"type":["number","null"],"description":"Id in the source system for imported appointments — to match legacy data."},"status":{"type":"string","description":"`scheduled`, `arrived`, `completed`, `cancelled`, `no-show`."},"paymentStatus":{"type":"string","description":"`unpaid`; `pending` (the booking waits for a required online prepayment);\n`partially_paid` (before the visit, part of the price is covered by an\nonline prepayment and/or a certificate — see `prepaidAmount`; added\n2026-10, treat unknown values like `unpaid`); `paid` (completed, or the\nwhole price was covered before the visit)."},"startTime":{"format":"date-time","type":"string","description":"UTC."},"endTime":{"format":"date-time","type":"string"},"durationMin":{"type":["number","null"]},"location":{"$ref":"#/components/schemas/IntegrationAppointmentLocationDto"},"client":{"$ref":"#/components/schemas/IntegrationAppointmentClientDto"},"staff":{"description":"Lead master; per-line masters are in `services[].staff`.","anyOf":[{"$ref":"#/components/schemas/IntegrationStaffRefDto"},{"type":"null"}]},"bundle":{"description":"Set when booked as a bundle (complex).","anyOf":[{"$ref":"#/components/schemas/IntegrationNamedRefDto"},{"type":"null"}]},"services":{"description":"One line per service, in order.","type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentServiceDto"}},"currency":{"type":"string","description":"ISO 4217 of every amount in the appointment."},"price":{"type":["number","null"],"description":"Total after discount."},"priceBeforeDiscount":{"type":["number","null"]},"discountAmount":{"type":["number","null"]},"discountSource":{"type":["string","null"],"description":"`client`, `category`, `segment`, `campaign`, `manual` (price typed by hand — final, no loyalty discount), `subscription`, `certificate`, `none`."},"prepaidAmount":{"type":["number","null"]},"payments":{"description":"Online payments (WayForPay), oldest first.","type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentPaymentDto"}},"notes":{"type":["string","null"]},"clientConfirmedAt":{"format":"date-time","type":["string","null"],"description":"When the client confirmed the visit (\"I'm coming\")."},"source":{"type":"string","description":"`admin` (CRM), `public_booking` (website), `integration` (an API key), `import`."},"isTraining":{"type":"boolean","description":"A training session with a trainee."},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationAppointmentReviewDto"}},"selfService":{"$ref":"#/components/schemas/IntegrationSelfServiceDto"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["autoRefund","id","externalId","status","paymentStatus","startTime","endTime","durationMin","location","client","staff","bundle","services","currency","price","priceBeforeDiscount","discountAmount","discountSource","prepaidAmount","payments","notes","clientConfirmedAt","source","isTraining","reviews","selfService","createdAt","updatedAt"]},"IntegrationCardLocationDto":{"type":"object","properties":{"id":{"type":"string","description":"Location publicId."},"name":{"type":"string"}},"required":["id","name"]},"IntegrationClientAnonymizeResultDto":{"type":"object","properties":{"anonymizedCards":{"type":"number","description":"Cards (one per location) whose personal data was erased."}},"required":["anonymizedCards"]},"IntegrationClientCardDto":{"type":"object","properties":{"id":{"type":"string","description":"Card publicId."},"location":{"$ref":"#/components/schemas/IntegrationCardLocationDto"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","location","createdAt"]},"IntegrationClientCreateResultDto":{"type":"object","properties":{"created":{"type":"boolean","description":"`false` — the card already existed and was returned untouched."},"client":{"$ref":"#/components/schemas/IntegrationPersonDto"}},"required":["created","client"]},"IntegrationClientEventDataDto":{"type":"object","properties":{"sex":{"type":["string","null"],"enum":["male","female",null]},"id":{"type":"string","description":"Client card publicId. One person (phone) has a card per location;\n`GET /integration/clients/:clientId` returns the person across all of them."},"phone":{"type":"string","description":"E.164."},"firstName":{"type":"string"},"lastName":{"type":["string","null"]},"patronymic":{"type":["string","null"]},"email":{"type":["string","null"]},"birthDate":{"format":"date-time","type":["string","null"],"description":"Date only (time is always 00:00 UTC)."},"locale":{"type":["string","null"],"description":"Language for notifications, e.g. `uk`, `en`."},"photoUrl":{"type":["string","null"]},"marketingOptOut":{"type":"boolean","description":"Opted out of marketing messages."},"location":{"$ref":"#/components/schemas/IntegrationEventLocationRefDto"},"updatedAt":{"format":"date-time","type":"string"}},"required":["sex","id","phone","firstName","lastName","patronymic","email","birthDate","locale","photoUrl","marketingOptOut","location","updatedAt"]},"IntegrationError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine code — branch on it. Messages may change."},"message":{"type":"string","description":"Human-readable, English."},"details":{"description":"`VALIDATION_FAILED`: list of field errors. `SCOPE_MISSING`: `{ missing: [...] }`."}}}}},"IntegrationEventEnvelopeDto":{"type":"object","properties":{"type":{"description":"`ping` is only sent by \"send test event\" and never enters the feed.","enum":["appointment.created","appointment.updated","appointment.status_changed","appointment.cancelled","appointment.deleted","appointment.client_confirmed","appointment.reminder_due","appointment.review_requested","payment.succeeded","payment.refunded","review.created","client.created","client.updated","client.anonymized","ping"],"type":"string"},"changes":{"type":"object","additionalProperties":true,"description":"Type-specific extras, e.g. `{ \"previousStatus\": \"scheduled\" }` or `{ \"offsetMinutes\": 120 }`."},"data":{"type":"object","description":"The resource after the change: an appointment (`appointment.*`), a client (`client.*`), a review or a payment — same shapes as the REST responses.","additionalProperties":true},"id":{"type":"string","description":"Unique event id — deduplicate on it (delivery is at-least-once)."},"seq":{"type":"number","description":"Monotonic sequence. Per resource, ignore an event whose `seq` is lower than the last one you applied."},"version":{"type":"number","description":"Payload version of this event type."},"occurredAt":{"type":"string","description":"ISO 8601, UTC."},"locationId":{"type":["string","null"],"description":"Location publicId, or null for company-wide resources."},"source":{"$ref":"#/components/schemas/IntegrationEventSourceDto"}},"required":["type","data","id","seq","version","occurredAt","locationId","source"]},"IntegrationEventFeedPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEventEnvelopeDto"}},"nextAfter":{"type":"string","description":"Pass as `after` for the next call; store it as your checkpoint."},"hasMore":{"type":"boolean"}},"required":["items","nextAfter","hasMore"]},"IntegrationEventLocationRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Location publicId."}},"required":["id"]},"IntegrationEventSourceDto":{"type":"object","properties":{"actor":{"type":"string","description":"Who caused the change: `client`, `staff`, `system` or `integration`."},"keyId":{"type":["string","null"],"description":"API key publicId when the change came through the Integration API."}},"required":["actor","keyId"]},"IntegrationExpenseCategoryDto":{"type":"object","properties":{"category":{"type":"string"},"total":{"type":"number"}},"required":["category","total"]},"IntegrationLtvBucketDto":{"type":"object","properties":{"bucket":{"type":"string","description":"e.g. `1k–2.5k`."},"count":{"type":"number"}},"required":["bucket","count"]},"IntegrationLtvClientDto":{"type":"object","properties":{"clientId":{"type":"string","description":"Client card publicId."},"name":{"type":"string"},"ltv":{"type":"number"},"visits":{"type":"number"},"avgTicket":{"type":"number"}},"required":["clientId","name","ltv","visits","avgTicket"]},"IntegrationLtvStatsDto":{"type":"object","properties":{"avg":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"max":{"type":"number"},"total":{"type":"number"},"clientCount":{"type":"number"}},"required":["avg","median","p75","p90","max","total","clientCount"]},"IntegrationManualExpensesDto":{"type":"object","properties":{"total":{"type":"number"},"byCategory":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationExpenseCategoryDto"}}},"required":["total","byCategory"]},"IntegrationMoneyDto":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217."},"amount":{"type":"number"}},"required":["currency","amount"]},"IntegrationNamedRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"IntegrationPaymentEventDataDto":{"type":"object","properties":{"orderReference":{"type":"string","description":"WayForPay order reference — the same value `POST /appointments/:id/payment` returned."},"amount":{"type":"number"},"currency":{"type":"string","description":"ISO 4217, e.g. `UAH`."},"paidAt":{"format":"date-time","type":["string","null"]},"appointment":{"description":"The booking after the payment was applied (`paymentStatus`, `payments`).","allOf":[{"$ref":"#/components/schemas/IntegrationAppointmentDto"}]}},"required":["orderReference","amount","currency","paidAt","appointment"]},"IntegrationPaymentFormDto":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"POST these as form fields to `url` (e.g. an auto-submitting form in a WebView). Keys ending in `[]` are arrays."},"url":{"type":"string","description":"WayForPay checkout URL."}},"required":["fields","url"]},"IntegrationPersonDto":{"type":"object","properties":{"id":{"type":"string","description":"Oldest card's publicId — stable for the person while that card exists. Any card id works in `/clients/:clientId`."},"phone":{"type":"string","description":"E.164."},"firstName":{"type":"string"},"lastName":{"type":["string","null"]},"patronymic":{"type":["string","null"]},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"birthDate":{"type":["string","null"],"description":"YYYY-MM-DD."},"sex":{"type":["string","null"],"description":"`male`, `female` or null."},"locale":{"type":["string","null"],"description":"Notification language, e.g. `uk`, `en`."},"photoUrl":{"type":["string","null"]},"marketingOptOut":{"type":"boolean","description":"Opted out of marketing in any location."},"marketingOptOutAt":{"format":"date-time","type":["string","null"]},"telegramLinked":{"type":"boolean","description":"The client receives notifications from the Rezonta Telegram bot."},"notifications":{"$ref":"#/components/schemas/IntegrationPersonNotificationsDto"},"stats":{"$ref":"#/components/schemas/IntegrationPersonStatsDto"},"cards":{"description":"One card per location the person has been a client of.","type":"array","items":{"$ref":"#/components/schemas/IntegrationClientCardDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["id","phone","firstName","lastName","patronymic","displayName","email","birthDate","sex","locale","photoUrl","marketingOptOut","marketingOptOutAt","telegramLinked","notifications","stats","cards","createdAt"]},"IntegrationPersonNotificationsDto":{"type":"object","properties":{"handledBy":{"type":"string","description":"Who notifies the client: your app (`app`) or Rezonta (`rezonta`).","enum":["app","rezonta"]},"since":{"format":"date-time","type":["string","null"]},"appActive":{"type":"boolean","description":"Whether Rezonta is silent for this client right now. `false` while\n`handledBy` is `app` means a safety net kicked in (key revoked, no active\nwebhook for `appointment.reminder_due`…) and Rezonta notifies again."}},"required":["handledBy","since","appActive"]},"IntegrationPersonStatsDto":{"type":"object","properties":{"visitsCount":{"type":"number","description":"Completed visits across all cards."},"totalSpent":{"description":"Per currency: locations of one business may price differently.","type":"array","items":{"$ref":"#/components/schemas/IntegrationMoneyDto"}},"firstVisitAt":{"format":"date-time","type":["string","null"]},"lastVisitAt":{"format":"date-time","type":["string","null"]},"upcomingCount":{"type":"number","description":"Scheduled visits still ahead."}},"required":["visitsCount","totalSpent","firstVisitAt","lastVisitAt","upcomingCount"]},"IntegrationPingEventDataDto":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"IntegrationProductSalesDto":{"type":"object","properties":{"revenue":{"type":"number"},"cogs":{"type":"number"}},"required":["revenue","cogs"]},"IntegrationRefundDto":{"type":"object","properties":{"id":{"type":"string","description":"Refund id."},"amount":{"type":"number","description":"Returned by this refund."},"reason":{"type":"string","description":"Why, as entered by staff (or `WayForPay` for a refund made in the WayForPay cabinet)."},"refundedAt":{"format":"date-time","type":["string","null"]},"totalRefunded":{"type":"number","description":"Returned on this payment so far, this refund included. Equal to `amount` of the payment = fully refunded."}},"required":["id","amount","reason","refundedAt","totalRefunded"]},"IntegrationRefundEventDataDto":{"type":"object","properties":{"orderReference":{"type":"string","description":"WayForPay order reference — the same value `POST /appointments/:id/payment` returned."},"amount":{"type":"number"},"currency":{"type":"string","description":"ISO 4217, e.g. `UAH`."},"paidAt":{"format":"date-time","type":["string","null"]},"appointment":{"description":"The booking after the payment was applied (`paymentStatus`, `payments`).","allOf":[{"$ref":"#/components/schemas/IntegrationAppointmentDto"}]},"refund":{"$ref":"#/components/schemas/IntegrationRefundDto"}},"required":["orderReference","amount","currency","paidAt","appointment","refund"]},"IntegrationReviewEventDataDto":{"type":"object","properties":{"isTraining":{"type":"boolean","description":"The review is of a training record (a client-model of a trainee). True\nalso when `traineeId` is null because the trainee's offering was deleted\nlater. Such a review does not count in the master's or the venue's rating.\nAbsent in events stored before this field was added (the feed replays\nstored payloads as they were written)."},"id":{"type":"string","description":"Review publicId."},"appointmentId":{"type":["string","null"]},"clientId":{"type":["string","null"],"description":"Client card publicId."},"staffId":{"type":["string","null"],"description":"Master publicId; null for a review of the venue only."},"traineeId":{"type":["string","null"],"description":"Trainee publicId when the client rates a trainee's work on a training\nrecord (`staffId` is then the supervising mentor); such a review does not\ncount in the master's or the venue's rating. null otherwise."},"rating":{"type":["number","null"],"description":"1–5, the master; null for a review of the venue only."},"comment":{"type":["string","null"]},"companyRating":{"type":["number","null"],"description":"1–5, the venue (optional, separate from the master's rating)."},"companyComment":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","appointmentId","clientId","staffId","traineeId","rating","comment","companyRating","companyComment","createdAt"]},"IntegrationRfmClientDto":{"type":"object","properties":{"segment":{"enum":["CHAMPIONS","LOYAL","POTENTIAL","AT_RISK","LOST","NEW","WHALES"],"type":"string"},"clientId":{"type":"string","description":"Client card publicId — usable in every `/clients/:clientId` route."},"name":{"type":"string","description":"Full name, or the phone when the card has no name."},"recency":{"type":"number","description":"Days since the last visit."},"frequency":{"type":"number","description":"Visits in the last 365 days."},"monetary":{"type":"number","description":"Spent in the last 365 days."},"ltv":{"type":"number","description":"Spent all time."}},"required":["segment","clientId","name","recency","frequency","monetary","ltv"]},"IntegrationRfmSummaryDto":{"type":"object","properties":{"bySegment":{"type":"object","additionalProperties":{"type":"number"},"description":"Clients per segment, e.g. `{ \"LOYAL\": 42 }`."},"total":{"type":"number"}},"required":["bySegment","total"]},"IntegrationSelfServiceDto":{"type":"object","properties":{"canCancel":{"type":"boolean"},"cancelDeadline":{"format":"date-time","type":["string","null"],"description":"Last moment to cancel; null when the location doesn't allow it."},"canReschedule":{"type":"boolean"},"rescheduleDeadline":{"format":"date-time","type":["string","null"]},"reschedulesLeft":{"type":["number","null"],"description":"Null = no limit on reschedules."}},"required":["canCancel","cancelDeadline","canReschedule","rescheduleDeadline","reschedulesLeft"]},"IntegrationSlotDto":{"type":"object","properties":{"time":{"type":"string","description":"`HH:mm` in the location's time zone. Book with this `time` and the day's `date`."},"staffId":{"type":"string","description":"Master id. With `staffId=any` — the first master free at this time."},"staffName":{"type":"string"},"maxDurationMin":{"type":"number","description":"Longest booking (min) this master can start here — until the end of the\nworking hours, a break or the next booking. Useful to offer extra services."}},"required":["time","staffId","staffName","maxDurationMin"]},"IntegrationStaffRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Master publicId."},"firstName":{"type":"string"},"lastName":{"type":"string"},"avatarUrl":{"type":["string","null"]}},"required":["id","firstName","lastName","avatarUrl"]},"MarketingConsentDto":{"type":"object","properties":{"marketingOptOut":{"type":"boolean","description":"true = the client does NOT want marketing messages."}},"required":["marketingOptOut"]},"NotificationsHandlerDto":{"type":"object","properties":{"handledBy":{"type":"string","enum":["app","rezonta"]}},"required":["handledBy"]},"PublicClientDto":{"type":"object","properties":{"firstName":{"type":"string","maxLength":50},"lastName":{"type":"string","maxLength":50},"phone":{"type":"string","maxLength":32},"email":{"type":"string","maxLength":120,"format":"email"}},"required":["firstName","phone"]},"PublicPositionDto":{"type":"object","properties":{"serviceId":{"type":"string","maxLength":64},"staffId":{"type":"string","maxLength":64},"startOffsetMin":{"type":"number","minimum":0,"maximum":1440}},"required":["serviceId"]},"RescheduleAppointmentDto":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"locale":{"enum":["uk","en"],"type":"string"}},"required":["date","time"]},"StaffReviewItemDto":{"type":"object","properties":{"staffPublicId":{"type":"string"},"rating":{"type":"number","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":1000}},"required":["staffPublicId","rating"]},"StartPaymentDto":{"type":"object","properties":{}},"UpdateIntegrationClientDto":{"type":"object","properties":{"lastName":{"type":["string","null"],"maxLength":100},"patronymic":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"maxLength":254,"format":"email"},"birthDate":{"type":["string","null"],"description":"YYYY-MM-DD"},"sex":{"enum":["male","female",null],"type":["string","null"]},"locale":{"type":["string","null"],"description":"Notification language, e.g. \"uk\", \"en\".","maxLength":5},"firstName":{"type":"string","description":"Not nullable (the column is required): omit it to keep, `null` is a 400.","minLength":1,"maxLength":100}}},"UpdatePublicReviewDto":{"type":"object","properties":{"rating":{"type":"number","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":1000},"companyRating":{"type":"number","minimum":1,"maximum":5},"companyComment":{"type":"string","maxLength":1000}}},"WebhookBodyDto":{"type":"object","properties":{"url":{"type":"string","maxLength":2000},"description":{"type":"string","maxLength":200},"events":{"type":"array","description":"Subscribed event types; omit or empty for all.","uniqueItems":true,"items":{"type":"string","enum":["appointment.created","appointment.updated","appointment.status_changed","appointment.cancelled","appointment.deleted","appointment.client_confirmed","appointment.reminder_due","appointment.review_requested","payment.succeeded","payment.refunded","review.created","client.created","client.updated","client.anonymized"]}},"locationIds":{"description":"Locations to receive events for; omit or empty for all.","uniqueItems":true,"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}}}}}}