{
    "name": "Service Orders API",
    "version": "1.0.0",
    "description": "RESTful API for managing service orders with authentication, async processing, and comprehensive error handling",
    "status": "operational",
    "documentation": "http://admin.pandin.dev",
    "endpoints": {
        "authentication": {
            "register": {
                "method": "POST",
                "path": "/api/auth/register",
                "description": "Register a new user account",
                "auth_required": false
            },
            "login": {
                "method": "POST",
                "path": "/api/auth/login",
                "description": "Login and receive authentication token",
                "auth_required": false
            },
            "logout": {
                "method": "POST",
                "path": "/api/v1/auth/logout",
                "description": "Logout and revoke current token",
                "auth_required": true
            }
        },
        "orders": {
            "list": {
                "method": "GET",
                "path": "/api/v1/orders",
                "description": "List all orders with pagination and filters",
                "auth_required": true,
                "query_params": [
                    "status",
                    "customer_email",
                    "start_date",
                    "end_date",
                    "per_page",
                    "page"
                ]
            },
            "create": {
                "method": "POST",
                "path": "/api/v1/orders",
                "description": "Create a new service order with items",
                "auth_required": true
            },
            "show": {
                "method": "GET",
                "path": "/api/v1/orders/{id}",
                "description": "Get details of a specific order",
                "auth_required": true
            },
            "cancel": {
                "method": "POST",
                "path": "/api/v1/orders/{id}/cancel",
                "description": "Cancel an order (idempotent operation)",
                "auth_required": true
            }
        },
        "user": {
            "profile": {
                "method": "GET",
                "path": "/api/v1/user",
                "description": "Get current authenticated user profile",
                "auth_required": true
            }
        }
    },
    "features": {
        "authentication": "Laravel Sanctum token-based authentication",
        "rate_limiting": "60 requests per minute",
        "pagination": "Cursor-based pagination for list endpoints",
        "async_processing": "Queue-based email notifications",
        "error_handling": "Standardized error responses with trace IDs",
        "multi_language": "Multi-language support ready"
    },
    "error_codes": {
        "UNAUTHENTICATED": "Authentication token missing or invalid (401)",
        "VALIDATION_ERROR": "Request data validation failed (422)",
        "RESOURCE_NOT_FOUND": "Requested resource not found (404)",
        "ENDPOINT_NOT_FOUND": "API endpoint does not exist (404)",
        "METHOD_NOT_ALLOWED": "HTTP method not supported for this endpoint (405)",
        "RATE_LIMIT_EXCEEDED": "Too many requests, please slow down (429)",
        "INTERNAL_SERVER_ERROR": "Unexpected server error occurred (500)"
    },
    "authentication_header": "Authorization: Bearer {your-token-here}",
    "timestamp": "2026-05-17T08:08:35+00:00"
}