Page cover image

Service Endpoint

Services API access is read-only

Note: API Access is limited to Enterprise accounts and available upon request


Overview

The Services API allows Enterprise accounts to retrieve a list of active services offered at their business location, including service details like name, duration, price, and categorization.

Endpoint

POST https://my.simplespa.com/api/services.php

Authentication

You must include a valid Authorization header using your SimpleSpa API Key:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Replace YOUR_API_KEY with your SimpleSpa Enterprise API Key.

Request Body

The API expects a JSON body with optional parameters to control pagination and filtering.

Example Request Body

{
  "page": 1,
  "per_page": 100,
  "category_id": 5
}

Field

Type

Required

Description

page

integer

No

Page number to retrieve (default = 1)

per_page

integer

No

Number of results per page (maximum 1000)

category_id

integer

No

Filter services by a specific category (label) ID

Example CURL Request

curl -X POST https://my.simplespa.com/api/services.php \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "page": 1,
  "per_page": 100
}'

Response Format

The API responds with a JSON object containing the list of services and pagination information.

Example Response

{
  "success": true,
  "services": [
    {
      "service_id": "6",
      "name": "Deep Tissue Massage",
      "duration": 60,
      "price": 120.00,
      "special_price": 100.00,
      "category": "Massage",
      "category_id": "1",
      "required_staff": true,
      "required_resource": false,
      "downtime": 0
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_results": 45
}

Response Fields

Field

Description

success

Always true if the request was successful

services

List of service records

service_id

Unique hashed ID of the service

name

Service name

duration

Service duration in minutes

price

Regular price for the service

special_price

Discounted special price (if applicable)

category

Category (label) name

category_id

Hashed ID of the category (label)

required_staff

Boolean indicating if the service requires a specific staff member

required_resource

Boolean indicating if the service requires a specific resource (e.g., room, equipment)

downtime

Downtime minutes (if any) after the service

page

Current page number

per_page

Number of results per page

total_results

Total number of services available

Notes

  • Pagination: Default per_page is 100 if not specified. Maximum allowed is 1000.

  • Filtering: You can filter services by a specific category using the category_id parameter.

  • Prices:

    • If the service has a special discounted price, both price and special_price will be shown.

    • If no special price exists, special_price may be null.

  • Rate Limiting: Please ensure reasonable usage to avoid throttling. It is recommended to poll no faster than once per minute.

⚠️ IMPORTANT: Never expose your private API key in client-side JavaScript. Always use secure, server-side code to handle sensitive credentials.

Last updated