https://api.store.io/v2
Authentication
All API requests require a Bearer token in the Authorization header. Obtain a token via the /auth/login endpoint.
Authentication
Endpoints for user authentication and token management.
Authenticates a user with email and password. Returns JWT access and refresh tokens.
Request Body
| Parameter | Type | Description |
|---|---|---|
| emailrequired | string | User email address |
| passwordrequired | string | User password (min 8 chars) |
curl -X POST https://api.store.io/v2/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "securepass123" }'
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...",
"token_type": "Bearer",
"expires_in": 3600,
"user": {
"id": 1,
"email": "user@example.com",
"name": "John Doe",
"role": "admin"
}
}
Users
Manage user accounts. Requires authentication.
Returns a paginated list of users. Supports filtering and sorting.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Items per page (default: 20, max: 100) |
| sort | string | Sort field (name, email, created_at) |
| role | string | Filter by role (admin, user, editor) |
{
"data": [
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"role": "admin",
"created_at": "2026-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 847,
"pages": 43
}
}
Returns detailed information about a specific user.
curl https://api.store.io/v2/users/1 \ -H "Authorization: Bearer <token>"
Products
CRUD operations for product catalog management.
Returns paginated product list with filtering by category, price range, and availability.
curl "https://api.store.io/v2/products?category=electronics&min_price=100" \ -H "Authorization: Bearer <token>"
{
"data": [
{
"id": 42,
"name": "ProBook Ultra 15\"",
"price": 1329.00,
"category": "laptops",
"in_stock": true,
"rating": 4.8,
"reviews_count": 247
}
],
"pagination": { "page": 1, "total": 156 }
}
Creates a new product. Requires admin role.
{
"name": "Galaxy X Pro",
"price": 899.00,
"category": "smartphones",
"description": "6.7\" AMOLED, 108MP camera",
"stock": 500
}
Orders
Order management and checkout flow.
Creates a new order from the user's cart. Processes payment and reserves inventory.
{
"items": [
{ "product_id": 42, "quantity": 1 },
{ "product_id": 15, "quantity": 2 }
],
"shipping_address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"payment_method": "card_tok_visa4242"
}
{
"order_id": "ORD-2026-0847",
"status": "confirmed",
"total": 1678.00,
"estimated_delivery": "2026-02-28"
}
Status Codes
Standard HTTP status codes used across all endpoints.
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Invalid request body or parameters |
| 401 | Unauthorized | Missing or invalid authentication token |
| 403 | Forbidden | Insufficient permissions for this action |
| 404 | Not Found | Resource does not exist |
| 429 | Rate Limited | Too many requests (limit: 100/min) |
| 500 | Server Error | Internal server error |