2. API Example Script

import requests

def book_appointment():
    # Authentication
    headers = {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    }

    # Request body
    payload = {
        'service': 'anmeldung',
        'location': 'Mitte',
        'date_range': {
            'start': '2024-01-01',
            'end': '2024-01-31'
        }
    }

    # API endpoint
    response = requests.post(
        'https://api.amtify.de/v1/appointments',
        headers=headers,
        json=payload
    )

    return response.json()