Create and manage individual services and group booking services with pricing, duration, and inventory tracking.
Create Service
Create a new individual booking service with multiple phases.
POST /api/v1/merchant/services
curl -X POST 'https://api.example.com/api/v1/merchant/services' \
--cookie "session_token=your_session_token" \
--header 'Content-Type: application/json' \
--data '{
"name": "Haircut and Style",
"description": "Professional haircut with styling",
"color": "#FF5733",
"price": {"amount": 5000, "currency": "USD"},
"cost": {"amount": 1000, "currency": "USD"},
"price_type": "fixed",
"category_id": 1,
"is_active": true,
"settings": {
"cancel_deadline": 1440,
"booking_window_min": 60,
"booking_window_max": 10080,
"buffer_time": 15
},
"phases": [
{
"name": "Haircut",
"sequence": 1,
"duration": 30,
"phase_type": "active"
},
{
"name": "Styling",
"sequence": 2,
"duration": 15,
"phase_type": "active"
}
],
"used_products": [
{"id": 1, "amount_used": 50},
{"id": 2, "amount_used": 20}
]
}'
Detailed service description
Hex color code for calendar display (must be valid hex color)
Service price
Price in smallest currency unit (cents)
Three-letter currency code
Service cost for internal tracking
Pricing type: “fixed”, “free”, “variable”, or “starting_at”
Service category ID for organization
Whether service is available for booking
Service-specific scheduling settings (overrides merchant defaults if set)
Cancellation deadline in minutes
Minimum advance booking time in minutes
Maximum advance booking time in minutes
Buffer time after service in minutes
Service phases defining duration and type
Order sequence (1, 2, 3…)
Duration in minutes (1-1440)
“active” for work time or “wait” for waiting time
Products consumed by this serviceShow Product usage object
Quantity used per service (0-1000000)
Response
Returns 201 Created on success.
Update Service
Update an existing service.
PUT /api/v1/merchant/services/{id}
curl -X PUT 'https://api.example.com/api/v1/merchant/services/1' \
--cookie "session_token=your_session_token" \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"name": "Premium Haircut",
"description": "Premium haircut with styling",
"color": "#FF5733",
"price": {"amount": 7500, "currency": "USD"},
"cost": {"amount": 1500, "currency": "USD"},
"price_type": "fixed",
"category_id": 1,
"is_active": true,
"settings": {},
"phases": [
{
"id": 1,
"service_id": 1,
"name": "Haircut",
"sequence": 1,
"duration": 45,
"phase_type": "active"
}
]
}'
Body parameters are the same as create, with phases including their IDs.
Delete Service
Delete a service.
DELETE /api/v1/merchant/services/{id}
curl -X DELETE 'https://api.example.com/api/v1/merchant/services/1' \
--cookie "session_token=your_session_token"
Get Service
Retrieve a single service with all details.
GET /api/v1/merchant/services/{id}
curl -X GET 'https://api.example.com/api/v1/merchant/services/1' \
--cookie "session_token=your_session_token"
Total duration in minutes (sum of all phases)
Service-specific settings
Products used by this service
Quantity used per service
Get All Services
Retrieve all services grouped by category.
GET /api/v1/merchant/services
curl -X GET 'https://api.example.com/api/v1/merchant/services' \
--cookie "session_token=your_session_token"
Returns an array of category groups:
Category ID (null for uncategorized)
Services in this category
Update Service Products
Update the products used by a service.
PUT /api/v1/merchant/services/{id}/products
curl -X PUT 'https://api.example.com/api/v1/merchant/services/1/products' \
--cookie "session_token=your_session_token" \
--header 'Content-Type: application/json' \
--data '{
"service_id": 1,
"used_products": [
{"id": 1, "amount_used": 75},
{"id": 3, "amount_used": 10}
]
}'
Service ID (must match path parameter)
Updated product usage list
Activate Service
Activate a service to make it available for booking.
PATCH /api/v1/merchant/services/{id}/activate
curl -X PATCH 'https://api.example.com/api/v1/merchant/services/1/activate' \
--cookie "session_token=your_session_token"
Deactivate Service
Deactivate a service to prevent new bookings.
PATCH /api/v1/merchant/services/{id}/deactivate
curl -X PATCH 'https://api.example.com/api/v1/merchant/services/1/deactivate' \
--cookie "session_token=your_session_token"
Reorder Services
Update the display order of services within a category.
PUT /api/v1/merchant/services/reorder
curl -X PUT 'https://api.example.com/api/v1/merchant/services/reorder' \
--cookie "session_token=your_session_token" \
--header 'Content-Type: application/json' \
--data '{
"category_id": 1,
"services": [3, 1, 2, 5]
}'
Category ID (null for uncategorized services)
Array of service IDs in desired order
Get available products and categories for service creation forms.
GET /api/v1/merchant/services/form-options
curl -X GET 'https://api.example.com/api/v1/merchant/services/form-options' \
--cookie "session_token=your_session_token"
Available service categories
Group Booking Services
Group services allow multiple participants to book the same time slot.
Create Group Service
POST /api/v1/merchant/services/group
curl -X POST 'https://api.example.com/api/v1/merchant/services/group' \
--cookie "session_token=your_session_token" \
--header 'Content-Type: application/json' \
--data '{
"name": "Yoga Class",
"description": "Group yoga session",
"color": "#4CAF50",
"price": {"amount": 2500, "currency": "USD"},
"cost": {"amount": 500, "currency": "USD"},
"price_type": "fixed",
"duration": 60,
"category_id": 2,
"min_participants": 3,
"max_participants": 15,
"is_active": true,
"settings": {},
"used_products": []
}'
Minimum participants required
Maximum participants allowed
Session duration in minutes
Update Group Service
PUT /api/v1/merchant/services/group/{id}
Get Group Service
GET /api/v1/merchant/services/group/{id}
curl -X GET 'https://api.example.com/api/v1/merchant/services/group/1' \
--cookie "session_token=your_session_token"