# Hapana Developers — Full Reference Site: https://developers.hapana-dev.com --- # Hapana Business API ## v2 # GET / **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get API information ## Description Returns basic information about the API including version and status. **Tags**: Health ## Responses ### 200 — API information ```json { "description": "API information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiInfo" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getApiInfo` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /health **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Health check ## Description Returns the health status of the API service. Used by load balancers and monitoring systems. **Tags**: Health ## Responses ### 200 — Service is healthy ```json { "description": "Service is healthy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Health" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getHealth` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /webhooks **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List webhook endpoints ## Description Returns a list of webhook endpoints for the authenticated customer. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | | | | no | | ## Responses ### 200 — List of webhook endpoints ```json { "description": "List of webhook endpoints", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpointList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listWebhooks` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /webhooks **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create webhook endpoint ## Description Creates a new webhook endpoint. The signing secret is only returned once in the response; store it securely. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhookRequest" } } } } ``` ## Responses ### 201 — Webhook endpoint created ```json { "description": "Webhook endpoint created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /webhooks/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get webhook endpoint ## Description Retrieves a specific webhook endpoint by ID. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Webhook endpoint details ```json { "description": "Webhook endpoint details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /webhooks/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update webhook endpoint ## Description Updates a webhook endpoint's configuration. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWebhookRequest" } } } } ``` ## Responses ### 200 — Webhook endpoint updated ```json { "description": "Webhook endpoint updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /webhooks/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete webhook endpoint ## Description Deletes a webhook endpoint. This action is irreversible. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Webhook endpoint deleted ```json { "description": "Webhook endpoint deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deleted" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /webhooks/{id}/rotate-secret **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Rotate webhook secret ## Description Generates a new signing secret for the webhook endpoint. The new secret is only returned once; store it securely. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Secret rotated successfully ```json { "description": "Secret rotated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — ```json { "$ref": "#/components/responses/Conflict" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `rotateWebhookSecret` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /webhooks/{id}/enable **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Re-enable disabled webhook ## Description Re-enables a webhook endpoint that was auto-disabled due to consecutive failures. Only applicable to webhooks with status "disabled". **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Webhook re-enabled ```json { "description": "Webhook re-enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Webhook is not disabled ```json { "description": "Webhook is not disabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `enableWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /webhooks/{id}/deliveries **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List webhook deliveries ## Description Returns the delivery history for a webhook endpoint. History is retained for 7 days. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | start_date | query | string | no | Filter deliveries created on or after this date (ISO-8601) | | end_date | query | string | no | Filter deliveries created before this date (ISO-8601) | | | | | no | | | | | | no | | | | | | no | | ## Responses ### 200 — List of webhook deliveries ```json { "description": "List of webhook deliveries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDeliveryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listWebhookDeliveries` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /webhooks/{id}/deliveries/{deliveryId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get webhook delivery ## Description Retrieves details of a specific webhook delivery attempt. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Webhook delivery details ```json { "description": "Webhook delivery details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDelivery" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getWebhookDelivery` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /webhooks/{id}/deliveries/{deliveryId}/redeliver **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Redeliver webhook event ## Description Manually triggers redelivery of a webhook event. Creates a new delivery with a new ID and regenerated signature. Uses the original event payload. **Tags**: Webhooks **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Redelivery successful ```json { "description": "Redelivery successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDelivery" } } } } ``` ### 202 — Redelivery attempted but failed (logged for debugging) ```json { "description": "Redelivery attempted but failed (logged for debugging)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDelivery" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `redeliverWebhook` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /clients **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List clients ## Description Returns a paginated list of clients. **Tags**: Clients **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | email | query | string | no | Filter by email address | | search | query | string | no | Search by name or email | | | | | no | | ## Responses ### 200 — List of clients ```json { "description": "List of clients", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listClients` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /clients **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create client ## Description Creates a new client record. **Tags**: Clients **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateClientRequest" } } } } ``` ## Responses ### 201 — Client created ```json { "description": "Client created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Client" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Client with this email already exists ```json { "description": "Client with this email already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createClient` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /clients/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get client ## Description Retrieves a specific client by ID. **Tags**: Clients **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Client details ```json { "description": "Client details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Client" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getClient` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /clients/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update client ## Description Updates a client's information. **Tags**: Clients **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateClientRequest" } } } } ``` ## Responses ### 200 — Client updated ```json { "description": "Client updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Client" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateClient` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /clients/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Archive client ## Description Archives (soft-deletes) a client record. **Tags**: Clients **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Client archived ```json { "description": "Client archived", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deleted" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `archiveClient` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /bookings **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List bookings ## Description Returns a paginated list of bookings. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | client_id | query | string | no | Filter by client ID | | session_id | query | string | no | Filter by session ID | | status | query | string | no | Filter by booking status | | | | | no | | ## Responses ### 200 — List of bookings ```json { "description": "List of bookings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BookingList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listBookings` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /bookings **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create booking ## Description Creates a new booking for a client. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBookingRequest" } } } } ``` ## Responses ### 201 — Booking created ```json { "description": "Booking created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Booking" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Session is full or already booked ```json { "description": "Session is full or already booked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createBooking` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /bookings/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get booking ## Description Retrieves a specific booking by ID. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Booking details ```json { "description": "Booking details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Booking" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getBooking` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /bookings/{id}/cancel **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Cancel booking ## Description Cancels a booking. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Booking cancelled ```json { "description": "Booking cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Booking" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Booking already cancelled or session started ```json { "description": "Booking already cancelled or session started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `cancelBooking` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /bookings/{id}/checkin **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Check in booking ## Description Records a check-in for a booking. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Booking checked in ```json { "description": "Booking checked in", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Booking" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Booking already checked in or cancelled ```json { "description": "Booking already checked in or cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `checkinBooking` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /bookings/{id}/noshow **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Mark booking as no-show ## Description Marks a booking as a no-show. **Tags**: Bookings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Booking marked as no-show ```json { "description": "Booking marked as no-show", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Booking" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Booking already processed ```json { "description": "Booking already processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `noshowBooking` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /sessions **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List sessions ## Description Returns a paginated list of sessions. **Tags**: Sessions **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | location_id | query | string | no | Filter by location ID | | instructor_id | query | string | no | Filter by instructor ID | | start_time_gte | query | string | no | Filter sessions starting on or after this time (ISO-8601) | | start_time_lte | query | string | no | Filter sessions starting on or before this time (ISO-8601) | | | | | no | | ## Responses ### 200 — List of sessions ```json { "description": "List of sessions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listSessions` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /sessions/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get session ## Description Retrieves a specific session by ID. **Tags**: Sessions **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Session details ```json { "description": "Session details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Session" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getSession` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /payments **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List payments ## Description Returns a paginated list of payments. **Tags**: Payments **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | client_id | query | string | no | Filter by client ID | | status | query | string | no | Filter by payment status | | | | | no | | ## Responses ### 200 — List of payments ```json { "description": "List of payments", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listPayments` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /payments/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get payment ## Description Retrieves a specific payment by ID. **Tags**: Payments **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Payment details ```json { "description": "Payment details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getPayment` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /payments/{id}/refund **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Refund payment ## Description Creates a refund for a payment. **Tags**: Payments **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundPaymentRequest" } } } } ``` ## Responses ### 200 — Refund processed ```json { "description": "Refund processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Payment already refunded or refund amount exceeds balance ```json { "description": "Payment already refunded or refund amount exceeds balance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `refundPayment` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /packages **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List packages ## Description Returns a paginated list of client packages. **Tags**: Packages **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | client_id | query | string | no | Filter by client ID | | status | query | string | no | Filter by package status | | | | | no | | ## Responses ### 200 — List of packages ```json { "description": "List of packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listPackages` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /packages/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get package ## Description Retrieves a specific package by ID. **Tags**: Packages **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Package details ```json { "description": "Package details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Package" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getPackage` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /packages/{id}/cancel **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Cancel package ## Description Cancels a package. **Tags**: Packages **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Package cancelled ```json { "description": "Package cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Package" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Package already cancelled or expired ```json { "description": "Package already cancelled or expired", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `cancelPackage` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /checkins **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List check-ins ## Description Returns a paginated list of check-ins. **Tags**: Check-ins **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | client_id | query | string | no | Filter by client ID | | location_id | query | string | no | Filter by location ID | | | | | no | | ## Responses ### 200 — List of check-ins ```json { "description": "List of check-ins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckinList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listCheckins` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /checkins **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create check-in ## Description Records a client check-in at a location. **Tags**: Check-ins **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCheckinRequest" } } } } ``` ## Responses ### 201 — Check-in created ```json { "description": "Check-in created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Checkin" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createCheckin` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /checkins/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get check-in ## Description Retrieves a specific check-in by ID. **Tags**: Check-ins **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Check-in details ```json { "description": "Check-in details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Checkin" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getCheckin` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /sites **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List sites ## Description Returns a paginated list of sites (locations/studios) for the brand. **Tags**: Sites **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | status | query | string | no | Filter by site status | | search | query | string | no | Search by site name | | isDigital | query | boolean | no | Filter by digital/physical location | ## Responses ### 200 — List of sites ```json { "description": "List of sites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SiteList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listSites` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /sites **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create site ## Description Creates a new site (location/studio) for the brand. **Tags**: Sites **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSiteRequest" } } } } ``` ## Responses ### 201 — Site created ```json { "description": "Site created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Site" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createSite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /sites/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get site ## Description Retrieves a specific site by ID. **Tags**: Sites **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Site details ```json { "description": "Site details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Site" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getSite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /sites/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update site ## Description Updates a site's details. **Tags**: Sites **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSiteRequest" } } } } ``` ## Responses ### 200 — Site updated ```json { "description": "Site updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Site" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateSite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /sites/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete site ## Description Archives a site. This is a soft delete operation. **Tags**: Sites **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Site deleted ```json { "description": "Site deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deleted" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteSite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /staff **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List staff members ## Description Returns a paginated list of staff members. **Tags**: Staff **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | no | Filter by site ID | | locationId | query | string | no | Filter by location ID (alias for siteId) | | role | query | string | no | Filter by staff role | | status | query | string | no | Filter by staff status | | search | query | string | no | Search by name or email | | | | | no | | | cursor | query | string | no | Pagination cursor | ## Responses ### 200 — List of staff members ```json { "description": "List of staff members", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listStaff` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /staff **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create staff member ## Description Creates a new staff member. **Tags**: Staff **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStaffRequest" } } } } ``` ## Responses ### 201 — Staff member created ```json { "description": "Staff member created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Staff" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Staff member with this email already exists ```json { "description": "Staff member with this email already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createStaff` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /staff/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get staff member ## Description Retrieves a specific staff member by ID. **Tags**: Staff **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Staff member details ```json { "description": "Staff member details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Staff" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getStaff` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /staff/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update staff member ## Description Updates a staff member's information. **Tags**: Staff **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStaffRequest" } } } } ``` ## Responses ### 200 — Staff member updated ```json { "description": "Staff member updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Staff" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateStaff` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /staff/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete staff member ## Description Deactivates (soft-deletes) a staff member. **Tags**: Staff **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 204 — Staff member deleted ```json { "description": "Staff member deleted" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteStaff` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /instructors **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List instructors ## Description Returns a paginated list of instructors. Instructors are staff users with instructor privileges. **Tags**: Instructors **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | no | Filter by site ID | | locationId | query | string | no | Filter by location ID (alias for siteId) | | status | query | string | no | Filter by instructor status | | search | query | string | no | Search by name or email | | | | | no | | | cursor | query | string | no | Pagination cursor | ## Responses ### 200 — List of instructors ```json { "description": "List of instructors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstructorList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listInstructors` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /instructors **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create instructor ## Description Creates a new instructor. **Tags**: Instructors **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInstructorRequest" } } } } ``` ## Responses ### 201 — Instructor created ```json { "description": "Instructor created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Instructor" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Instructor with this email already exists ```json { "description": "Instructor with this email already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createInstructor` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /instructors/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get instructor ## Description Retrieves a specific instructor by ID. **Tags**: Instructors **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Instructor details ```json { "description": "Instructor details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Instructor" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getInstructor` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /instructors/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update instructor ## Description Updates an instructor's information. **Tags**: Instructors **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInstructorRequest" } } } } ``` ## Responses ### 200 — Instructor updated ```json { "description": "Instructor updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Instructor" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateInstructor` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /instructors/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete instructor ## Description Deactivates (soft-deletes) an instructor. **Tags**: Instructors **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 204 — Instructor deleted ```json { "description": "Instructor deleted" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteInstructor` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /schedules **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List schedules ## Description **Not implemented.** Listing schedules is not available. Query individual sessions instead using GET /v2/sessions. **Tags**: Schedules **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Responses ### 501 — Not implemented ```json { "description": "Not implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "object": "error", "status": 501, "type": "api_error", "code": "NOT_IMPLEMENTED", "message": "Listing schedules is not available. Query individual sessions instead.", "suggestion": "Use GET /v2/sessions to see scheduled class instances." } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listSchedules` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /schedules **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Create schedule ## Description Creates a new recurring schedule pattern. This will generate individual session instances based on the recurrence rules. **Tags**: Schedules **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateScheduleRequest" } } } } ``` ## Responses ### 201 — Schedule created ```json { "description": "Schedule created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Schedule" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createSchedule` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /schedules/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get schedule ## Description **Not implemented.** Getting schedules by ID is not available. Query the session instead using GET /v2/sessions/:id. **Tags**: Schedules **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 501 — Not implemented ```json { "description": "Not implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getSchedule` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /schedules/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update schedule ## Description **Not implemented.** Schedule updates are done through session edits. Use PATCH /v2/sessions/:id with scope parameter (single, future, or all). **Tags**: Schedules **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateScheduleRequest" } } } } ``` ## Responses ### 501 — Not implemented ```json { "description": "Not implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "object": "error", "status": 501, "type": "api_error", "code": "NOT_IMPLEMENTED", "message": "Schedule updates are done through session edits. Use PATCH /v2/sessions/:id with scope parameter.", "suggestion": "When editing a session, specify scope=single, scope=future, or scope=all to apply changes." } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateSchedule` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /schedules/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete schedule ## Description **Not implemented.** Schedule deletes are done through session deletes. Use DELETE /v2/sessions/:id with scope parameter (single, future, or all). **Tags**: Schedules **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 501 — Not implemented ```json { "description": "Not implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteSchedule` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /settings **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get site settings ## Description Retrieves the current settings for a site including booking, payment, notification, and membership configuration. **Tags**: Settings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | yes | The site ID to get settings for | | locationId | query | string | no | Optional location ID for location-specific settings | ## Responses ### 200 — Site settings ```json { "description": "Site settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settings" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getSettings` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PATCH /settings **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update site settings ## Description **Not yet implemented.** Settings update requires multiple GraphQL mutations. Use the GraphQL API directly to update specific settings categories. **Tags**: Settings **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | yes | The site ID to update settings for | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSettingsRequest" } } } } ``` ## Responses ### 501 — Not implemented ```json { "description": "Not implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "object": "error", "status": 501, "type": "api_error", "code": "NOT_IMPLEMENTED", "message": "Settings update is not yet implemented via GraphQL.", "suggestion": "Use the GraphQL API directly to update specific settings categories." } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateSettings` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/entries **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List content entries ## Description Returns a paginated list of published content entries filtered by type, tags, category, site targeting, and full-text search. Supports ETag caching based on CmsContentChangeVersion. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | | | | no | | ## Responses ### 200 — List of content entries ```json { "description": "List of content entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentEntryList" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 429 — ```json { "$ref": "#/components/responses/RateLimited" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentEntries` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/entries/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get content entry ## Description Retrieves a single content entry with all resolved references including full body HTML, instructor, category, and tags. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | | | | no | | ## Responses ### 200 — Content entry details ```json { "description": "Content entry details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentEntry" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getContentEntry` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/categories **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List content categories ## Description Returns the category tree with subcategories and content counts. Empty categories are excluded by default. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | includeEmpty | query | boolean | no | Include categories with 0 published entries | | | | | no | | ## Responses ### 200 — List of content categories ```json { "description": "List of content categories", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentCategoryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentCategories` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/banners **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List content banners ## Description Returns banners filtered by placement, site, and package context. Supports carousel grouping and tag-based filtering. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | placement | query | string | no | Banner type filter | | | | | no | | | | | | no | | | | | | no | | | group | query | string | no | Carousel group filter | | limit | query | integer | no | Max results (1-50, default 10) | | | | | no | | ## Responses ### 200 — List of banners ```json { "description": "List of banners", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentBannerList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentBanners` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/tags **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List content tags ## Description Returns all tags available for content filtering. Tags are derived from Packages and Membership Categories that are referenced by at least one published content entry. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | type | query | string | no | Filter by tag source type | | search | query | string | no | Search tag titles | | | | | no | | | | | | no | | ## Responses ### 200 — List of content tags ```json { "description": "List of content tags", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentTagList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentTags` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/types **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List content types ## Description Returns enabled content type definitions. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Responses ### 200 — List of content types ```json { "description": "List of content types", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentTypeList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentTypes` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/search **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Search content ## Description Full-text search across published content titles and tags. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | q | query | string | yes | Search query (minimum 2 characters) | | | | | no | | | | | | no | | | | | | no | | | | | | no | | | limit | query | integer | no | Results per page (1-50, default 10) | | | | | no | | ## Responses ### 200 — Search results ```json { "description": "Search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentEntryList" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `searchContent` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/features **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List feature content ## Description Feature content (challenges, metrics, awards) filtered by site. **Tags**: Content **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | type | query | string | no | Feature type filter | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of feature content entries ```json { "description": "List of feature content entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentEntryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listContentFeatures` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/media **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List media assets ## Description Returns a paginated list of media assets (images, videos, documents) visible to the requesting context. **Tags**: Media **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | mediaType | query | string | no | Filter by media type | | folder | query | string | no | Virtual folder path (e.g., banners/hero) | | tags | query | string | no | Comma-separated free-form media tags | | search | query | string | no | Search across title, filename, altText | | limit | query | integer | no | | | | | | no | | | | | | no | | ## Responses ### 200 — List of media assets ```json { "description": "List of media assets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaAssetList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listMediaAssets` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/media/{contentMediaId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get media asset ## Description Retrieves a single media asset with full metadata and processing status for videos. **Tags**: Media **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Media asset details ```json { "description": "Media asset details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaAsset" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMediaAsset` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/media/{contentMediaId}/playback **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get video playback URLs ## Description Returns signed HLS manifest and MP4 fallback URLs with 24-hour expiry. Includes available quality levels for the video player. **Tags**: Media **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Video playback URLs ```json { "description": "Video playback URLs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoPlayback" } } } } ``` ### 400 — Video upload incomplete ```json { "description": "Video upload incomplete", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Video is still processing ```json { "description": "Video is still processing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMediaPlayback` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /content/media/{contentMediaId}/variants **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get image variants ## Description Returns all generated image variants (thumbnail, small, medium, large) with dimensions for an image asset. **Tags**: Media **Authentication**: ```json [ { "apiKey": [] }, { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Image variant URLs ```json { "description": "Image variant URLs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaVariants" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMediaVariants` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/content/{id}/status **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get content viewing status ## Description Returns the member's viewing/completion status for a single content item. Returns status with progressPercent 0 if the member has never accessed the content. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Content status ```json { "description": "Content status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentStatus" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getContentStatus` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/content/{id}/status **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update content viewing progress ## Description Update viewing progress for a content item. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateContentStatusRequest" } } } } ``` ## Responses ### 200 — Updated content status ```json { "description": "Updated content status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentStatus" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateContentStatus` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/content/status/bulk **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Bulk content status lookup ## Description Returns viewing/completion status for up to 100 content IDs. IDs without a status record are omitted from the response. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | ids | query | string | yes | Comma-separated content entry IDs (max 100) | ## Responses ### 200 — Bulk content status list ```json { "description": "Bulk content status list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentStatusList" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `bulkGetContentStatus` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/content/my-list **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List favorites (My List) ## Description Returns the member's saved/favorited content items. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of favorites ```json { "description": "List of favorites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentFavoriteList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listFavorites` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/content/{id}/favorite **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Add to favorites ## Description Adds a content item to the member's favorites list. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 201 — Content added to favorites ```json { "description": "Content added to favorites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentFavorite" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `addFavorite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /member/content/{id}/favorite **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Remove from favorites ## Description Removes a content item from the member's favorites list. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 204 — Removed from favorites ```json { "description": "Removed from favorites" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `removeFavorite` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/content/{id}/watch-later **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Add to Watch Later ## Description Adds a content item to the member's Watch Later queue. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 201 — Added to Watch Later queue ```json { "description": "Added to Watch Later queue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchLaterEntry" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `addWatchLater` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /member/content/{id}/watch-later **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Remove from Watch Later ## Description Removes a content item from the member's Watch Later queue. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 204 — Removed from Watch Later ```json { "description": "Removed from Watch Later" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `removeWatchLater` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/content/watch-later **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List Watch Later queue ## Description Returns the member's Watch Later list, most recent first. **Tags**: Content **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — Watch Later list ```json { "description": "Watch Later list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchLaterEntryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listWatchLater` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List challenges ## Description Returns available and enrolled challenges for the member's site. Requires Experience theme to be enabled. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | status | query | string | no | Filter by enrollment status | | | | | no | | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of challenges ```json { "description": "List of challenges", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listChallenges` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/history **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List past challenges ## Description Returns completed, withdrawn, and expired challenge enrollments. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of past challenges ```json { "description": "List of past challenges", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listChallengeHistory` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get challenge ## Description Single challenge detail with enrollment status. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Challenge details ```json { "description": "Challenge details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Challenge" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getChallenge` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/challenges/{id}/enroll **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Enroll in challenge ## Description Join a challenge. Validates package eligibility and enrollment window. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeEnrollRequest" } } } } ``` ## Responses ### 201 — Enrolled in challenge ```json { "description": "Enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeEnrollment" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Package required or theme not enabled ```json { "description": "Package required or theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Already enrolled, not started, ended, or enrollment closed ```json { "description": "Already enrolled, not started, ended, or enrollment closed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `enrollInChallenge` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /member/challenges/{id}/enroll **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Withdraw from challenge ## Description Withdraw from an enrolled challenge. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Withdrawn from challenge ```json { "description": "Withdrawn from challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeEnrollment" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `withdrawFromChallenge` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/goals **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get committed goals ## Description Returns committed goals and daily progress for a challenge. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | day | query | integer | no | Filter to specific day number | ## Responses ### 200 — Goal commitment ```json { "description": "Goal commitment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalCommitment" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled or goals not committed ```json { "description": "Not enrolled or goals not committed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getChallengeGoals` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/challenges/{id}/goals/commit **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Commit to goals ## Description Commit to goals for a challenge enrollment. This is a one-time action and cannot be changed after submission. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalCommitRequest" } } } } ``` ## Responses ### 201 — Goals committed ```json { "description": "Goals committed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalCommitment" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled, already committed, or exceeds max goals ```json { "description": "Not enrolled, already committed, or exceeds max goals", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `commitChallengeGoals` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/challenges/{id}/goals/submit **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Submit daily goal completion ## Description Submit daily goal completion status for committed goals. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalSubmitRequest" } } } } ``` ## Responses ### 200 — Goal log recorded ```json { "description": "Goal log recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalLog" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled or goals not committed ```json { "description": "Not enrolled or goals not committed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `submitChallengeGoalLog` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/goals/history **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List goal history ## Description Daily goal log history across all days. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — Goal log history ```json { "description": "Goal log history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeGoalLogList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled or goals not committed ```json { "description": "Not enrolled or goals not committed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listChallengeGoalHistory` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/assessments **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List assessment schedule ## Description Returns assessment schedule with submitted values for each assessment day. Empty assessments array indicates a pending assessment day. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Assessment schedule ```json { "description": "Assessment schedule", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAssessmentList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listChallengeAssessments` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/challenges/{id}/assessments/submit **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Submit assessment ## Description Submit assessment measurements for a scheduled assessment day. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAssessmentSubmitRequest" } } } } ``` ## Responses ### 201 — Assessment submitted ```json { "description": "Assessment submitted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAssessment" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled, invalid assessment day, or grace period expired ```json { "description": "Not enrolled, invalid assessment day, or grace period expired", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `submitChallengeAssessment` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/challenges/{id}/assessments/{assessmentId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Edit assessment ## Description Edit a previously submitted assessment value. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | assessmentId | path | string | yes | Assessment ID | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAssessmentUpdateRequest" } } } } ``` ## Responses ### 200 — Assessment updated ```json { "description": "Assessment updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAssessment" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled or invalid assessment day ```json { "description": "Not enrolled or invalid assessment day", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateChallengeAssessment` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/attendance **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get attendance progress ## Description Returns attendance progress and recent event timeline for a challenge. Attendance is recorded automatically via check-in reconciliation. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Attendance progress ```json { "description": "Attendance progress", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeAttendance" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getChallengeAttendance` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/articles **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List challenge articles ## Description Returns challenge articles with read/unread status. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Challenge articles with status ```json { "description": "Challenge articles with status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeArticleStatusList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listChallengeArticles` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/challenges/{id}/articles/{articleId}/read **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Mark article as read ## Description Marks a challenge article as read. Idempotent — calling again on an already-read article returns the same result. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | articleId | path | string | yes | Article content entry ID | ## Responses ### 200 — Article marked as read ```json { "description": "Article marked as read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeArticleStatus" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `markChallengeArticleRead` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/challenges/{id}/progress **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get challenge progress ## Description Returns combined progress summary across all challenge dimensions including attendance, goals, assessments, and articles. **Tags**: Challenges **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Challenge progress summary ```json { "description": "Challenge progress summary", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeProgress" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 409 — Not enrolled in challenge ```json { "description": "Not enrolled in challenge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getChallengeProgress` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/metrics **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List metrics ## Description Returns available metrics with the member's personal best summary. Requires Experience theme to be enabled. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | category | query | string | no | Filter by metric category | | search | query | string | no | Title search (case-insensitive prefix) | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of metrics ```json { "description": "List of metrics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listMetrics` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/metrics/{contentEntryId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get metric detail ## Description Returns metric detail with per-variable personal bests and recent history. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Metric details ```json { "description": "Metric details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Metric" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMetric` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/metrics/entries **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Log metric entry ## Description Log a new metric result. Triggers personal best recalculation within the same Spanner transaction. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMetricEntryRequest" } } } } ``` ## Responses ### 201 — Metric entry created ```json { "description": "Metric entry created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricEntry" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createMetricEntry` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/metrics/entries/{metricEntryId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update metric entry ## Description Update an existing metric entry. Triggers personal best recalculation. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMetricEntryRequest" } } } } ``` ## Responses ### 200 — Metric entry updated ```json { "description": "Metric entry updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricEntry" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateMetricEntry` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # DELETE /member/metrics/entries/{metricEntryId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Delete metric entry ## Description Soft-delete a metric entry. Triggers personal best recalculation from remaining active entries. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 204 — Metric entry deleted ```json { "description": "Metric entry deleted" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `deleteMetricEntry` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/metrics/{contentEntryId}/history **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get metric history ## Description Paginated time-series for a metric with chart-ready data points. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | variable | query | string | no | Filter by variable name | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — Metric history with chart data ```json { "description": "Metric history with chart data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricHistoryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMetricHistory` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/metrics/personal-bests **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List personal bests ## Description Returns all personal best records for the authenticated member. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — List of personal bests ```json { "description": "List of personal bests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricPersonalBestList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listPersonalBests` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/metrics/entries/{metricEntryId}/share **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Generate share link ## Description Generates a shareable link for a metric entry. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Share link generated ```json { "description": "Share link generated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricShare" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `shareMetricEntry` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/preferences/units **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get unit preference ## Description Returns the member's unit system preference (METRIC or IMPERIAL). **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — Unit preference ```json { "description": "Unit preference", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnitPreference" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getUnitPreference` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/preferences/units **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Set unit preference ## Description Set the member's unit system preference. When set to IMPERIAL, all displayValue fields in metric responses are converted. **Tags**: Metrics **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUnitPreferenceRequest" } } } } ``` ## Responses ### 200 — Unit preference updated ```json { "description": "Unit preference updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnitPreference" } } } } ``` ### 400 — ```json { "$ref": "#/components/responses/BadRequest" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateUnitPreference` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List leaderboards ## Description Returns active leaderboards visible to the member at their current site. Requires Experience theme to be enabled. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | type | query | string | no | Filter by leaderboard type | ## Responses ### 200 — List of leaderboards ```json { "description": "List of leaderboards", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listLeaderboards` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards/summary **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get leaderboard summary ## Description Returns the member's best rankings across all leaderboards. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — Leaderboard summary ```json { "description": "Leaderboard summary", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardSummary" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getLeaderboardSummary` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards/{id} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get leaderboard with rankings ## Description Returns a single leaderboard with paginated ranking entries. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | period | query | string | no | Period key (e.g., 2026-03, 2026-W12, ALL_TIME) | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — Leaderboard with rankings ```json { "description": "Leaderboard with rankings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Leaderboard" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 503 — Leaderboard rankings not yet computed ```json { "description": "Leaderboard rankings not yet computed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getLeaderboard` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards/{id}/my-rank **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get my rank ## Description Returns the member's position with surrounding entries for context. Returns null if the member is not ranked. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | period | query | string | no | Period key | | above | query | integer | no | Number of entries above to include | | below | query | integer | no | Number of entries below to include | ## Responses ### 200 — Member rank with surrounding entries ```json { "description": "Member rank with surrounding entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardMyRank" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getMyLeaderboardRank` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards/{id}/top **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get top entries ## Description Top N entries for widget/card display. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | | period | query | string | no | Period key | | limit | query | integer | no | | ## Responses ### 200 — Top leaderboard entries ```json { "description": "Top leaderboard entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardEntryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getLeaderboardTop` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/leaderboards/{id}/periods **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List available periods ## Description Returns available periods for a leaderboard. **Tags**: Leaderboards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — List of periods ```json { "description": "List of periods", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardPeriodList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listLeaderboardPeriods` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/awards **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List awards ## Description Returns all published awards for the member's site with earned/locked status. Requires Experience theme to be enabled. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | yes | Filter awards targeted to this site | | awardType | query | string | no | Filter by award type | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of awards ```json { "description": "List of awards", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AwardList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listAwards` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/awards/earned **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List earned awards ## Description Only earned awards (PENDING or ACHIEVED status). **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | siteId | query | string | yes | Filter awards targeted to this site | | awardType | query | string | no | Filter by award type | | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — List of earned awards ```json { "description": "List of earned awards", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AwardList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listEarnedAwards` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/awards/{awardId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get award detail ## Description Returns a single award detail with progress. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Award details ```json { "description": "Award details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Award" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getAward` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/awards/banner **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get pending award banner ## Description Returns the oldest pending award banner (FIFO). Mobile app calls this on launch and after check-in. Returns 204 when no pending banners. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — Pending award banner ```json { "description": "Pending award banner", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AwardBanner" } } } } ``` ### 204 — No pending banners ```json { "description": "No pending banners" } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getAwardBanner` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/awards/banner/{awardId}/dismiss **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Dismiss award banner ## Description Dismiss a pending award banner, transitioning the award status from PENDING to ACHIEVED. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Award banner dismissed ```json { "description": "Award banner dismissed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Award" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Award banner already dismissed ```json { "description": "Award banner already dismissed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `dismissAwardBanner` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/streaks **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List attendance streaks ## Description Returns current streak info per site. Requires Experience theme. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — List of streaks ```json { "description": "List of streaks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreakList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listStreaks` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/milestones **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List milestones ## Description Returns lifetime attendance milestones with progress toward next threshold. Requires Experience theme. **Tags**: Awards **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — List of milestones ```json { "description": "List of milestones", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MilestoneList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 403 — Experience theme not enabled ```json { "description": "Experience theme not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listMilestones` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # POST /member/video/sessions **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Start video playback session ## Description Start a new video playback session. Returns a session ID and the resume position from a previous session (if any). **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVideoSessionRequest" } } } } ``` ## Responses ### 201 — Playback session started ```json { "description": "Playback session started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoPlaybackSession" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ### 409 — Video is still processing ```json { "description": "Video is still processing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `createVideoSession` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/video/sessions/{sessionId}/heartbeat **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update playback progress ## Description Update playback progress. Called every 10-15 seconds during active playback. Accepts a single heartbeat or batched array. **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/VideoHeartbeat" }, { "type": "array", "items": { "$ref": "#/components/schemas/VideoHeartbeat" } } ] } } } } ``` ## Responses ### 200 — Progress updated ```json { "description": "Progress updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoPlaybackSession" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `sendVideoHeartbeat` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/video/sessions/{sessionId}/complete **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Mark session as completed ## Description Mark a playback session as completed. Triggers content status update and analytics event. **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Session marked as completed ```json { "description": "Session marked as completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoPlaybackSession" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `completeVideoSession` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/video/sessions/{sessionId}/end **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary End playback session ## Description End a playback session (pause/close). Saves the final position for future resume. Sets status to PAUSED. **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Session ended ```json { "description": "Session ended", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoPlaybackSession" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `endVideoSession` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/video/resume/{contentMediaId} **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get resume position ## Description Returns the resume position for a specific video based on the latest playback session. **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | | | | no | | ## Responses ### 200 — Resume position ```json { "description": "Resume position", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoResume" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ### 404 — ```json { "$ref": "#/components/responses/NotFound" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getVideoResumePosition` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/video/history **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary List watch history ## Description Returns the member's video watch history, grouped by video (most recent session per video), paginated by most recent first. **Tags**: Video **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | limit | query | integer | no | | | | | | no | | ## Responses ### 200 — Video watch history ```json { "description": "Video watch history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoWatchHistoryList" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `listVideoWatchHistory` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/experience/status **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get Experience theme status ## Description Check Experience theme entitlement for the authenticated member's corporate. Does NOT require the Experience theme to be enabled. **Tags**: Experience **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — Experience theme status ```json { "description": "Experience theme status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExperienceStatus" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getExperienceStatus` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # GET /member/notifications/preferences **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Get notification preferences ## Description Returns the member's notification preference toggles for Content Suite features. **Tags**: Notifications **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Responses ### 200 — Notification preferences ```json { "description": "Notification preferences", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPreferences" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `getNotificationPreferences` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` # PUT /member/notifications/preferences **Hapana Business API v2** **Base URL**: `https://api.hapana-app.com` ## Summary Update notification preferences ## Description Updates notification preference toggles. Partial updates supported — only provided keys are changed. **Tags**: Notifications **Authentication**: ```json [ { "bearerAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNotificationPreferencesRequest" } } } } ``` ## Responses ### 200 — Updated notification preferences ```json { "description": "Updated notification preferences", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPreferences" } } } } ``` ### 401 — ```json { "$ref": "#/components/responses/Unauthorized" } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/business-v2.json --- Source spec: `servers/legacy-api/openapi.yaml` · operationId `updateNotificationPreferences` · version `v2` ## Security schemes ```json { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Hapana-API-Key", "description": "API key for authentication" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth 2.0 Bearer token" } } ``` --- # Hapana Member API ## v2 (Beta) # GET /profile **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get member profile ## Description Returns the profile information for the authenticated member. **Tags**: Profile **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Member profile ```json { "description": "Member profile", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemberProfile" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `getMemberProfile` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # PATCH /profile **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Update member profile ## Description Updates the authenticated member's profile information. **Tags**: Profile **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } } } ``` ## Responses ### 200 — Profile updated ```json { "description": "Profile updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemberProfile" } } } } ``` ### 400 — Invalid request ```json { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `updateMemberProfile` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /schedule **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get schedule ## Description Returns the class schedule for the member's home location. Results are filtered to sessions the member can book based on their packages and membership. **Tags**: Schedule **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | startDate | query | string | no | Start date for schedule range (ISO-8601 date) | | endDate | query | string | no | End date for schedule range (ISO-8601 date) | ## Responses ### 200 — Class schedule ```json { "description": "Class schedule", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileSessionList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `getMemberSchedule` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /schedule/{id} **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get session details ## Description Returns detailed information about a specific class session, including availability and enrolled members count. **Tags**: Schedule **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | id | path | string | yes | Session ID | ## Responses ### 200 — Session details ```json { "description": "Session details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileSession" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 404 — Session not found ```json { "description": "Session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `getSessionDetails` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /bookings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary List member bookings ## Description Returns the authenticated member's bookings. Includes upcoming and recent past bookings. **Tags**: Bookings **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | status | query | string | no | Filter by booking status | ## Responses ### 200 — Member bookings ```json { "description": "Member bookings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileBookingList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `listMemberBookings` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /bookings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Create booking ## Description Books the authenticated member into a class session. If the session is full, the member will be added to the waitlist (if available). **Tags**: Bookings **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMobileBookingRequest" } } } } ``` ## Responses ### 201 — Booking created ```json { "description": "Booking created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileBooking" } } } } ``` ### 400 — Invalid request ```json { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 409 — Session full or already booked ```json { "description": "Session full or already booked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `createMemberBooking` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # DELETE /bookings/{id} **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Cancel booking ## Description Cancels a booking. The booking must belong to the authenticated member and be in a cancellable state. **Tags**: Bookings **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | id | path | string | yes | Booking ID | ## Responses ### 204 — Booking cancelled ```json { "description": "Booking cancelled" } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 404 — Booking not found ```json { "description": "Booking not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 422 — Cannot cancel booking ```json { "description": "Cannot cancel booking", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `cancelMemberBooking` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /checkin **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Self check-in ## Description Records a self-service check-in at a location. Optionally specify a session ID for class check-in. **Tags**: Check-in **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileCheckinRequest" } } } } ``` ## Responses ### 201 — Check-in recorded ```json { "description": "Check-in recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileCheckin" } } } } ``` ### 400 — Invalid request ```json { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `mobileCheckin` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /packages **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary List member packages ## Description Returns the authenticated member's active packages and memberships, including credit balances and expiry dates. **Tags**: Packages **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Member packages ```json { "description": "Member packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobilePackageList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `listMemberPackages` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /packages/available **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary List available packages ## Description Returns packages available for purchase at the member's home location. Includes pricing and credit information. **Tags**: Packages **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Available packages ```json { "description": "Available packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvailablePackageList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `listAvailablePackages` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /packages/{id} **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get package details ## Description Returns detailed information about a specific package or membership. **Tags**: Packages **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | id | path | string | yes | Package ID | ## Responses ### 200 — Package details ```json { "description": "Package details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobilePackage" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 404 — Package not found ```json { "description": "Package not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `getMemberPackage` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /payments/methods **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary List payment methods ## Description Returns the authenticated member's saved payment methods (cards and bank accounts). **Tags**: Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Payment methods list ```json { "description": "Payment methods list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobilePaymentMethodList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `listPaymentMethods` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /payments/methods **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Initiate payment method setup ## Description Initiates adding a new payment method. Returns a Stripe SetupIntent client secret to be used with Stripe.js for secure card collection. **Tags**: Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 201 — Setup initiated ```json { "description": "Setup initiated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentMethodSetupResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 422 — Setup failed ```json { "description": "Setup failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `initiatePaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /payments/methods/{id}/complete **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Complete payment method setup ## Description Completes the payment method setup after the SetupIntent has been confirmed via Stripe.js. Call this after successfully confirming the setup intent. **Tags**: Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | id | path | string | yes | Payment method ID from initiate response | ## Responses ### 200 — Payment method activated ```json { "description": "Payment method activated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobilePaymentMethod" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 422 — Setup not complete ```json { "description": "Setup not complete", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `completePaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # DELETE /payments/methods/{id} **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Delete payment method ## Description Removes a saved payment method from the member's account. **Tags**: Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | id | path | string | yes | Payment method ID | ## Responses ### 204 — Payment method deleted ```json { "description": "Payment method deleted" } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ### 422 — Cannot delete payment method ```json { "description": "Cannot delete payment method", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `deletePaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /payments/history **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get payment history ## Description Returns the authenticated member's billing and payment history (invoices). **Tags**: Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | status | query | string | no | Filter by payment status | | limit | query | integer | no | Number of results to return (max 100) | ## Responses ### 200 — Payment history ```json { "description": "Payment history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobilePaymentList" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `getPaymentHistory` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /api/site-version/{v1EncryptedId} **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Check site V1/V2 version ## Description Checks if a site exists in the V2 system and returns version information. Used by embed widgets to determine whether to use V1 or V2 API endpoints. Supports CORS from any origin. **Base URL:** `https://api.hapana-app.com` (not /v2/member) **Tags**: Widget Authentication ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | v1EncryptedId | path | string | yes | The V1 encrypted site ID (widget-id attribute) | ## Responses ### 200 — Site version information ```json { "description": "Site version information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SiteVersionCheck" } } } } ``` ### 400 — Missing v1EncryptedId ```json { "description": "Missing v1EncryptedId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `checkSiteVersion` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/auth/login **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Login ## Description Authenticates a user with email/password or Firebase token and returns access tokens. **Tags**: Widget Authentication ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string" }, "firebaseToken": { "type": "string", "description": "Firebase ID token for social login" } } } } } } ``` ## Responses ### 200 — Login successful ```json { "description": "Login successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetAuthResponse" } } } } ``` ### 401 — Invalid credentials ```json { "description": "Invalid credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetLogin` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/auth/signup **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Sign up ## Description Creates a new client account and returns access tokens. **Tags**: Widget Authentication ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email", "firstName", "lastName" ], "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "phone": { "type": "string" } } } } } } ``` ## Responses ### 200 — Signup successful ```json { "description": "Signup successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetAuthResponse" } } } } ``` ### 409 — Email already exists ```json { "description": "Email already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetSignup` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/auth/logout **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Logout ## Description Invalidates the current session token. **Tags**: Widget Authentication **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Logged out successfully ```json { "description": "Logged out successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetLogout` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/auth/verify **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Verify token ## Description Verifies if the current access token is valid. **Tags**: Widget Authentication **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Token is valid ```json { "description": "Token is valid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Token is invalid or expired ```json { "description": "Token is invalid or expired", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetVerifyToken` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/auth/refresh **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Refresh token ## Description Exchanges a refresh token for a new access token. **Tags**: Widget Authentication **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "refreshToken" ], "properties": { "refreshToken": { "type": "string" } } } } } } ``` ## Responses ### 200 — New tokens issued ```json { "description": "New tokens issued", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetAuthResponse" } } } } ``` ### 401 — Invalid refresh token ```json { "description": "Invalid refresh token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetRefreshToken` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary List sites ## Description Returns a list of sites/locations for the corporate account. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of sites ```json { "description": "List of sites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetListSites` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/detail **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get site details ## Description Returns detailed information about the current site including name, address, timezone, and branding. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Site details ```json { "description": "Site details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSiteDetails" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSiteDetail` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/sessions **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get sessions ## Description Returns the class schedule for a date range with filtering options. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | startDate | query | string | no | Start date (YYYY-MM-DD) | | endDate | query | string | no | End date (YYYY-MM-DD) | | sessionCategory | query | string | no | Filter by category (classes, workshops, privates) | | instructorId | query | string | no | Filter by instructor ID | | pageIndex | query | integer | no | Page number (1-based) | | pageSize | query | integer | no | Results per page | ## Responses ### 200 — List of sessions ```json { "description": "List of sessions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSessions` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/sessionsDetails **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get session details ## Description Returns detailed information about a specific session. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | sessionId | query | string | yes | Session ID | ## Responses ### 200 — Session details ```json { "description": "Session details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 404 — Session not found ```json { "description": "Session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSessionDetails` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/sessionsFilters **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get session filters ## Description Returns available filter options (session types, instructors) for the schedule. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Filter options ```json { "description": "Filter options", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSessionFilters` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/packages **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get available packages ## Description Returns packages available for purchase at the site. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of packages ```json { "description": "List of packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetPackages` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/packageDetail **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get package details ## Description Returns detailed information about a specific package. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | packageId | query | string | yes | Package ID | ## Responses ### 200 — Package details ```json { "description": "Package details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 404 — Package not found ```json { "description": "Package not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetPackageDetail` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/instructor **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get instructors ## Description Returns a list of instructors at the site. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of instructors ```json { "description": "List of instructors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetInstructors` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/instructorProfile **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get instructor profile ## Description Returns detailed profile information for an instructor. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | instructorId | query | string | yes | Instructor ID | ## Responses ### 200 — Instructor profile ```json { "description": "Instructor profile", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 404 — Instructor not found ```json { "description": "Instructor not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetInstructorProfile` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/sessionTypes **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get session types ## Description Returns the list of session types at the site. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of session types ```json { "description": "List of session types", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSessionTypes` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/policy **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get cancellation policy ## Description Returns the site cancellation policy text. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Policy text ```json { "description": "Policy text", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetPolicy` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/agreement **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get terms and conditions ## Description Returns the site terms and conditions. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Agreement text ```json { "description": "Agreement text", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetAgreement` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/countries **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get countries ## Description Returns a list of supported countries. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of countries ```json { "description": "List of countries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetCountries` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/states **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get states ## Description Returns a list of states for a given country. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | countryCode | query | string | yes | Country code | ## Responses ### 200 — List of states ```json { "description": "List of states", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetStates` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/settings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get widget settings ## Description Returns widget configuration settings and authentication tokens. **Tags**: Widget Site **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Widget settings ```json { "description": "Widget settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetSettings` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/site/properties **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get client profile ## Description Returns the authenticated client's profile information. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Client profile ```json { "description": "Client profile", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetClientProperties` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/site/updateProperties **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Update client profile ## Description Updates the authenticated client's profile information. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } } } ``` ## Responses ### 200 — Profile updated ```json { "description": "Profile updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetUpdateClientProperties` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/futureBookings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get future bookings ## Description Returns the client's upcoming bookings. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of bookings ```json { "description": "List of bookings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetFutureBookings` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/sessionCheckin **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Check in to session ## Description Records a check-in for a booked session. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "bookingId" ], "properties": { "bookingId": { "type": "string", "description": "Booking ID to check in" } } } } } } ``` ## Responses ### 200 — Check-in recorded ```json { "description": "Check-in recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetSessionCheckin` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/bookWaitlist **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Book waitlist ## Description Adds the client to a session waitlist. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "sessionId" ], "properties": { "sessionId": { "type": "string", "description": "Session ID to waitlist" } } } } } } ``` ## Responses ### 200 — Added to waitlist ```json { "description": "Added to waitlist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetBookWaitlist` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/confirmWaitlist **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Confirm waitlist ## Description Confirms a waitlist booking when a spot becomes available. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "waitlistId" ], "properties": { "waitlistId": { "type": "string", "description": "Waitlist booking ID to confirm" } } } } } } ``` ## Responses ### 200 — Booking confirmed ```json { "description": "Booking confirmed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetConfirmWaitlist` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # DELETE /v2/client/cancelBooking **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Cancel booking ## Description Cancels a booking. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | bookingId | query | string | yes | Booking ID to cancel | ## Responses ### 200 — Booking cancelled ```json { "description": "Booking cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetCancelBooking` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/packages **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get client packages ## Description Returns the client's purchased packages and memberships. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — List of packages ```json { "description": "List of packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetClientPackages` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/packageDetail **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get package details ## Description Returns details about a specific package the client owns. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | packageId | query | string | yes | Package ID | ## Responses ### 200 — Package details ```json { "description": "Package details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetClientPackageDetail` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/cancelMembership **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Cancel membership ## Description Cancels an active membership. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "membershipId" ], "properties": { "membershipId": { "type": "string", "description": "Membership ID to cancel" }, "reason": { "type": "string", "description": "Optional cancellation reason" } } } } } } ``` ## Responses ### 200 — Membership cancelled ```json { "description": "Membership cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetCancelMembership` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/updateAutoRenew **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Update auto-renew ## Description Updates the auto-renew setting for a membership. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "membershipId", "autoRenew" ], "properties": { "membershipId": { "type": "string" }, "autoRenew": { "type": "boolean" } } } } } } ``` ## Responses ### 200 — Setting updated ```json { "description": "Setting updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetUpdateAutoRenew` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/billingInformation **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get billing information ## Description Returns the client's billing info and saved payment methods. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Billing information ```json { "description": "Billing information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetBillingInfo` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/billingHistory **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get billing history ## Description Returns the client's payment and billing history. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | pageIndex | query | integer | no | Page number (1-based) | | pageSize | query | integer | no | Results per page | ## Responses ### 200 — Billing history ```json { "description": "Billing history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetBillingHistory` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/addPaymentMethod **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Add payment method ## Description Adds a new payment method for the client. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "paymentMethodToken" ], "properties": { "paymentMethodToken": { "type": "string", "description": "Stripe payment method token" }, "setAsDefault": { "type": "boolean", "description": "Set as default payment method" } } } } } } ``` ## Responses ### 200 — Payment method added ```json { "description": "Payment method added", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetAddPaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/deletePaymentMethod **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Delete payment method ## Description Removes a saved payment method. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "paymentMethodId" ], "properties": { "paymentMethodId": { "type": "string", "description": "Payment method ID to delete" } } } } } } ``` ## Responses ### 200 — Payment method deleted ```json { "description": "Payment method deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetDeletePaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/updateDefaultPaymentMethod **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Set default payment method ## Description Sets a payment method as the default. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "paymentMethodId" ], "properties": { "paymentMethodId": { "type": "string", "description": "Payment method ID to set as default" } } } } } } ``` ## Responses ### 200 — Default payment method updated ```json { "description": "Default payment method updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetUpdateDefaultPaymentMethod` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/stats **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get client stats ## Description Returns the client's visit statistics. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Client statistics ```json { "description": "Client statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetClientStats` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/client/visitHistory **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get visit history ## Description Returns the client's check-in and visit history. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | pageIndex | query | integer | no | Page number (1-based) | | pageSize | query | integer | no | Results per page | ## Responses ### 200 — Visit history ```json { "description": "Visit history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetVisitHistory` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/favoriteInstructor **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Toggle favorite instructor ## Description Adds or removes an instructor from favorites. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "instructorId" ], "properties": { "instructorId": { "type": "string" } } } } } } ``` ## Responses ### 200 — Favorite updated ```json { "description": "Favorite updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetToggleFavoriteInstructor` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/policy **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Accept policy ## Description Records acceptance of a policy. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "policyId" ], "properties": { "policyId": { "type": "string" } } } } } } ``` ## Responses ### 200 — Policy accepted ```json { "description": "Policy accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetAcceptPolicy` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/client/agreement **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Sign agreement ## Description Records signing of an agreement. **Tags**: Widget Client **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "agreementId" ], "properties": { "agreementId": { "type": "string" }, "signature": { "type": "string", "description": "Base64 encoded signature image" } } } } } } ``` ## Responses ### 200 — Agreement signed ```json { "description": "Agreement signed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetSignAgreement` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/payments/showPaymentInfo **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get payment info ## Description Returns payment information for checkout including pricing, taxes, discounts, and available payment methods. **Tags**: Widget Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | sessionId | query | string | no | Session ID (for session booking) | | packageId | query | string | no | Package ID (for package purchase) | | promoCode | query | string | no | Promo code to apply | ## Responses ### 200 — Payment information ```json { "description": "Payment information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetPaymentInfo` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/payments/checkout **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Checkout ## Description Completes a checkout for session booking or package purchase. **Tags**: Widget Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetCheckoutRequest" } } } } ``` ## Responses ### 200 — Checkout successful ```json { "description": "Checkout successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 400 — Invalid request ```json { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 402 — Payment failed ```json { "description": "Payment failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetCheckout` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/payments/validatePromoCode **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Validate promo code ## Description Validates a promo code and returns discount information. **Tags**: Widget Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | promoCode | query | string | yes | Promo code to validate | | packageId | query | string | no | Package ID for context | ## Responses ### 200 — Promo code validation result ```json { "description": "Promo code validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetValidatePromoCode` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/payments/redeemGiftCard **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Redeem gift card ## Description Redeems a gift card code. **Tags**: Widget Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "giftCardCode" ], "properties": { "giftCardCode": { "type": "string" } } } } } } ``` ## Responses ### 200 — Gift card redeemed ```json { "description": "Gift card redeemed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 400 — Invalid gift card ```json { "description": "Invalid gift card", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetRedeemGiftCard` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/payments/validateGiftCard **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Validate gift card ## Description Validates a gift card code and returns balance information. **Tags**: Widget Payments **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Parameters | Name | In | Type | Required | Description | |------|-----|------|----------|-------------| | giftCardCode | query | string | yes | Gift card code to validate | ## Responses ### 200 — Gift card validation result ```json { "description": "Gift card validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetValidateGiftCard` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/forgotpassword **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Forgot password ## Description Sends a password reset email. **Tags**: Widget Admin ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email" } } } } } } ``` ## Responses ### 200 — Reset email sent ```json { "description": "Reset email sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetForgotPassword` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/resetPassword **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Reset password ## Description Resets password using a reset token. **Tags**: Widget Admin ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "token", "newPassword" ], "properties": { "token": { "type": "string", "description": "Password reset token from email" }, "newPassword": { "type": "string" } } } } } } ``` ## Responses ### 200 — Password reset successful ```json { "description": "Password reset successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 400 — Invalid or expired token ```json { "description": "Invalid or expired token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetResetPassword` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/changePassword **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Change password ## Description Changes the password for an authenticated user. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "currentPassword", "newPassword" ], "properties": { "currentPassword": { "type": "string" }, "newPassword": { "type": "string" } } } } } } ``` ## Responses ### 200 — Password changed ```json { "description": "Password changed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required or invalid password ```json { "description": "Authentication required or invalid password", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetChangePassword` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/verifyEmail **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Verify email ## Description Verifies an email address using a verification token. **Tags**: Widget Admin ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string", "description": "Email verification token" } } } } } } ``` ## Responses ### 200 — Email verified ```json { "description": "Email verified", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 400 — Invalid or expired token ```json { "description": "Invalid or expired token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetVerifyEmail` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/resendVerification **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Resend verification email ## Description Resends the email verification email. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email" } } } } } } ``` ## Responses ### 200 — Verification email sent ```json { "description": "Verification email sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetResendVerification` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/admin/referralCode **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get referral code ## Description Returns the client's referral code and referral statistics. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Referral information ```json { "description": "Referral information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetReferralCode` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/applyReferral **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Apply referral code ## Description Applies a referral code to the account. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "referralCode" ], "properties": { "referralCode": { "type": "string" } } } } } } ``` ## Responses ### 200 — Referral applied ```json { "description": "Referral applied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 400 — Invalid referral code ```json { "description": "Invalid referral code", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetApplyReferral` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/registerPushToken **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Register push token ## Description Registers a device push notification token. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "token", "platform" ], "properties": { "token": { "type": "string", "description": "Device push token" }, "platform": { "type": "string", "enum": [ "ios", "android", "web" ] } } } } } } ``` ## Responses ### 200 — Token registered ```json { "description": "Token registered", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetRegisterPushToken` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/unregisterPushToken **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Unregister push token ## Description Removes a device push notification token. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string", "description": "Device push token to remove" } } } } } } ``` ## Responses ### 200 — Token unregistered ```json { "description": "Token unregistered", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetUnregisterPushToken` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # GET /v2/admin/notificationSettings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Get notification settings ## Description Returns the client's notification preferences. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Responses ### 200 — Notification settings ```json { "description": "Notification settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetGetNotificationSettings` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/updateNotificationSettings **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Update notification settings ## Description Updates the client's notification preferences. **Tags**: Widget Admin **Authentication**: ```json [ { "firebaseAuth": [] } ] ``` ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "emailNotifications": { "type": "boolean" }, "pushNotifications": { "type": "boolean" }, "smsNotifications": { "type": "boolean" }, "marketingEmails": { "type": "boolean" } } } } } } ``` ## Responses ### 200 — Settings updated ```json { "description": "Settings updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ### 401 — Authentication required ```json { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetUpdateNotificationSettings` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ``` # POST /v2/admin/contact **Hapana Member API v2 (Beta)** — Beta, coming soon **Base URL**: `https://api.hapana-app.com/v2/member` ## Summary Submit contact form ## Description Submits a contact/support request. **Tags**: Widget Admin ## Request Body ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email", "message" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "subject": { "type": "string" }, "message": { "type": "string" } } } } } } ``` ## Responses ### 200 — Message sent ```json { "description": "Message sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetSuccessResponse" } } } } ``` ## Schemas in scope Refer to the full OpenAPI spec for resolved `$ref` definitions: - https://developers.hapana-dev.com/openapi/member-v2.json --- Source spec: `servers/api/openapi.yaml` · operationId `widgetSubmitContactForm` · version `v2` ## Security schemes ```json { "firebaseAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Firebase ID token obtained from Firebase Authentication SDK" } } ```