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/products
Get all products with pagination and filtering
Parameters
page
numberPage number (default: 1)limit
numberItems per page (default: 20)category
stringFilter by category IDstatus
stringFilter 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
id
stringProduct IDResponse
{ "success": true, "data": "Product object" }
POST
/api/products
Create a new product (requires authentication)
Parameters
name
stringProduct name (required)description
stringProduct description (required)url
stringProduct URL (required)categoryId
stringCategory ID (required)tags
string[]Array of tagsalternatives
string[]Array of alternative productsResponse
{ "success": true, "data": "Created product object" }
GET
/api/categories
Get all categories
Response
{ "success": true, "data": "Array of category objects" }
GET
/api/users/[username]
Get user profile by username
Parameters
username
stringUsernameResponse
{ "success": true, "data": "User profile object" }
POST
/api/votes
Vote on a product (requires authentication)
Parameters
productId
stringProduct ID (required)type
stringVote 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.