Skip to content

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.

Authorization: Basic Authentication header (verplicht)
Content-Type: application/json

Geen request body vereist voor basic authentication

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"
}

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"
}


Authorization: Bearer token header met session token (verplicht)
Content-Type: application/json
{
"challengeName": "NEW_PASSWORD_REQUIRED",
"username": "user@example.com",
"newPassword": "newSecurePassword123!"
}

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"
}


Authorization: Bearer token header met refresh token (verplicht)
Content-Type: application/json

Geen request body vereist voor 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"
}


Authorization: Bearer token header met access token (verplicht)
Content-Type: application/json

Geen request body vereist voor logout

200 Logout successful

{
"status": 200,
"message": "Logout successful",
"data": {},
"request_id": "abc123def456",
"timestamp": "2024-01-15T10:30:00Z"
}


Content-Type: application/json
{
"username": "user@example.com"
}

Body Parameters:

  • username: Gebruikers email adres (verplicht)

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"
}


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)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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_STAKEHOLDER
  • organisationName: Naam van de organisatie (verplicht)
  • phone: Telefoonnummer (optioneel)
  • password: Tijdelijk wachtwoord (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • user_id: ID van de te verwijderen gebruiker (verplicht)

200 User deleted successfully

{
"status": 200,
"message": "User deleted successfully",
"data": {},
"request_id": "abc123def456",
"timestamp": "2024-01-15T10:30:00Z"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

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"
}


DELETE /v1/{tenant_id}/tenants/{target_tenant_id}
Section titled “DELETE /v1/{tenant_id}/tenants/{target_tenant_id}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • target_tenant_id: ID van de te verwijderen tenant (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)

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
}
]
}

Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

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"
}

PATCH /v1/{tenant_id}/projects/{project_id}
Section titled “PATCH /v1/{tenant_id}/projects/{project_id}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

200 Project updated successfully

{
"status": 200,
"message": "Project updated successfully",
"data": {
"project_id": "proj-456",
"managers_count": 2,
"status": "updated"
}
}

GET /v1/{tenant_id}/projects/{project_id}/recipients
Section titled “GET /v1/{tenant_id}/projects/{project_id}/recipients”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)

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"
}


POST /v1/{tenant_id}/projects/{project_id}/recipients
Section titled “POST /v1/{tenant_id}/projects/{project_id}/recipients”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

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"
}


DELETE /v1/{tenant_id}/projects/{project_id}/recipients/{recipient_id}
Section titled “DELETE /v1/{tenant_id}/projects/{project_id}/recipients/{recipient_id}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)
  • recipient_id: Recipient identifier (verplicht)

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"
}


GET /v1/{tenant_id}/projects/{project_id}/closure-references
Section titled “GET /v1/{tenant_id}/projects/{project_id}/closure-references”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)

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"
}
]
}

GET /v1/{tenant_id}/projects/{project_id}/closures
Section titled “GET /v1/{tenant_id}/projects/{project_id}/closures”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)

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
}
]
}

Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • closure_id: Closure identifier (verplicht)

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
}
}

Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
{
"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"
}

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"
}

POST /v1/{tenant_id}/closures/{closure_id}/stakeholders
Section titled “POST /v1/{tenant_id}/closures/{closure_id}/stakeholders”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • closure_id: Closure identifier (verplicht)
{
"stakeholders": ["user-789", "user-101"]
}

200 Closure stakeholders added successfully

{
"status": 200,
"message": "Closure stakeholders added successfully",
"data": {
"closure_id": "closure-123",
"stakeholders_added": 2,
"total_stakeholders": 3
}
}

DELETE /v1/{tenant_id}/closures/{closure_id}/stakeholders/{stakeholder_id}
Section titled “DELETE /v1/{tenant_id}/closures/{closure_id}/stakeholders/{stakeholder_id}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
  • tenant_id: Tenant identifier (verplicht)
  • closure_id: Closure identifier (verplicht)
  • stakeholder_id: Stakeholder user ID (verplicht)

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"
}


GET /v1/{tenant_id}/closures/{closure_id}/comments
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/comments”
Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
  • tenant_id (string): Tenant ID
  • closure_id (string): Closure ID
  • 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

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"
}

POST /v1/{tenant_id}/closures/{closure_id}/comments
Section titled “POST /v1/{tenant_id}/closures/{closure_id}/comments”
Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
Content-Type: application/json
  • tenant_id (string): Tenant ID
  • closure_id (string): Closure ID
{
"vkmPlanId": "vkm-789",
"version": "1.0",
"userName": "John Doe",
"type": "COMMENT",
"message": "Dit is een nieuwe comment",
"projectId": "project-123"
}

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"
}

GET /v1/{tenant_id}/closures/{closure_id}/files
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/files”
Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
  • tenant_id (string): Tenant ID
  • closure_id (string): Closure ID
  • type (optional, string): Filter op file type
  • status (optional, string): Filter op file status
  • limit (optional, int): Aantal resultaten per pagina (default: 50)
  • offset (optional, int): Aantal resultaten om over te slaan (default: 0)

Geen request body vereist

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"
}

Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
  • tenant_id (string): Tenant ID
  • file_id (string): File ID
  • action (optional, string): Actie type (“download” of “view”, default: “view”)

Geen request body vereist

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"
}

Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
Content-Type: application/json
  • tenant_id (string): Tenant ID
{
"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
}

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"
}

Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
Content-Type: application/json
  • tenant_id (string): Tenant ID
  • file_id (string): File ID
{
"name": "nieuwe_naam.pdf",
"status": "active",
"metadata": {
"description": "Bijgewerkte beschrijving",
"tags": ["document", "pdf", "updated"]
}
}

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"
}

Authorization: Bearer token (verplicht)
x-user-role: Gebruikersrol (verplicht)
x-user-id: Gebruikers-ID (verplicht)
  • tenant_id (string): Tenant ID
  • file_id (string): File ID

Geen request body vereist

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"
}

GET /v1/{tenant_id}/stakeholders/{user_id}/closures
Section titled “GET /v1/{tenant_id}/stakeholders/{user_id}/closures”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
  • tenant_id: Tenant identifier (verplicht)
  • user_id: User ID van de stakeholder (verplicht)

Geen query parameters beschikbaar voor deze endpoint.

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"
}
]
}

GET /v1/{tenant_id}/closures/{closure_id}/events
Section titled “GET /v1/{tenant_id}/closures/{closure_id}/events”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
  • tenant_id: Tenant identifier (verplicht)
  • closure_id: Closure identifier (verplicht)

Geen query parameters beschikbaar voor deze endpoint.

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"
}

Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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)

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"
}


POST /v1/{tenant_id}/mail/recipients/{project_id}
Section titled “POST /v1/{tenant_id}/mail/recipients/{project_id}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)
  • closure_id: Closure identifier (optioneel)
{
"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."
}

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
}

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}”
Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
  • tenant_id: Tenant identifier (verplicht)
  • project_id: Project identifier (verplicht)
  • closure_id: Closure identifier (verplicht)
  • recipient_id: Recipient identifier (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • tenant_id: Tenant identifier (verplicht)

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"
}


Authorization: Bearer token header met access token (verplicht)
x-user-id: Gebruikers-ID (verplicht)
x-user-role: Gebruikersrol (verplicht)
Content-Type: application/json
  • 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." }
}
}
}
}

201 Template created successfully

{
"status": 201,
"message": "Template created successfully",
"data": {
"template_id": "tmpl-456"
},
"request_id": "abc123def456",
"timestamp": "2024-01-15T10:30:00Z"
}