API Dokumentáció
A Galactica Code platform fejlesztői interfészének leírása. Az alábbi végpontok a rendszer fő funkcióit fedik le.
Authentication
POST
/api/auth/loginUser Login
Authenticates a user and returns a session token.
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "uuid",
"email": "user@example.com",
"name": "John Doe"
}
}POST
/api/auth/registerUser Registration
Creates a new user account.
{
"message": "Registration successful",
"user_id": "uuid"
}Users
GET
/api/users/meGet Current User Profile
Retrieves the profile information of the currently authenticated user.
{
"id": "uuid",
"name": "John Doe",
"email": "user@example.com",
"role": "user",
"subscription": {
"plan": "free",
"status": "active"
}
}PATCH
/api/users/meUpdate Profile
Updates the user's profile information.
{
"id": "uuid",
"name": "Jane Doe",
"bio": "Astrology enthusiast",
"updated_at": "2023-11-26T10:00:00Z"
}Products
GET
/api/productsList Products
Returns a list of available products and bundles.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | No | Filter by category (report, bundle, subscription) |
{
"data": [
{
"id": "prod_123",
"name": "First Star Code",
"price": 990,
"currency": "HUF"
},
{
"id": "bundle_all",
"name": "Complete Cosmic Package",
"price": 19990,
"currency": "HUF"
}
]
}POST
/api/products/purchasePurchase Product
Initiates a purchase flow for a specific product.
{
"status": "success",
"transactionId": "txn_789",
"accessUrl": "/products/first-star-code/result"
}