API Reference
Complete reference documentation for all Digisis public APIs.
Base URL
https://api.digisis.com.tr/v1Authentication
All API requests must include an API key in the Authorization header:
bash
Authorization: Bearer YOUR_API_KEYProducts API
List Products
http
GET /productsParameters:
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of items to return (default: 20, max: 100) |
offset | integer | Number of items to skip (default: 0) |
category | string | Filter by product category |
Response:
json
{
"data": [
{
"id": "prod_123",
"name": "Product Name",
"description": "Product description",
"price": 29.99,
"category": "electronics",
"created_at": "2024-01-01T00:00:00Z"
}
],
"pagination": {
"total": 150,
"limit": 20,
"offset": 0,
"has_more": true
}
}Get Product
http
GET /products/{id}Response:
json
{
"id": "prod_123",
"name": "Product Name",
"description": "Product description",
"price": 29.99,
"category": "electronics",
"inventory_count": 50,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}Orders API
Create Order
http
POST /ordersRequest Body:
json
{
"customer_id": "cust_456",
"items": [
{
"product_id": "prod_123",
"quantity": 2
}
],
"shipping_address": {
"street": "123 Main St",
"city": "Istanbul",
"postal_code": "34000",
"country": "TR"
}
}Error Handling
All errors follow this format:
json
{
"error": {
"code": "invalid_request",
"message": "The request was invalid",
"details": "Missing required parameter: customer_id"
}
}Error Codes
| Code | Description |
|---|---|
invalid_request | The request was malformed |
unauthorized | Invalid or missing API key |
not_found | Resource not found |
rate_limited | Too many requests |
server_error | Internal server error |
Rate Limiting
- Development: 1,000 requests per hour
- Production: 10,000 requests per hour
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200