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
All API endpoints are relative to this base URL. Use HTTPS for all requests.
Rate Limits
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
Authentication
/api/auth/tokenGenerate an API access token using your API key and secret.
/api/auth/refreshRefresh an expired access token.
/api/auth/tokenRevoke an access token.
Sellers / Coaches
/api/v1/sellersList all active sellers. Supports filtering by specialty, location, and price range.
/api/v1/sellers/:slugGet a single seller profile by slug.
/api/v1/sellersCreate a new seller profile (requires seller account).
/api/v1/sellers/:slugUpdate your seller profile.
Products
/api/v1/productsList all products. Filter by seller, category, price range, and type.
/api/v1/products/:idGet a single product by ID.
/api/v1/productsCreate a new product (seller only).
/api/v1/products/:idUpdate a product (seller only).
/api/v1/products/:idDelete a product (seller only).
Services
/api/v1/servicesList all coaching services. Filter by seller, duration, and price.
/api/v1/services/:idGet a single service by ID.
/api/v1/servicesCreate a new service (seller only).
/api/v1/services/:idUpdate a service.
Orders
/api/v1/ordersList your orders (customer) or received orders (seller).
/api/v1/orders/:idGet order details.
/api/v1/ordersCreate a new order.
/api/v1/orders/:id/statusUpdate order status (seller only).
Reviews
/api/v1/sellers/:slug/reviewsList reviews for a seller.
/api/v1/reviewsSubmit a review (must have purchased from seller).
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.