/** * Help API Overview Page * * Tenant-facing API documentation overview. */ import React from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate, Link } from 'react-router-dom'; import { ArrowLeft, Code, Key, Shield, AlertCircle, Zap, Book, HelpCircle, ChevronRight, Calendar, Users, Settings, Webhook, CheckCircle, XCircle, } from 'lucide-react'; const HelpApiOverview: React.FC = () => { const { t } = useTranslation(); const navigate = useNavigate(); return (
{/* Back Button */} {/* Header */}

API Overview

REST API for third-party integrations

{/* Introduction Section */}

Introduction

SmoothSchedule provides a comprehensive REST API that allows you to integrate your scheduling platform with third-party applications, build custom tools, and automate workflows.

Base URL

https://your-subdomain.smoothschedule.com/tenant-api/v1/

Tenant Remote API: This API is designed for third-party integrations. All requests require Bearer token authentication with appropriate scopes.

{/* Authentication Section */}

Authentication

All API requests require authentication using Bearer tokens in the Authorization header.

Token Format

ss_live_xxxxxxxxx

Production environment

ss_test_xxxxxxxxx

Sandbox environment (safe for testing)

Example Request

{`curl -X GET "https://demo.smoothschedule.com/tenant-api/v1/services/" \\
  -H "Authorization: Bearer ss_live_xxxxxxxxx" \\
  -H "Content-Type: application/json"`}
              

Security: API tokens are created in Business Settings → API. Each token has configurable scopes that control access to specific endpoints and operations.

{/* Available Scopes Section */}

Available Scopes

Control which operations your API token can perform by selecting scopes:

Scope Description
services:read View services and pricing
resources:read View resources and staff
availability:read Check time slot availability
bookings:read View appointments
bookings:write Create, update, cancel appointments
customers:read View customer information
customers:write Create and update customers
business:read View business information
webhooks:manage Manage webhook subscriptions
{/* Filtering & Sorting Section */}

Filtering & Sorting

All list endpoints support filtering and sorting via query parameters.

{/* Comparison Operators */}

Comparison Operators

For numeric fields, append these suffixes to filter by comparison:

Suffix Meaning Example
(none) Equals price=5000
__lt Less than price__lt=5000
__lte Less than or equal price__lte=5000
__gt Greater than price__gt=5000
__gte Greater than or equal price__gte=5000
{/* Sorting */}

Sorting

Use the ordering parameter to sort results. Prefix with - for descending order.

{`# Ascending (oldest first)
GET /tenant-api/v1/bookings/?ordering=start_time

# Descending (newest first)
GET /tenant-api/v1/bookings/?ordering=-start_time`}
              
{/* Services Filters */}

Services Endpoint Filters

Parameter Type Description
search string Search by name (partial match)
name string Exact name match
price integer Price in cents (supports __lt, __lte, __gt, __gte)
duration integer Duration in minutes (supports __lt, __lte, __gt, __gte)
variable_pricing boolean Filter by variable pricing (true/false)
requires_manual_scheduling boolean Filter by manual scheduling requirement
ordering string name, price, duration, display_order (prefix - for desc)
{/* Bookings Filters */}

Bookings Endpoint Filters

Parameter Type Description
start_date date Filter from date (YYYY-MM-DD)
end_date date Filter to date (YYYY-MM-DD)
start_datetime datetime Filter from datetime (ISO 8601)
end_datetime datetime Filter to datetime (ISO 8601)
status string SCHEDULED, CONFIRMED, COMPLETED, CANCELLED
service_id integer Filter by service
customer_id integer Filter by customer
resource_id integer Filter by resource
ordering string start_time, end_time, created_at, updated_at
{/* Example */}

Examples

{`# Services under $50 with duration over 30 minutes
GET /tenant-api/v1/services/?price__lt=5000&duration__gt=30&ordering=price

# Bookings between two dates, newest first
GET /tenant-api/v1/bookings/?start_date=2025-01-01&end_date=2025-01-31&ordering=-start_time

# Customers search with sorting by last name
GET /tenant-api/v1/customers/?search=john&ordering=last_name`}
              
{/* Rate Limiting Section */}

Rate Limiting

API requests are rate-limited to ensure fair usage and platform stability:

Global Limit

1,000 requests per hour

Burst Limit

100 requests per minute

Response Headers

X-RateLimit-Limit - Maximum requests allowed
X-RateLimit-Remaining - Requests remaining in window
X-RateLimit-Reset - Unix timestamp when limit resets
{/* Error Responses Section */}

Error Responses

All errors follow a consistent JSON format:

{`{
  "error": "validation_error",
  "message": "Invalid request data",
  "details": {
    "start_time": ["This field is required."],
    "service_id": ["Invalid service ID."]
  }
}`}
            

HTTP Status Codes

Code Status Description
200 OK Request succeeded
201 Created Resource created successfully
400 Bad Request Invalid request data
401 Unauthorized Missing or invalid token
403 Forbidden Insufficient scope permissions
404 Not Found Resource does not exist
409 Conflict Resource conflict (e.g., double booking)
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error (contact support)
{/* Sandbox Mode Section */}

Sandbox Mode

Test your integration safely without affecting production data:

  • Test Tokens

    Tokens prefixed with ss_test_ work with sandbox data only

  • Safe Testing

    Create, update, and delete test appointments without affecting real bookings

  • Easy Toggle

    Switch between test and live modes in Business Settings → API

Tip: Always test with sandbox tokens before using production tokens in your application.

{/* Quick Links Section */}

API Endpoints

Appointments API

Create, manage, and query appointments

View Docs

Services API

Access service catalog and pricing

View Docs

Resources API

Staff, rooms, and equipment data

View Docs

Customers API

Customer profiles and contact info

View Docs

Webhooks

Real-time event notifications

View Docs
{/* Need More Help */}

Need More Help?

Our support team is ready to help with API integration questions.

); }; export default HelpApiOverview;