Introduction
This document outlines the general overview of Scalev API.
Welcome to Scalev Docs. In this space, we will introduce how to interact with Scalev system so that you can utilize it in your own app or system. We currently provide endpoints for managing orders, products, and bundles. The API uses JSON for request and response payloads and implements role-based access control for security.
Base URL
https://api.scalev.id/v2
Authentication
The API uses token-based authentication. Include your authentication token in the Authorization header:
Authorization: Bearer YOUR_TOKEN_HERE
Common Response Format
All API responses follow a consistent format:
Success Response
{
"code": 200,
"status": "Success",
"data": {
// Response data here
}
}
Error Response
{
"error": "Error message",
"details": {
"field_name": ["Validation error message"]
}
}
HTTP Status Codes
The API uses standard HTTP status codes:
200 OK
- Successful GET, PUT, PATCH requests201 Created
- Successful POST requests204 No Content
- Successful DELETE requests400 Bad Request
- Invalid request format or parameters401 Unauthorized
- Authentication required403 Forbidden
- Insufficient permissions404 Not Found
- Resource not found422 Unprocessable Entity
- Validation errors429 Too Many Requests
- Rate limit exceeded500 Internal Server Error
- Server error
Rate Limiting
API requests are subject to rate limiting:
- All endpoints: 30 requests per 5 seconds per IP
Rate limit information is included in response headers:
X-Ratelimit-Limit
: Request limitX-Ratelimit-Remaining
: Remaining requestsX-Ratelimit-Reset
: Reset timestamp
Pagination
For cursor-based paginated responses, the data
field contains:
results
: Array of items in the current pagehas_next
: Boolean indicating if there are more pageslast_id
: ID of the last item in the current page (for cursor-based pagination)page_size
: Number of items per page
{
"code": 200,
"status": "Success",
"data": {
"results": [
// Array of items
],
"has_next": true,
"last_id": 123,
"page_size": 25
}
}
For standard paginated responses, the data
field contains:
results
: Array of items in the current pagehas_next
: Boolean indicating if there are more pagespage
: Current page numberpage_size
: Number of items per page
{
"code": 200,
"status": "Success",
"data": {
"results": [
// Array of items
],
"has_next": true,
"page": 1,
"page_size": 25
}
}
Support
If you encounter any issues, please visit the Discussions or contact our support team at [email protected].
This documentation is subject to change as the Scalev API evolves.
Updated about 2 months ago