API Responses
Deze API beheert het verkeer rondom de gebruikersdata van de VEMAP managementtool. Het handelt klantdata en communicatie af en faciliteert de monitoringsdata voor MAPtm.
Authenticatie
Section titled “Authenticatie”POST /v1/authentication/login
Section titled “POST /v1/authentication/login”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Basic Authentication header (verplicht)Content-Type: application/jsonGeen request body vereist voor basic authentication
Responses
Section titled “Responses”Succesvolle login
Section titled “Succesvolle login”200 Login Succesful
{ "status": 200, "message": "Login successful", "data": { "AuthenticationResult": { "IdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "RefreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "TokenType": "Bearer", "ExpiresIn": 3600 }, "Tenants": { "tenant_id": ["ROLE_USER"], }, "LogoUrl": "https://s3.amazonaws.com/..." }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Challenge Vereist
Section titled “Challenge Vereist”302 Challenge response vereist
Wanneer een gebruiker voor de eerste keer inlogd, ontvangt hij een 302 resposne en wordt het doorgestuurd om zijn wachtwoord aan te passen.
{ "status": 302, "message": "Challenge response required", "data": { "ChallengeName": "NEW_PASSWORD_REQUIRED", "Session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Challenge
Section titled “Challenge”POST /v1/authentication/challenge
Section titled “POST /v1/authentication/challenge”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met session token (verplicht)Content-Type: application/json{ "challengeName": "NEW_PASSWORD_REQUIRED", "username": "user@example.com", "newPassword": "newSecurePassword123!"}Responses
Section titled “Responses”Succesvolle Challenge Completion
Section titled “Succesvolle Challenge Completion”200 Challenge login successful
{ "status": 200, "message": "Challenge login successful", "data": { "AuthenticationResult": { "IdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "RefreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "TokenType": "Bearer", "ExpiresIn": 3600 }, "Tenants": { "tenant_id": ["ROLE_USER"], } }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Refresh
Section titled “Refresh”POST /v1/authentication/refresh
Section titled “POST /v1/authentication/refresh”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met refresh token (verplicht)Content-Type: application/jsonGeen request body vereist voor token refresh
Responses
Section titled “Responses”Succesvolle Token Refresh
Section titled “Succesvolle Token Refresh”200 Refresh token successful
{ "status": 200, "message": "Refresh token successful", "data": { "AuthenticationResult": { "IdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "RefreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "TokenType": "Bearer", "ExpiresIn": 3600 }, "Tenants": { "tenant_id": ["ROLE_USER"] }, "LogoUrl": "https://s3.amazonaws.com/..." }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Logout
Section titled “Logout”POST /v1/authentication/logout
Section titled “POST /v1/authentication/logout”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)Content-Type: application/jsonGeen request body vereist voor logout
Responses
Section titled “Responses”Succesvolle Logout
Section titled “Succesvolle Logout”200 Logout successful
{ "status": 200, "message": "Logout successful", "data": {}, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Forgot Password
Section titled “Forgot Password”POST /v1/authentication/forgot-password
Section titled “POST /v1/authentication/forgot-password”Request
Section titled “Request”Headers
Section titled “Headers”Content-Type: application/json{ "username": "user@example.com"}Body Parameters:
username: Gebruikers email adres (verplicht)
Responses
Section titled “Responses”Succesvolle Password Reset Request
Section titled “Succesvolle Password Reset Request”302 Forgot password successful - email sent
{ "status": 302, "message": "Forgot password successful - email sent, redirecting to confirmation page", "data": { "success": true, "message": "Forgot password successful - email sent, redirecting to confirmation page" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Reset Password
Section titled “Reset Password”POST /v1/authentication/reset-password
Section titled “POST /v1/authentication/reset-password”Request
Section titled “Request”Headers
Section titled “Headers”Content-Type: application/json{ "username": "user@example.com", "confirmationCode": "123456", "password": "NewSecurePassword123!"}Body Parameters:
username: Gebruikers email adres (verplicht)confirmationCode: Confirmatie code ontvangen via email (verplicht)password: Nieuw wachtwoord (verplicht)
Responses
Section titled “Responses”Succesvolle Password Reset
Section titled “Succesvolle Password Reset”302 Reset password successful - password updated
{ "status": 302, "message": "Reset password successful - password updated, redirecting to login page", "data": { "success": true, "message": "Reset password successful - password updated, redirecting to login page" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Gebruikers
Section titled “Gebruikers”Get Users
Section titled “Get Users”GET /v1/{tenant_id}/users
Section titled “GET /v1/{tenant_id}/users”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Users Ophaling
Section titled “Succesvolle Users Ophaling”200 Users fetched successfully
{ "status": 200, "message": "Users fetched successfully", "data": { "users": [ { "id": "user-123", "name": "John Doe", "email": "john.doe@example.com", "authorisation": "ROLE_MANAGER", "company": "Example Corp", "phone_number": "+31612345678" }, { "id": "user-456", "name": "Jane Smith", "email": "jane.smith@example.com", "authorisation": "ROLE_STAKEHOLDER", "company": "Example Corp", "phone_number": "+31687654321" } ] }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create User
Section titled “Create User”POST /v1/{tenant_id}/users
Section titled “POST /v1/{tenant_id}/users”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
{ "email": "newuser@example.com", "fullName": "Jane Smith", "authorisation": "ROLE_MANAGER", "organisationName": "Example Corp", "phone": "+31612345678", "password": "SecurePassword123!"}Body Parameters:
email: Gebruikers email (verplicht)fullName: Volledige naam van de gebruiker (verplicht)authorisation: Gebruikersrol (verplicht) - Mogelijke waarden:ROLE_ADMIN,ROLE_ORGANISATION,ROLE_MANAGER,ROLE_STAKEHOLDERorganisationName: Naam van de organisatie (verplicht)phone: Telefoonnummer (optioneel)password: Tijdelijk wachtwoord (verplicht)
Responses
Section titled “Responses”Succesvolle User Creation
Section titled “Succesvolle User Creation”200 User created successfully
{ "status": 200, "message": "User created successfully", "data": { "user_id": "user-456", "email": "newuser@example.com", "name": "Jane Smith", "company_name": "Example Corp", "phone_number": "+31612345678" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Update User
Section titled “Update User”PATCH /v1/{tenant_id}/users/{user_id}
Section titled “PATCH /v1/{tenant_id}/users/{user_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)user_id: ID van de bij te werken gebruiker (verplicht)
{ "name": "John Doe Updated", "email": "john.updated@example.com", "authorisation": "ROLE_MANAGER", "company": "Updated Corp", "phone_number": "+31687654321"}Body Parameters:
name: Volledige naam van de gebruiker (optioneel)email: Gebruikers email (optioneel)authorisation: Gebruikersrol (optioneel)company: Naam van de organisatie (optioneel)phone_number: Telefoonnummer (optioneel)
Responses
Section titled “Responses”Succesvolle User Update
Section titled “Succesvolle User Update”200 User updated successfully
{ "status": 200, "message": "User updated successfully", "data": { "id": "user-123", "name": "John Doe Updated", "email": "john.updated@example.com", "authorisation": "ROLE_MANAGER", "tenant_id": "tenant-456", "company": "Updated Corp", "last_modified": "2024-01-15T10:30:45.123456Z", "phone_number": "+31687654321" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Delete User
Section titled “Delete User”DELETE /v1/{tenant_id}/users/{user_id}
Section titled “DELETE /v1/{tenant_id}/users/{user_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)user_id: ID van de te verwijderen gebruiker (verplicht)
Responses
Section titled “Responses”Succesvolle User Deletion
Section titled “Succesvolle User Deletion”200 User deleted successfully
{ "status": 200, "message": "User deleted successfully", "data": {}, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Tenants
Section titled “Tenants”Get Tenants
Section titled “Get Tenants”GET /v1/{tenant_id}/tenants
Section titled “GET /v1/{tenant_id}/tenants”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Tenants Ophaling
Section titled “Succesvolle Tenants Ophaling”200 Tenants fetched successfully
{ "status": 200, "message": "Tenants fetched successfully", "data": [ { "id": "tenant-123", "name": "Example Corp", "description": "Production tenant for Example Corp", "contact_name": "John Doe", "contact_email": "john.doe@example.com", "contact_phone": "+31612345678", "created_by": { "user_id": "user-123", "name": "Admin User" }, "created_at": "2024-01-15T10:30:45.123456Z", "updated_at": "2024-01-15T10:30:45.123456Z", "tenant_users": 5, "tenant_managers": [ { "user_id": "user-123", "name": "Admin User" } ], "tenant_projects": 3, "tenant_closures": 10, "is_active": true } ], "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create Tenant
Section titled “Create Tenant”POST /v1/{tenant_id}/tenants
Section titled “POST /v1/{tenant_id}/tenants”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
{ "companyName": "New Company Corp", "contactName": "Jane Smith", "contactEmail": "jane.smith@newcompany.com", "phone": "+31612345678", "description": "New tenant for New Company Corp", "tempPassword": "SecureTempPass123!", "logoMetadata": { "fileName": "company-logo.png", "fileType": "image/png", "status": "pending", "fileSize": 1024000, "version": "1.0" }}Body Parameters:
companyName: Bedrijfsnaam (verplicht)contactName: Naam contactpersoon (verplicht)contactEmail: Email contactpersoon (verplicht)phone: Telefoonnummer (optioneel)description: Beschrijving van de omgeving (verplicht)tempPassword: Tijdelijk wachtwoord (verplicht)logoMetadata: Logo bestand metadata (optioneel)
Responses
Section titled “Responses”Succesvolle Tenant Creation
Section titled “Succesvolle Tenant Creation”201 Tenant created successfully
{ "status": 201, "message": "Tenant created successfully", "data": { "tenant": { "id": "tenant-456", "name": "New Company Corp", "contact_name": "Jane Smith", "contact_email": "jane.smith@newcompany.com", "description": "New tenant for New Company Corp", "logo_upload": { "id": "file-789", "file_type": "image/png", "presigned_url": "https://s3.amazonaws.com/..." } } }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Delete Tenant
Section titled “Delete Tenant”DELETE /v1/{tenant_id}/tenants/{target_tenant_id}
Section titled “DELETE /v1/{tenant_id}/tenants/{target_tenant_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)target_tenant_id: ID van de te verwijderen tenant (verplicht)
Responses
Section titled “Responses”Succesvolle Tenant Deletion
Section titled “Succesvolle Tenant Deletion”200 Tenant deleted successfully
{ "status": 200, "message": "Tenant deleted successfully", "data": { "message": "Tenant deleted successfully", "tenant_id": "tenant-456", "deleted_users_count": 5, "deleted_files_count": 12, "deleted_tenant_count": 1, "s3_deleted_files_count": 12, "status": "deleted" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Projecten
Section titled “Projecten”Get Projects
Section titled “Get Projects”GET /v1/{tenant_id}/projects
Section titled “GET /v1/{tenant_id}/projects”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Projects Ophaling
Section titled “Succesvolle Projects Ophaling”200 Projects fetched successfully
{ "status": 200, "message": "Projects fetched successfully", "data": [ { "project_id": "proj-123", "name": "Project Alpha", "description": "Project beschrijving", "contracting_authority": "Rijkswaterstaat", "road_numbers": "A1, A2", "start_date": "01-15-2024", "end_date": "12-31-2024", "tenant_id": "tenant-456", "created_by_user_id": "user-789", "created_at": "2024-01-15 10:30:45", "updated_at": "2024-01-15 10:30:45", "managers": [ { "id": "user-123", "name": "John Doe", "email": "john@example.com" } ], "archived": false, "phase_number": "1", "closures": 5, "storage_used": 1024 } ]}Fout Responses
Section titled “Fout Responses”Create Project
Section titled “Create Project”POST /v1/{tenant_id}/projects
Section titled “POST /v1/{tenant_id}/projects”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
{ "name": "Project Beta", "description": "Project beschrijving", "contracting_authority": "Rijkswaterstaat", "road_numbers": "A3, A4", "start_date": "01-15-2024", "end_date": "12-31-2024", "tenant_id": "tenant-456", "created_by_user_id": "user-789", "managers": [ { "id": "user-123", "name": "Jane Smith" } ], "phase_number": "1"}Body Parameters:
name: Project naam (verplicht)description: Project beschrijving (verplicht)contracting_authority: Aanbestedende dienst (verplicht)road_numbers: Wegnummers (verplicht)start_date: Startdatum (verplicht, MM-DD-YYYY)end_date: Einddatum (verplicht, MM-DD-YYYY)tenant_id: Tenant ID (verplicht)created_by_user_id: Aanmaker ID (verplicht)managers: Lijst van managers (verplicht)phase_number: Fase nummer (verplicht)
Responses
Section titled “Responses”Succesvolle Project Creation
Section titled “Succesvolle Project Creation”201 Project created successfully
{ "status": 201, "message": "Project created successfully", "data": { "project_id": "proj-456", "name": "Project Beta", "description": "Project beschrijving", "contracting_authority": "Rijkswaterstaat", "road_numbers": "A3, A4", "start_date": "01-15-2024", "end_date": "12-31-2024", "tenant_id": "tenant-456", "created_by_user_id": "user-789", "created_at": "2024-01-15 10:30:45", "updated_at": "2024-01-15 10:30:45", "managers": [ { "id": "user-123", "name": "Jane Smith", "email": "jane@example.com" } ], "archived": false, "phase_number": "1", "closures": 0, "storage_used": 0 }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Update Project
Section titled “Update Project”PATCH /v1/{tenant_id}/projects/{project_id}
Section titled “PATCH /v1/{tenant_id}/projects/{project_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
{ "managers": ["user-123", "user-456"]}Body Parameters:
managers: Lijst van manager IDs om toe te voegen (verplicht)
Responses
Section titled “Responses”Succesvolle Project Update
Section titled “Succesvolle Project Update”200 Project updated successfully
{ "status": 200, "message": "Project updated successfully", "data": { "project_id": "proj-456", "managers_count": 2, "status": "updated" }}Fout Responses
Section titled “Fout Responses”Get Project Recipients
Section titled “Get Project Recipients”GET /v1/{tenant_id}/projects/{project_id}/recipients
Section titled “GET /v1/{tenant_id}/projects/{project_id}/recipients”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Recipients Ophaling
Section titled “Succesvolle Recipients Ophaling”200 Project recipients fetched successfully
{ "status": 200, "message": "Project recipients fetched successfully", "data": { "recipients": [ { "id": "recipient-123", "email": "john@example.com", "name": "John Doe", "organisation_name": "Example Corp", "project_id": "proj-456" }, { "id": "recipient-456", "email": "jane@example.com", "name": "Jane Smith", "organisation_name": "Example Corp", "project_id": "proj-456" } ] }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create Project Recipients
Section titled “Create Project Recipients”POST /v1/{tenant_id}/projects/{project_id}/recipients
Section titled “POST /v1/{tenant_id}/projects/{project_id}/recipients”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
{ "recipients": [ { "email": "john@example.com", "name": "John Doe", "organisationName": "Example Corp" }, { "email": "jane@example.com", "name": "Jane Smith", "organisationName": "Example Corp" } ]}Body Parameters:
recipients: Array van recipients (verplicht)email: Email adres van recipient (verplicht)name: Naam van recipient (verplicht)organisationName: Organisatie naam (verplicht)
Responses
Section titled “Responses”Succesvolle Recipients Creatie
Section titled “Succesvolle Recipients Creatie”200 Recipients created successfully
{ "status": 200, "message": "Recipients created successfully", "data": { "created_count": 2, "updated_count": 0, "total_count": 2, "recipients": [ { "id": "recipient-123", "email": "john@example.com", "name": "John Doe", "organisation_name": "Example Corp" }, { "id": "recipient-456", "email": "jane@example.com", "name": "Jane Smith", "organisation_name": "Example Corp" } ] }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Delete Project Recipient
Section titled “Delete Project Recipient”DELETE /v1/{tenant_id}/projects/{project_id}/recipients/{recipient_id}
Section titled “DELETE /v1/{tenant_id}/projects/{project_id}/recipients/{recipient_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)recipient_id: Recipient identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Recipient Verwijdering
Section titled “Succesvolle Recipient Verwijdering”200 Recipient deleted successfully
{ "status": 200, "message": "Recipient deleted successfully", "data": { "recipient_id": "recipient-123", "status": "deleted" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Get Project Closure References
Section titled “Get Project Closure References”GET /v1/{tenant_id}/projects/{project_id}/closure-references
Section titled “GET /v1/{tenant_id}/projects/{project_id}/closure-references”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Closure References Ophaling
Section titled “Succesvolle Closure References Ophaling”200 Project closure references fetched successfully
{ "status": 200, "message": "Project closure references fetched successfully", "data": [ { "id": "closure-123", "project_id": "proj-456", "name": "Nachtafsluiting A1", "type": "nacht", "start_date": "01-15-2024", "end_date": "01-20-2024", "roadsegment": "A1 km 10-15", "status": "active", "stakeholder_count": 3, "closure_files_count": 2, "vkm_version": "v1.2" } ]}Fout Responses
Section titled “Fout Responses”Afsluitingen
Section titled “Afsluitingen”Get Project Closures
Section titled “Get Project Closures”GET /v1/{tenant_id}/projects/{project_id}/closures
Section titled “GET /v1/{tenant_id}/projects/{project_id}/closures”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Closures Ophaling
Section titled “Succesvolle Closures Ophaling”200 Closures fetched successfully
{ "status": 200, "message": "Closures fetched successfully", "data": [ { "id": "closure-123", "project_id": "proj-456", "name": "Nachtafsluiting A1", "description": "Nachtafsluiting voor onderhoudswerkzaamheden", "start_date": "01-15-2024", "end_date": "01-20-2024", "stakeholders": [ { "user_id": "user-789", "name": "John Doe" } ], "type": "nacht", "created_by_user": { "id": "user-456", "name": "Manager Name" }, "melvin_label": false, "spin_label": true, "status": "open", "created_at": "2024-01-15 10:30:45", "updated_at": "2024-01-15 10:30:45", "vkm_plan": { "id": "vkm-123", "name": "VKM Plan A1", "status": "active", "version": "v1.2", "size": 1024000, "updated_at": "2024-01-15 10:30:45" }, "storage_used": "2.5 MB", "closure_file_count": 5 } ]}Fout Responses
Section titled “Fout Responses”Get Closure
Section titled “Get Closure”GET /v1/{tenant_id}/closures/{closure_id}
Section titled “GET /v1/{tenant_id}/closures/{closure_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)closure_id: Closure identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Closure Ophaling
Section titled “Succesvolle Closure Ophaling”200 Closure fetched successfully
{ "status": 200, "message": "Closure fetched successfully", "data": { "id": "closure-123", "project_id": "proj-456", "name": "Nachtafsluiting A1", "description": "Nachtafsluiting voor onderhoudswerkzaamheden", "start_date": "01-15-2024", "end_date": "01-20-2024", "stakeholders": [ { "user_id": "user-789", "name": "John Doe" } ], "type": "nacht", "created_by_user": { "id": "user-456", "name": "Manager Name" }, "melvin_label": false, "spin_label": true, "status": "open", "created_at": "2024-01-15 10:30:45", "updated_at": "2024-01-15 10:30:45", "vkm_plan": { "id": "vkm-123", "name": "VKM Plan A1", "status": "active", "version": "v1.2", "size": 1024000, "updated_at": "2024-01-15 10:30:45" }, "storage_used": "2.5 MB", "closure_file_count": 5 }}Fout Responses
Section titled “Fout Responses”Create Closure
Section titled “Create Closure”POST /v1/{tenant_id}/closures
Section titled “POST /v1/{tenant_id}/closures”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
Body Parameters
Section titled “Body Parameters”{ "projectId": "proj-456", "closureName": "Nachtafsluiting A1", "closureDescription": "Nachtafsluiting voor onderhoudswerkzaamheden", "closureType": "nacht", "startDate": "01-15-2024", "endDate": "01-20-2024", "stakeholders": ["user-789"], "status": "open", "roadsegment": "A1 km 10-15"}Responses
Section titled “Responses”Succesvolle Closure Aanmaak
Section titled “Succesvolle Closure Aanmaak”201 Closure created successfully
{ "status": 201, "message": "Closure created successfully", "data": { "id": "closure-123", "project_id": "proj-456", "name": "Nachtafsluiting A1", "description": "Nachtafsluiting voor onderhoudswerkzaamheden", "start_date": "01-15-2024", "end_date": "01-20-2024", "stakeholders": [ { "user_id": "user-789", "name": "John Doe" } ], "type": "nacht", "created_by_user": { "id": "user-456", "name": "Manager Name" }, "melvin_label": false, "spin_label": false, "status": "open", "created_at": "2024-01-15 10:30:45", "updated_at": "2024-01-15 10:30:45", "vkm_plan": {}, "storage_used": "0 B", "closure_file_count": 0 }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Add Stakeholders to Closure
Section titled “Add Stakeholders to Closure”POST /v1/{tenant_id}/closures/{closure_id}/stakeholders
Section titled “POST /v1/{tenant_id}/closures/{closure_id}/stakeholders”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)closure_id: Closure identifier (verplicht)
Body Parameters
Section titled “Body Parameters”{ "stakeholders": ["user-789", "user-101"]}Responses
Section titled “Responses”Succesvolle Stakeholders Toevoeging
Section titled “Succesvolle Stakeholders Toevoeging”200 Closure stakeholders added successfully
{ "status": 200, "message": "Closure stakeholders added successfully", "data": { "closure_id": "closure-123", "stakeholders_added": 2, "total_stakeholders": 3 }}Fout Responses
Section titled “Fout Responses”Remove Stakeholder from Closure
Section titled “Remove Stakeholder from Closure”DELETE /v1/{tenant_id}/closures/{closure_id}/stakeholders/{stakeholder_id}
Section titled “DELETE /v1/{tenant_id}/closures/{closure_id}/stakeholders/{stakeholder_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)closure_id: Closure identifier (verplicht)stakeholder_id: Stakeholder user ID (verplicht)
Responses
Section titled “Responses”Succesvolle Stakeholder Verwijdering
Section titled “Succesvolle Stakeholder Verwijdering”200 Stakeholder removed successfully
{ "status": 200, "message": "Stakeholder removed successfully", "data": { "closure_id": "closure-123", "stakeholder_id": "user-789", "status": "removed" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Comments
Section titled “Comments”Get Project Comments
Section titled “Get Project Comments”GET /v1/{tenant_id}/closures/{closure_id}/comments
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/comments”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDclosure_id(string): Closure ID
Query Parameters
Section titled “Query Parameters”limit(optional, int): Maximum aantal comments (default: 50)offset(optional, int): Aantal comments om over te slaan (default: 0)sort_by(optional, string): Sorteer veld (default: “created_at”)sort_order(optional, string): Sorteer richting (“asc” of “desc”, default: “desc”)
Geen request body vereist
Responses
Section titled “Responses”Succesvolle Comments Ophaling
Section titled “Succesvolle Comments Ophaling”200 Comments retrieved successfully
{ "status": 200, "message": "Comments retrieved successfully", "data": [ { "id": "comment-123", "vkm_plan_id": "vkm-789", "version": "1.0", "user_id": "user-456", "user_name": "John Doe", "type": "COMMENT", "message": "Dit is een comment", "created_at": "2024-01-15T10:30:00Z" } ], "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create Comment
Section titled “Create Comment”POST /v1/{tenant_id}/closures/{closure_id}/comments
Section titled “POST /v1/{tenant_id}/closures/{closure_id}/comments”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDclosure_id(string): Closure ID
Body Parameters
Section titled “Body Parameters”{ "vkmPlanId": "vkm-789", "version": "1.0", "userName": "John Doe", "type": "COMMENT", "message": "Dit is een nieuwe comment", "projectId": "project-123"}Responses
Section titled “Responses”Succesvolle Comment Aanmaak
Section titled “Succesvolle Comment Aanmaak”201 Comment created successfully
{ "status": 201, "message": "Comment created successfully", "data": { "id": "comment-456", "vkm_plan_id": "vkm-789", "version": "1.0", "user_id": "user-123", "user_name": "John Doe", "type": "COMMENT", "message": "Dit is een nieuwe comment", "project_id": "project-123", "closure_id": "closure-789", "tenant_id": "tenant-456", "created_at": "2024-01-15T10:30:00Z" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Bestanden
Section titled “Bestanden”Get Closure Files
Section titled “Get Closure Files”GET /v1/{tenant_id}/closures/{closure_id}/files
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/files”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDclosure_id(string): Closure ID
Query Parameters
Section titled “Query Parameters”type(optional, string): Filter op file typestatus(optional, string): Filter op file statuslimit(optional, int): Aantal resultaten per pagina (default: 50)offset(optional, int): Aantal resultaten om over te slaan (default: 0)
Geen request body vereist
Responses
Section titled “Responses”Succesvolle Files Ophaling
Section titled “Succesvolle Files Ophaling”200 File list retrieved successfully
{ "status": 200, "message": "File list retrieved successfully", "data": { "files": [ { "id": "file-123", "name": "document.pdf", "size": 1024000, "type": "support", "closure_id": "closure-789", "updated_at": "2024-01-15T10:30:00Z" } ] }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Get File
Section titled “Get File”GET /v1/{tenant_id}/files/{file_id}
Section titled “GET /v1/{tenant_id}/files/{file_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDfile_id(string): File ID
Query Parameters
Section titled “Query Parameters”action(optional, string): Actie type (“download” of “view”, default: “view”)
Geen request body vereist
Responses
Section titled “Responses”Succesvolle File Ophaling
Section titled “Succesvolle File Ophaling”200 File retrieved successfully
{ "status": 200, "message": "File retrieved successfully", "data": { "id": "file-123", "tenant_id": "tenant-456", "name": "document.pdf", "type": "support", "file_type": "application/pdf", "status": "active", "created_by": "user-456", "project_id": "project-789", "closure_id": "closure-123", "size": 1024000, "updated_by": "user-456", "s3_path": "/files/document.pdf", "in_s3": true, "version": 1.0, "is_current_version": true, "is_archived": false, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Upload File Metadata
Section titled “Upload File Metadata”POST /v1/{tenant_id}/files
Section titled “POST /v1/{tenant_id}/files”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id(string): Tenant ID
Body Parameters
Section titled “Body Parameters”{ "name": "document.pdf", "type": "support", "fileType": "application/pdf", "fileTypeCategory": "document", "status": "concept", "projectId": "project-789", "closureId": "closure-123", "size": 1024000, "s3Path": "/files/document.pdf", "inS3": false, "version": 1.0, "isCurrentVersion": true, "isArchived": false}Responses
Section titled “Responses”Succesvolle File Metadata Upload
Section titled “Succesvolle File Metadata Upload”201 File uploaded successfully
{ "status": 201, "message": "File uploaded successfully", "data": { "id": "file-123", "tenant_id": "tenant-456", "name": "document.pdf", "type": "support", "file_type": "application/pdf", "file_type_category": "document", "status": "concept", "created_by": "user-456", "project_id": "project-789", "closure_id": "closure-123", "size": 1024000, "s3_path": "/files/document.pdf", "in_s3": false, "version": 1.0, "is_current_version": true, "is_archived": false, "created_at": "2024-01-15T10:30:00Z" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Update File Metadata
Section titled “Update File Metadata”PATCH /v1/{tenant_id}/files/{file_id}
Section titled “PATCH /v1/{tenant_id}/files/{file_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDfile_id(string): File ID
Body Parameters
Section titled “Body Parameters”{ "name": "nieuwe_naam.pdf", "status": "active", "metadata": { "description": "Bijgewerkte beschrijving", "tags": ["document", "pdf", "updated"] }}Responses
Section titled “Responses”Succesvolle File Update
Section titled “Succesvolle File Update”200 File updated successfully
{ "status": 200, "message": "File updated successfully", "data": { "id": "file-123", "name": "nieuwe_naam.pdf", "size": 1024000, "version": 1.0, "status": "active", "tenant_id": "tenant-456", "s3_path": "/files/nieuwe_naam.pdf", "in_s3": true, "updated_by": "user-456", "updated_at": "2024-01-15T11:30:00Z" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Delete File
Section titled “Delete File”DELETE /v1/{tenant_id}/files/{file_id}
Section titled “DELETE /v1/{tenant_id}/files/{file_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token (verplicht)x-user-role: Gebruikersrol (verplicht)x-user-id: Gebruikers-ID (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id(string): Tenant IDfile_id(string): File ID
Geen request body vereist
Responses
Section titled “Responses”Succesvolle File Verwijdering
Section titled “Succesvolle File Verwijdering”200 File deleted successfully
{ "status": 200, "message": "File deleted successfully", "data": { "id": "file-123", "message": "File successfully deleted", "file_info": { "name": "document.pdf", "size": 1024000, "type": "support" } }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Stakeholders
Section titled “Stakeholders”Get Closures by Stakeholder
Section titled “Get Closures by Stakeholder”GET /v1/{tenant_id}/stakeholders/{user_id}/closures
Section titled “GET /v1/{tenant_id}/stakeholders/{user_id}/closures”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)user_id: User ID van de stakeholder (verplicht)
Query Parameters
Section titled “Query Parameters”Geen query parameters beschikbaar voor deze endpoint.
Response
Section titled “Response”Success Response
Section titled “Success Response”200 OK - Closures opgehaald
{ "data": [ { "id": "closure-123", "name": "Closure naam", "description": "Closure beschrijving", "project": { "id": "project-456", "name": "Project naam" }, "project_managers": [ { "id": "user-789", "name": "Manager naam" } ], "vkm_plan": { "id": "file-123", "name": "VKM Plan", "status": "active", "version": "1.0", "size": 1024000, "created_at": "2024-01-15T10:30:00Z" }, "support_files": [ { "id": "file-456", "name": "Support bestand", "size": 512000, "updated_at": "2024-01-15T10:30:00Z" } ], "comments": [ { "id": "comment-123", "vkm_plan_id": "file-123", "version": "1.0", "user_id": "user-456", "user_name": "Gebruiker naam", "type": "COMMENT", "message": "Comment bericht", "created_at": "2024-01-15T10:30:00Z" } ], "status": "active", "start_date": "2024-01-15T00:00:00Z", "end_date": "2024-01-20T00:00:00Z", "roadsegment": "A1", "type": "maintenance", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" } ]}Fout Responses
Section titled “Fout Responses”Events
Section titled “Events”Get Events by Closure
Section titled “Get Events by Closure”GET /v1/{tenant_id}/closures/{closure_id}/events
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/events”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)closure_id: Closure identifier (verplicht)
Query Parameters
Section titled “Query Parameters”Geen query parameters beschikbaar voor deze endpoint.
Response
Section titled “Response”Success Response
Section titled “Success Response”200 OK - Events opgehaald
{ "status": 200, "message": "Events fetched successfully", "data": { "closure_id": "closure-789", "created_by": "user-456", "created_at": "2024-01-15T10:30:00Z", "created_by_name": "John Doe", "file_events": [ { "closure_id": "closure-789", "name": "document.pdf", "type": "support", "version": "1.0", "created_by": "user-456", "user_name": "John Doe", "created_at": "2024-01-15T10:30:00Z" } ], "stakeholder_events": [ { "closure_id": "closure-789", "user_id": "user-789", "stakeholder_name": "Jane Smith", "created_by": "user-456", "created_by_name": "John Doe", "created_at": "2024-01-15T10:30:00Z", "is_deleted": false, "deleted_at": null } ], "comment_events": [ { "closure_id": "closure-789", "comment_id": "comment-123", "text": "Comment bericht", "created_by": "user-456", "user_name": "John Doe", "created_at": "2024-01-15T10:30:00Z", "vkm_plan_file_id": "file-123", "type": "COMMENT", "version": "1.0" } ], "mailing_list_events": [ { "mailing_list_id": "mailing-list-123", "closure_id": "closure-789", "created_by": "user-456", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "is_active": true, "recipients_count": 5 }, { "recipient_id": "recipient-456", "email": "test@example.com", "name": "Test User", "organisation_name": "Test Org", "is_active": true, "added_at": "2024-01-15T10:30:00Z", "added_by": "user-456" } ], "email_events": [ { "created_by": "user-456", "created_at": "2024-01-15T10:30:00Z", "status": "queued", "mail_type": "reminder", "subject": "VKM Plan beschikbaar" } ], "final_vkm": { "file_id": "file-123", "closure_id": "closure-789", "name": "VKM_Plan_Final.pdf", "type": "vkm-plan", "version": "1.2", "status": "final", "created_by": "user-456", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-16T14:20:00Z" } }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Send Mail
Section titled “Send Mail”POST /v1/{tenant_id}/mail/{closure_id}
Section titled “POST /v1/{tenant_id}/mail/{closure_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)closure_id: Closure identifier (verplicht)
{ "recipients": [ { "email": "john@example.com", "name": "John Doe" } ], "templateId": "tmpl-123", "subject": "VKM Plan beschikbaar", "customData": { "projectName": "Project Alpha", "closureName": "Nachtafsluiting A1" }}Body Parameters:
recipients: Array van ontvangers (verplicht)templateId: Email template identifier (verplicht)subject: Email onderwerp (verplicht)customData: Custom data voor template variabelen (optioneel)
Responses
Section titled “Responses”Succesvolle Mail Verzending
Section titled “Succesvolle Mail Verzending”200 Email queued successfully
{ "status": 200, "message": "Email queued successfully", "data": { "emailId": "email-job-123", "microserviceData": { "total_recipients": 5, "successful_sends": 5, "failed_sends": 0, "sent_messages": [ { "email_id": "email-job-123", "recipient_email_id": "rec-123", "recipient_email": "john@example.com", "status": "sent", "message_id": "msg-abc123", "sqs_message_id": "sqs-msg-456" } ] } }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create Recipients
Section titled “Create Recipients”POST /v1/{tenant_id}/mail/recipients/{project_id}
Section titled “POST /v1/{tenant_id}/mail/recipients/{project_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)
Query Parameters
Section titled “Query Parameters”closure_id: Closure identifier (optioneel)
Body Parameters
Section titled “Body Parameters”{ "recipients": [ { "email": "john@example.com", "name": "John Doe", "role": "stakeholder" }, { "email": "jane@example.com", "name": "Jane Smith", "role": "reviewer" } ], "template_id": "closure_notification", "subject": "Nieuwe closure beschikbaar", "message": "Er is een nieuwe closure beschikbaar voor review."}Response
Section titled “Response”Success Response
Section titled “Success Response”201 Created - Recipients aangemaakt
{ "createdCount": 2, "updatedCount": 0, "totalCount": 2, "recipients": [ { "id": "recipient-123", "email": "john@example.com", "name": "John Doe", "organisation_name": "Example Corp" }, { "id": "recipient-456", "email": "jane@example.com", "name": "Jane Smith", "organisation_name": "Test Inc" } ], "mailingListId": "mailing-list-123", "addedToMailingList": 2}Fout Responses
Section titled “Fout Responses”Delete Recipients
Section titled “Delete Recipients”DELETE /v1/{tenant_id}/mail/recipients/{project_id}/{closure_id}/{recipient_id}
Section titled “DELETE /v1/{tenant_id}/mail/recipients/{project_id}/{closure_id}/{recipient_id}”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Path Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)project_id: Project identifier (verplicht)closure_id: Closure identifier (verplicht)recipient_id: Recipient identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Recipient Verwijdering
Section titled “Succesvolle Recipient Verwijdering”200 Recipient deleted successfully
{ "status": 200, "message": "Recipient deleted successfully", "data": { "recipient_id": "recipient-123", "status": "deleted" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Mail Templates
Section titled “Mail Templates”List Templates
Section titled “List Templates”GET /v1/{tenant_id}/mail/templates
Section titled “GET /v1/{tenant_id}/mail/templates”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
Responses
Section titled “Responses”Succesvolle Template Ophaling
Section titled “Succesvolle Template Ophaling”200 Templates fetched successfully
{ "status": 200, "message": "Templates fetched successfully", "data": [ { "id": "tmpl-123", "name": "closure_notification", "template_data": { "root": { "type": "EmailLayout", "data": { "backdropColor": "#FFFFFF", "canvasColor": "#FFFFFF", "textColor": "#000000", "fontFamily": "Arial", "childrenIds": ["block-1"] } }, "block-1": { "type": "Text", "data": { "style": { "fontSize": 14 }, "props": { "text": "Beste {NAAM_STAKEHOLDER}, ..." } } } } } ], "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}Fout Responses
Section titled “Fout Responses”Create Template
Section titled “Create Template”POST /v1/{tenant_id}/mail/templates
Section titled “POST /v1/{tenant_id}/mail/templates”Request
Section titled “Request”Headers
Section titled “Headers”Authorization: Bearer token header met access token (verplicht)x-user-id: Gebruikers-ID (verplicht)x-user-role: Gebruikersrol (verplicht)Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”tenant_id: Tenant identifier (verplicht)
{ "templateName": "closure_notification", "templateData": { "root": { "type": "EmailLayout", "data": { "backdropColor": "#FFFFFF", "canvasColor": "#FFFFFF", "textColor": "#000000", "fontFamily": "Arial", "childrenIds": ["block-1"] } }, "block-1": { "type": "Text", "data": { "style": { "fontSize": 14 }, "props": { "text": "Beste {NAAM_STAKEHOLDER}, uw VKM is beschikbaar." } } } }}Responses
Section titled “Responses”Succesvolle Template Creatie
Section titled “Succesvolle Template Creatie”201 Template created successfully
{ "status": 201, "message": "Template created successfully", "data": { "template_id": "tmpl-456" }, "request_id": "abc123def456", "timestamp": "2024-01-15T10:30:00Z"}