Getting started
Authentication
Send your organization's API key in the Authorization header of every request:
GET /api/v1/reporting/task-outcomes HTTP/1.1
Host: www.gastrotodo.de
Authorization: Bearer gtr_…Keys in the URL (?apiKey=…) are not accepted, because URLs end up in proxy and access logs.
Create a key
- Sign in to gastrotodo with an account that has organization permissions.
- Open Integrations → Reporting API.
- Choose Create API key, enter its purpose and lifetime (90, 180, or 365 days, or unlimited), and copy the key right away.
The key starts with gtr_ and is shown in full only once, because gastrotodo stores only a hash of it. After that, the app shows its first characters, purpose, expiry date, and when it was last used.
Rotate keys without downtime
An organization can have two keys at the same time, so you can switch without interrupting your loader:
- Create a second key.
- Switch your loader to the new key.
- Check under "Last used" that only the new key is in use.
- Revoke the old key.
A revoked key stops working immediately. Requests with an expired key fail with expired_api_key. If gastrotodo disables the Reporting API for your organization, all keys are deleted.
Restrict access by IP address
Under Allowed IP addresses, list the addresses that may send requests: IPv4 addresses, IPv6 addresses, or IPv4 ranges such as 198.51.100.0/24. Requests from any other address fail with 403 ip_not_allowed. If the list is empty, there is no restriction. Cloud services such as Cloud Run use changing addresses unless you route their traffic through a static outbound IP (Cloud NAT).
What a key can access
The key grants access to all areas assigned to your organization, and only those. A newly added area is included from the next request on. An area that is detached or deleted disappears from all datasets.
