Introduction
The Finanzapp API provides a comprehensive set of endpoints for managing personal finance operations, including user authentication, account management, and data synchronization. The API is built using PHP and follows RESTful principles with JSON-based communication.Base URL
Architecture
Finanzapp uses a traditional server-rendered PHP architecture with AJAX-based API endpoints for dynamic operations.Key Components
Authentication
Session-based authentication with support for traditional login and Google OAuth integration
Data Management
JSON-based data exchange with server-side validation and storage
Security
CSRF protection, XHR validation, and reCAPTCHA integration
Notifications
Email notifications for password resets and account updates
Request Format
All API requests must include specific headers and follow the JSON format for data exchange.Required Headers
Must be set to
XMLHttpRequest to prevent direct accessShould be
application/x-www-form-urlencoded for form data or application/json for JSON payloadsExample Request
Response Format
All API endpoints return JSON responses with a consistent structure.Success Response
Error Response
HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests.| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
403 | Forbidden - Invalid XHR request or unauthorized access |
404 | Not Found - Endpoint does not exist |
405 | Method Not Allowed - Invalid HTTP method |
500 | Internal Server Error - Server-side error occurred |
Authentication Flow
Finanzapp supports two authentication methods:1. Traditional Email/Password Authentication
2. Google OAuth Integration
Data Validation
All API endpoints implement server-side validation for:- Email validation: RFC-compliant email format
- Password strength: Minimum 8 characters, at least one uppercase letter and one number
- XHR verification: All requests must include
X-Requested-With: XMLHttpRequestheader - Session validation: Protected endpoints verify active user sessions
The frontend implements additional client-side validation using JavaScript for immediate user feedback before submission.
Rate Limiting
Security Features
CSRF Protection
All API endpoints validate that requests originate from AJAX calls by checking theX-Requested-With header.
Session Management
User sessions are managed server-side with PHP sessions. Sessions include:Unique user identifier
User’s email address
User’s full name
URL to user’s avatar image
Newsletter subscription status (0 or 1)
Environment Configuration
The API automatically detects the environment based on the host:Next Steps
Authentication
Learn about authentication methods and session management
Endpoints
Explore all available API endpoints with examples
