{
    "openapi": "3.0.0",
    "info": {
        "title": "Alterlife API",
        "description": "REST API για το Alterlife booking & management platform.",
        "contact": {
            "name": "HappyOnline",
            "email": "dtritsetakis@happyonline.gr"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "http://api.alterlife.gr.test/api",
            "description": "Local dev"
        }
    ],
    "paths": {
        "/auth/login": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Login με email/password",
                "operationId": "a5385ffca73f113abef00ea604d1ca58",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "example": "dtritsetakis@happyonline.gr"
                                    },
                                    "password": {
                                        "type": "string",
                                        "example": "password"
                                    },
                                    "device_name": {
                                        "type": "string",
                                        "example": "web"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success — επιστρέφει user + token"
                    },
                    "401": {
                        "description": "Λάθος credentials"
                    },
                    "403": {
                        "description": "Λογαριασμός ανενεργός"
                    }
                }
            }
        },
        "/auth/me": {
            "get": {
                "tags": [
                    "Auth"
                ],
                "summary": "Στοιχεία τρέχοντος user",
                "operationId": "37252cdc2ae05f1e2e4fd541e987489d",
                "responses": {
                    "200": {
                        "description": "Success"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/auth/logout": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Logout — διαγραφή τρέχοντος token",
                "operationId": "0f6715df0d22b69c7e35bd32b4c1fc92",
                "responses": {
                    "200": {
                        "description": "Success"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/backend/companies": {
            "get": {
                "tags": [
                    "Backend / Companies"
                ],
                "summary": "Λίστα εταιρειών",
                "operationId": "b52b013c4a53b1ae460b98e08b538efd",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "with_locations",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Backend / Companies"
                ],
                "summary": "Δημιουργία εταιρείας",
                "operationId": "7ef5b370dd9a8717a0746ecc83f77302",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name",
                                    "slug"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "slug": {
                                        "type": "string"
                                    },
                                    "contact_email": {
                                        "type": "string"
                                    },
                                    "contact_phone": {
                                        "type": "string"
                                    },
                                    "vat": {
                                        "type": "string"
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/backend/companies/{company}": {
            "get": {
                "tags": [
                    "Backend / Companies"
                ],
                "summary": "Εμφάνιση εταιρείας",
                "operationId": "11d992b4d2b2a79baade97fbfb7590db",
                "parameters": [
                    {
                        "name": "company",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Not found"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Backend / Companies"
                ],
                "summary": "Ενημέρωση εταιρείας",
                "operationId": "8060107fe713b75f42e218051f8e8b7d",
                "parameters": [
                    {
                        "name": "company",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Updated"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Backend / Companies"
                ],
                "summary": "Διαγραφή εταιρείας (soft)",
                "operationId": "28ae479ee2dd38c6dfa504b76cc9de92",
                "parameters": [
                    {
                        "name": "company",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Deleted"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "bearerFormat": "Sanctum",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Auth",
            "description": "Authentication endpoints"
        },
        {
            "name": "Backend / Companies",
            "description": "Διαχείριση εταιρειών (Hero)"
        }
    ]
}