Organisaties & Workspaces
Overzicht
qr3.app gebruikt een hiërarchie met twee niveaus:
Organization (Firma/Agentur) └── Workspace 1 (Kunde A) └── Workspace 2 (Kunde B) └── Workspace 3 (Internes Team)- Organisatie — hoogste niveau, gekoppeld aan een Stripe-account en abonnement
- Workspace — geïsoleerde omgeving voor QR-codes, scans en API-keys
Organizations API
GET /v1/organizations
Retourneert de organisatie waartoe de huidige API-key behoort.
curl https://qr3.app/v1/organizations \ -H "Authorization: Bearer qr3_sk_..."POST /v1/organizations
Maakt een nieuwe organisatie aan.
curl -X POST https://qr3.app/v1/organizations \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Digital Heroes GmbH", "slug": "digital-heroes", "billing_email": "[email protected]" }'Velden:
| Veld | Type | Verplicht | Omschrijving |
|---|---|---|---|
name | string | ✅ | Weergavenaam (max. 255 tekens) |
slug | string | ✅ | URL-vriendelijk, uniek (min. 2, max. 63 tekens, alleen a-z0-9-) |
billing_email | string | — | Facturatie-e-mailadres |
PATCH /v1/organizations/:id
curl -X PATCH https://qr3.app/v1/organizations/org_a1b2c3 \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \DELETE /v1/organizations/:id
Soft-delete van de organisatie. Alle bijbehorende workspaces en QR-codes blijven behouden, maar zijn niet langer toegankelijk.
Workspaces API
GET /v1/workspaces
Lijst van alle workspaces van de organisatie.
curl https://qr3.app/v1/workspaces \ -H "Authorization: Bearer qr3_sk_..."POST /v1/workspaces
Maakt een nieuwe workspace aan.
curl -X POST https://qr3.app/v1/workspaces \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Kunde Bäckerei Schmidt", "slug": "baeckerei-schmidt", "default_locale": "de", "primary_color": "#8B4513", "approval_required": false }'Velden:
| Veld | Type | Standaard | Omschrijving |
|---|---|---|---|
name | string | — | Weergavenaam (verplicht) |
slug | string | — | URL-vriendelijk, uniek per organisatie (verplicht) |
default_locale | string | de | Standaardtaal |
approval_required | boolean | false | Goedkeuringsworkflow activeren |
primary_color | string | — | Brandingkleur (#RRGGBB) |
Abonnementslimieten:
| Abonnement | Max. aantal workspaces |
|---|---|
| Free | 1 |
| Pro | 3 |
| Business | 10 |
| Agency | Onbeperkt |
PATCH /v1/workspaces/:id
curl -X PATCH https://qr3.app/v1/workspaces/ws_xyz789 \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Neuer Name", "approval_required": true, "custom_domain": "qr.baeckerei-schmidt.de" }'DELETE /v1/workspaces/:id
Archiveert de workspace. Kan niet worden toegepast op de eigen workspace.
Audit-logs
GET /v1/audit-logs
Traceerbaar logboek van alle wijzigingen in de workspace.
curl "https://qr3.app/v1/audit-logs?resource_type=codes&limit=50" \ -H "Authorization: Bearer qr3_sk_..."Query-parameters:
| Parameter | Type | Omschrijving |
|---|---|---|
resource_type | string | Filteren op bron: codes, api_keys, webhooks, workspaces |
resource_id | string | Filteren op specifieke bron-ID |
action | string | Filteren op actie (bijv. codes.created) |
cursor | string | Paginering-cursor |
limit | integer | Max. 100 (standaard: 50) |
Voorbeeld-response:
{ "data": [ { "id": "aud_a1b2c3", "actor_type": "api", "action": "codes.created", "resource_type": "codes", "resource_id": "qr_xyz123", "changes": {}, "created_at": "2026-03-15T10:00:00.000Z" } ]}