Skip to main content
Create and manage individual services and group booking services with pricing, duration, and inventory tracking.

Create Service

Requires authentication.
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}
    ]
  }'
name
string
required
Service name
description
string
Detailed service description
color
string
required
Hex color code for calendar display (must be valid hex color)
price
object
Service price
cost
object
Service cost for internal tracking
price_type
string
required
Pricing type: “fixed”, “free”, “variable”, or “starting_at”
category_id
integer
Service category ID for organization
is_active
boolean
required
Whether service is available for booking
settings
object
required
Service-specific scheduling settings (overrides merchant defaults if set)
phases
array
required
Service phases defining duration and type
used_products
array
required
Products consumed by this service

Response

Returns 201 Created on success.

Update Service

Requires authentication.
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"
      }
    ]
  }'
id
integer
required
Service ID
Body parameters are the same as create, with phases including their IDs.

Delete Service

Requires authentication.
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"
id
integer
required
Service ID to delete

Get Service

Requires authentication.
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"
id
integer
required
Service ID
id
integer
Service ID
category_id
integer
Service category ID
name
string
Service name
description
string
Service description
color
string
Hex color code
total_duration
integer
Total duration in minutes (sum of all phases)
price
object
Service price
cost
object
Service cost
price_type
string
Pricing type
is_active
boolean
Active status
sequence
integer
Display order sequence
settings
object
Service-specific settings
phases
array
Service phases with IDs
used_products
array
Products used by this service

Get All Services

Requires authentication.
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:
id
integer
Category ID (null for uncategorized)
name
string
Category name
sequence
integer
Category display order
services
array
Services in this category

Update Service Products

Requires authentication.
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}
    ]
  }'
id
integer
required
Service ID
service_id
integer
required
Service ID (must match path parameter)
used_products
array
required
Updated product usage list

Activate Service

Requires authentication.
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"
id
integer
required
Service ID

Deactivate Service

Requires authentication.
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"
id
integer
required
Service ID

Reorder Services

Requires authentication.
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
integer
Category ID (null for uncategorized services)
services
array
required
Array of service IDs in desired order

Get Form Options

Requires authentication.
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"
products
array
Available products
categories
array
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": []
  }'
min_participants
integer
Minimum participants required
max_participants
integer
required
Maximum participants allowed
duration
integer
required
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"

Build docs developers (and LLMs) love