API Documentation
Overview
The Service Management API provides comprehensive service lifecycle management for the Bee O'clock platform. Services represent bookable offerings provided by businesses, including their configuration, pricing, scheduling, and presentation details.
Base URL
{api_base_url}/api/v1/serviceAuthentication
All endpoints require Bearer token authentication and business tenant identification.
Headers Required:
Authorization: Bearer <access_token>
x-business-tenant-id: <tenant_id>
Content-Type: application/jsonEndpoints
1. Get Paged Services
Retrieve a paginated list of services with optional search functionality.
Endpoint: GET /paged
Query Parameters:
page
number
No
1
Page number for pagination
size
number
No
10
Number of items per page
phrase
string
No
-
Search phrase for filtering by service title or description
Example Request:
Response Schema:
Example Response:
2. Get Service by ID
Retrieve detailed information about a specific service.
Endpoint: GET /{id}
Path Parameters:
id
string
Yes
Unique service identifier
Example Request:
Response Schema: ServiceDto
Example Response:
3. Create Service
Create a new service with complete configuration.
Endpoint: POST /
Request Schema: ServiceDto
Example Request:
Response Schema: ServiceDto (created service with generated ID)
Example Response:
4. Update Service
Update an existing service's information.
Endpoint: PUT /{id}
Path Parameters:
id
string
Yes
Unique service identifier
Request Schema: ServiceDto
Example Request:
Response Schema: ServiceDto (updated service)
5. Update Service Required Resources
Update the list of resources required for a service.
Endpoint: PUT /{id}/required-resources
Path Parameters:
id
string
Yes
Unique service identifier
Request Schema: RequiredResourceDto[]
Example Request:
Response: 204 No Content
6. Delete Service
Soft delete a service (marks as deleted while preserving data).
Endpoint: DELETE /{id}
Path Parameters:
id
string
Yes
Unique service identifier
Example Request:
Response Schema:
Example Response:
Service Media Management
Upload Service Media
Endpoint: POST /{id}/media
Path Parameters:
id
string
Yes
Unique service identifier
Request: multipart/form-data
file
File
Yes
Image file (JPG, PNG, WebP)
description
string
No
Media description
Example Request:
Delete Service Media
Endpoint: DELETE /{id}/media/{mediaId}
Path Parameters:
id
string
Yes
Unique service identifier
mediaId
string
Yes
Unique media identifier
Data Transfer Objects
ServiceDto
ServiceConfigurationDto
DurationConfigurationDto
PresentationDto
PrepaymentPolicyDto
DurationVersionDto
PriceDto
Enums
DurationVersionTypeEnum
CurrencyCodeEnum
LanguageCodeEnum
Error Responses
Common Error Format
Error Status Codes
400
Bad Request
Invalid request data or validation errors
401
Unauthorized
Missing or invalid authentication token
403
Forbidden
Insufficient permissions for the operation
404
Not Found
Service not found
409
Conflict
Service title conflict or business rule violation
422
Unprocessable Entity
Invalid service configuration
500
Internal Server Error
Unexpected server error
Example Error Responses
400 Bad Request - Validation Error:
404 Not Found:
403 Forbidden:
Business Rules
Service Creation Rules
Language Versions: At least one language version is required
Duration Versions: At least one duration version is required
Pricing: Each duration version must have at least one price
Schedules: Schedules are optional but if provided must be valid
Order: Order numbers must be unique within tenant
Service Update Rules
Immutable Fields: Service ID cannot be changed
Language Versions: Cannot remove all language versions
Duration Versions: Cannot remove all duration versions
Active Orders: Cannot delete services with active orders
Media: Media files must be valid image formats
Validation Rules
Duration: Duration must be positive integer in seconds
Price: Price must be positive number
Color: Must be valid hex color code
Schedule Times: Start time must be before end time
Prepayment: Percentage values must be 0-100
Permission Requirements
All service management operations require appropriate permissions:
READ_SERVICE: View service information
CREATE_SERVICE: Create new services
EDIT_SERVICE: Update existing services
DELETE_SERVICE: Delete services
MANAGE_SERVICE_MEDIA: Upload/delete service media
Rate Limiting
Read Operations: 100 requests per minute
Write Operations: 30 requests per minute
Media Upload: 10 requests per minute
Caching
Service Lists: Cached for 5 minutes
Individual Services: Cached for 15 minutes
Cache Invalidation: Automatic on service updates
Integration Examples
JavaScript/TypeScript
cURL Examples
Last updated
Was this helpful?