Ga naar inhoud

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.

Terminal window
curl https://qr3.app/v1/organizations \
-H "Authorization: Bearer qr3_sk_..."

POST /v1/organizations

Maakt een nieuwe organisatie aan.

Terminal window
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:

VeldTypeVerplichtOmschrijving
namestringWeergavenaam (max. 255 tekens)
slugstringURL-vriendelijk, uniek (min. 2, max. 63 tekens, alleen a-z0-9-)
billing_emailstringFacturatie-e-mailadres

PATCH /v1/organizations/:id

Terminal window
curl -X PATCH https://qr3.app/v1/organizations/org_a1b2c3 \
-H "Authorization: Bearer qr3_sk_..." \
-H "Content-Type: application/json" \
-d '{ "name": "Digital Heroes AG", "billing_email": "[email protected]" }'

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.

Terminal window
curl https://qr3.app/v1/workspaces \
-H "Authorization: Bearer qr3_sk_..."

POST /v1/workspaces

Maakt een nieuwe workspace aan.

Terminal window
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:

VeldTypeStandaardOmschrijving
namestringWeergavenaam (verplicht)
slugstringURL-vriendelijk, uniek per organisatie (verplicht)
default_localestringdeStandaardtaal
approval_requiredbooleanfalseGoedkeuringsworkflow activeren
primary_colorstringBrandingkleur (#RRGGBB)

Abonnementslimieten:

AbonnementMax. aantal workspaces
Free1
Pro3
Business10
AgencyOnbeperkt

PATCH /v1/workspaces/:id

Terminal window
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.

Terminal window
curl "https://qr3.app/v1/audit-logs?resource_type=codes&limit=50" \
-H "Authorization: Bearer qr3_sk_..."

Query-parameters:

ParameterTypeOmschrijving
resource_typestringFilteren op bron: codes, api_keys, webhooks, workspaces
resource_idstringFilteren op specifieke bron-ID
actionstringFilteren op actie (bijv. codes.created)
cursorstringPaginering-cursor
limitintegerMax. 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"
}
]
}