API v1

API Documentation

Integrate Sport Fitness & Coaching marketplace data into your applications. Our REST API provides access to sellers, products, services, orders, and reviews.

Getting Started

The Sport Fitness & Coaching API is a RESTful API that returns JSON responses. To get started, you'll need an API key, which you can generate from your seller dashboard.

Example request

curl -X GET https://api.sportfitnesscoaching.com/api/v1/sellers \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Authentication

All authenticated endpoints require a Bearer token in the Authorization header. Tokens expire after 24 hours and can be refreshed using the refresh endpoint.

Generate a token

POST /api/auth/token
Content-Type: application/json

{
  "api_key": "sfc_key_xxxxxxxxxxxx",
  "api_secret": "sfc_secret_xxxxxxxxxxxx"
}

Response:
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI...",
  "expires_in": 86400,
  "token_type": "Bearer"
}

Base URL

Production: https://api.sportfitnesscoaching.com

All API endpoints are relative to this base URL. Use HTTPS for all requests.

Rate Limits

Public (unauthenticated)
60 requests / minute
Authenticated (customer)
300 requests / minute
Seller account
600 requests / minute
Enterprise
Custom — contact us

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Authentication

POST
/api/auth/token

Generate an API access token using your API key and secret.

POST
/api/auth/refresh

Refresh an expired access token.

DELETE
/api/auth/token

Revoke an access token.

Auth required

Sellers / Coaches

GET
/api/v1/sellers

List all active sellers. Supports filtering by specialty, location, and price range.

GET
/api/v1/sellers/:slug

Get a single seller profile by slug.

POST
/api/v1/sellers

Create a new seller profile (requires seller account).

Auth required
PUT
/api/v1/sellers/:slug

Update your seller profile.

Auth required

Products

GET
/api/v1/products

List all products. Filter by seller, category, price range, and type.

GET
/api/v1/products/:id

Get a single product by ID.

POST
/api/v1/products

Create a new product (seller only).

Auth required
PUT
/api/v1/products/:id

Update a product (seller only).

Auth required
DELETE
/api/v1/products/:id

Delete a product (seller only).

Auth required

Services

GET
/api/v1/services

List all coaching services. Filter by seller, duration, and price.

GET
/api/v1/services/:id

Get a single service by ID.

POST
/api/v1/services

Create a new service (seller only).

Auth required
PUT
/api/v1/services/:id

Update a service.

Auth required

Orders

GET
/api/v1/orders

List your orders (customer) or received orders (seller).

Auth required
GET
/api/v1/orders/:id

Get order details.

Auth required
POST
/api/v1/orders

Create a new order.

Auth required
PUT
/api/v1/orders/:id/status

Update order status (seller only).

Auth required

Reviews

GET
/api/v1/sellers/:slug/reviews

List reviews for a seller.

POST
/api/v1/reviews

Submit a review (must have purchased from seller).

Auth required

Response Format

All responses follow a consistent JSON structure:

// Success response
{
  "success": true,
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 142
  }
}

// Error response
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired access token."
  }
}

Need help with the API?

Contact our developer support team or open an issue in our GitHub repository.