API Documentation
Integrate with Saaspa.ge to access product data, user profiles, and more. Our RESTful API is designed to be simple and powerful.
Quick Start
Base URL
https://saaspa.ge/api
All API endpoints are relative to this base URL
Example Request
GET
https://saaspa.ge/api/products
# Get all products
Authentication
API Key Authentication
For public endpoints, no authentication is required. For protected endpoints, include your API key in the request headers.
Authorization: Bearer YOUR_API_KEY
Session Authentication
For user-specific endpoints, you can authenticate using session cookies from the web interface.
Cookie: session=YOUR_SESSION_TOKEN
Rate Limiting
| Limit | Window | Description |
|---|---|---|
| 100 requests | per minute | General API endpoints |
| 1000 requests | per hour | Product listing endpoints |
| 10 requests | per minute | Authentication endpoints |
API Endpoints
GET
/api/productsGet all products with pagination and filtering
Parameters
pagenumberPage number (default: 1)limitnumberItems per page (default: 20)categorystringFilter by category IDstatusstringFilter by status (DRAFT, PENDING, LAUNCHED)Response
{
"success": true,
"data": {
"products": "Array of product objects",
"pagination": "Pagination metadata"
}
}GET
/api/products/[id]Get a specific product by ID
Parameters
idstringProduct IDResponse
{
"success": true,
"data": "Product object"
}POST
/api/productsCreate a new product (requires authentication)
Parameters
namestringProduct name (required)descriptionstringProduct description (required)urlstringProduct URL (required)categoryIdstringCategory ID (required)tagsstring[]Array of tagsalternativesstring[]Array of alternative productsResponse
{
"success": true,
"data": "Created product object"
}GET
/api/categoriesGet all categories
Response
{
"success": true,
"data": "Array of category objects"
}GET
/api/users/[username]Get user profile by username
Parameters
usernamestringUsernameResponse
{
"success": true,
"data": "User profile object"
}POST
/api/votesVote on a product (requires authentication)
Parameters
productIdstringProduct ID (required)typestringVote type: 'up' or 'down' (required)Response
{
"success": true,
"message": "Vote recorded successfully"
}Error Codes
| Code | Message | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Authentication required |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
SDKs and Libraries
Code Examples
JavaScript
// Get all products
const
response = await fetch('https://saaspa.ge/api/products');
const
products = await response.json();
// Create a product
const
newProduct = await fetch('https://saaspa.ge/api/products', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Product',
description: 'Product description',
url: 'https://example.com'
})
});
Python
import requests
# Get all products
response = requests.get('https://saaspa.ge/api/products')
products = response.json()
# Create a product
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {
'name': 'My Product',
'description': 'Product description',
'url': 'https://example.com'
}
response = requests.post(
'https://saaspa.ge/api/products',
headers=headers,
json=data
)
Need Help?
Have questions about our API or need help with integration? Our developer support team is here to help.